artefaktur
software engineer &        architecture

 
 
 
 

class CoreByteBuffer

Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   Namespace Members   Compound Members   Related Pages  

acdk::lang::CoreByteBuffer Class Reference

#include <ByteBuffer.h>

Inheritance diagram for acdk::lang::CoreByteBuffer:

acdk::lang::Object acdk::lang::FlexByteBuffer acdk::lang::ReadWriteByteBuffer acdk::lang::ObjectBase acdk::lang::dmi::StdDispatch List of all members.

Detailed Description

CoreByteBuffer is a standard implementation for a FlexByteBuffer.


Public Member Functions

 CoreByteBuffer (int size)
 create a buffer on given size element values are undefined

 CoreByteBuffer (int size, int initCap, byte fillWith=0)
 create a byte buffer on given size and with initial capicity the elements are initialized with fillWith byte

 CoreByteBuffer (const VectorType &array)
 CoreByteBuffer (const VectorType &array, int start, int end=-1)
RObject clone ()
virtual bytebegin ()
 for performance reasons the ByteBuffer implementation should support this method

virtual byteend ()
 for performance reasons the ByteBuffer implementation should support this method

virtual bool supportNativeIterator ()
 begin() and end() are supported

virtual int length ()
byte get (int idx)
 returns the byte from given position May throw RuntimeException or ArrayIndexOutOfBoundsException

void set (int idx, byte b)
 set the byte at given position May throw RuntimeException or ArrayIndexOutOfBoundsException

virtual RReadByteBuffer createReadSlice (int start=0, int end=-1, SliceType sliceType=ShadowSlice)
 creates a slice of this ByteBuffer

virtual RWriteByteBuffer createWriteSlice (int start=0, int end=-1, SliceType sliceType=ShadowSlice)
 creates a slice of this ByteBuffer

virtual RReadWriteByteBuffer createReadWriteSlice (int start=0, int end=-1, SliceType sliceType=ShadowSlice)
 creates a slice of this ByteBuffer

virtual void append (byte t)
 append the given byte

virtual byte deleteAt (int idx)
 delete byte at given position and return it

virtual void insertAt (int idx, byte t)
 insert a given byte into given position

virtual int limit ()
 return -1 if this buffer has no write limit

virtual void resize (int size, byte fill=0)
 set size of buffer if new size > as current size use fill byte to fill new elements

virtual void ensureCapacity (int cap)
 for performance: ensure capacity

virtual void push (byte t)
 alias for the append(byte t) method

virtual byte pop ()
 removes the last byte and return it


Protected Types

typedef sys::core_vector<
byte
VectorType

Protected Attributes

VectorType _array

Member Typedef Documentation

typedef sys::core_vector<byte> acdk::lang::CoreByteBuffer::VectorType [protected]
 


Constructor & Destructor Documentation

acdk::lang::CoreByteBuffer::CoreByteBuffer int  size  )  [inline]
 

create a buffer on given size element values are undefined

acdk::lang::CoreByteBuffer::CoreByteBuffer int  size,
int  initCap,
byte  fillWith = 0
[inline]
 

create a byte buffer on given size and with initial capicity the elements are initialized with fillWith byte

acdk::lang::CoreByteBuffer::CoreByteBuffer const VectorType array  )  [inline]
 

acdk::lang::CoreByteBuffer::CoreByteBuffer const VectorType array,
int  start,
int  end = -1
 


Member Function Documentation

virtual void acdk::lang::CoreByteBuffer::append byte  t  )  [inline, virtual]
 

append the given byte

Implements acdk::lang::FlexByteBuffer.

virtual byte* acdk::lang::CoreByteBuffer::begin  )  [inline, virtual]
 

for performance reasons the ByteBuffer implementation should support this method

Reimplemented from acdk::lang::ByteBuffer.

RObject acdk::lang::CoreByteBuffer::clone  )  [inline, virtual]
 

See also:
serialized_clone

Reimplemented from acdk::lang::Object.

virtual RReadByteBuffer acdk::lang::CoreByteBuffer::createReadSlice int  start = 0,
int  end = -1,
SliceType  sliceType = ShadowSlice
[inline, virtual]
 

creates a slice of this ByteBuffer

Implements acdk::lang::ReadByteBuffer.

virtual RReadWriteByteBuffer acdk::lang::CoreByteBuffer::createReadWriteSlice int  start = 0,
int  end = -1,
SliceType  sliceType = ShadowSlice
[inline, virtual]
 

creates a slice of this ByteBuffer

Implements acdk::lang::ReadWriteByteBuffer.

virtual RWriteByteBuffer acdk::lang::CoreByteBuffer::createWriteSlice int  start = 0,
int  end = -1,
SliceType  sliceType = ShadowSlice
[inline, virtual]
 

creates a slice of this ByteBuffer

Implements acdk::lang::WriteByteBuffer.

virtual byte acdk::lang::CoreByteBuffer::deleteAt int  idx  )  [inline, virtual]
 

delete byte at given position and return it

Implements acdk::lang::FlexByteBuffer.

virtual byte* acdk::lang::CoreByteBuffer::end  )  [inline, virtual]
 

for performance reasons the ByteBuffer implementation should support this method

Reimplemented from acdk::lang::ByteBuffer.

virtual void acdk::lang::CoreByteBuffer::ensureCapacity int  cap  )  [inline, virtual]
 

for performance: ensure capacity

Implements acdk::lang::FlexByteBuffer.

byte acdk::lang::CoreByteBuffer::get int  idx  )  [inline, virtual]
 

returns the byte from given position May throw RuntimeException or ArrayIndexOutOfBoundsException

Implements acdk::lang::ReadByteBuffer.

virtual void acdk::lang::CoreByteBuffer::insertAt int  idx,
byte  t
[inline, virtual]
 

insert a given byte into given position

Implements acdk::lang::FlexByteBuffer.

virtual int acdk::lang::CoreByteBuffer::length  )  [inline, virtual]
 

Implements acdk::lang::ByteBuffer.

virtual int acdk::lang::CoreByteBuffer::limit  )  [inline, virtual]
 

return -1 if this buffer has no write limit

Implements acdk::lang::FlexByteBuffer.

virtual byte acdk::lang::CoreByteBuffer::pop  )  [inline, virtual]
 

removes the last byte and return it

Reimplemented from acdk::lang::FlexByteBuffer.

virtual void acdk::lang::CoreByteBuffer::push byte  t  )  [inline, virtual]
 

alias for the append(byte t) method

Reimplemented from acdk::lang::FlexByteBuffer.

virtual void acdk::lang::CoreByteBuffer::resize int  size,
byte  fill = 0
[inline, virtual]
 

set size of buffer if new size > as current size use fill byte to fill new elements

Implements acdk::lang::FlexByteBuffer.

void acdk::lang::CoreByteBuffer::set int  idx,
byte  b
[inline, virtual]
 

set the byte at given position May throw RuntimeException or ArrayIndexOutOfBoundsException

Implements acdk::lang::WriteByteBuffer.

virtual bool acdk::lang::CoreByteBuffer::supportNativeIterator  )  [inline, virtual]
 

begin() and end() are supported

Reimplemented from acdk::lang::ByteBuffer.


Member Data Documentation

VectorType acdk::lang::CoreByteBuffer::_array [protected]
 

 
Last modified 2005-05-08 18:32 by SYSTEM By Artefaktur, Ing. Bureau Kommer