GaCodeValuesBuffer class also keeps track of current position for filling the buffer, but interpretation of it is left to users.
More...
#include <source/RepresentationInterfaces.h>
Public Member Functions | |
| GaCodeValuesBuffer (int size) | |
| This constructor allocates memory for buffer. | |
| ~GaCodeValuesBuffer () | |
| The destructor frees memory used by the buffer. | |
| void GACALL | Move (int delta) |
| Move method moves current position for filling the buffer. | |
| void *GACALL | GetBuffer () const |
| This method is not thread safe. | |
| int GACALL | GetSize () const |
| This method is not thread safe. | |
| int GACALL | GetPosition () const |
| This method is not thread safe. | |
Private Attributes | |
| void * | _buffer |
| Pointer to memory which is allocated for the buffer. | |
| int | _size |
| Size in bytes of allocated memory. | |
| int | _currentPosition |
| This attribute keeps track of current position for filling the buffer. | |
GaCodeValuesBuffer class also keeps track of current position for filling the buffer, but interpretation of it is left to users.
This class has no built-in synchronizator, so LOCK_OBJECT and LOCK_THIS_OBJECT macros cannot be used with instances of this class. No public or private methods are thread-safe.
| Chromosome::Representation::GaCodeValuesBuffer::GaCodeValuesBuffer | ( | int | size | ) | [inline] |
This constructor allocates memory for buffer.
| size | size of the buffer |
| Chromosome::Representation::GaCodeValuesBuffer::~GaCodeValuesBuffer | ( | ) | [inline] |
The destructor frees memory used by the buffer.
| void GACALL Chromosome::Representation::GaCodeValuesBuffer::Move | ( | int | delta | ) | [inline] |
Move method moves current position for filling the buffer.
This method is not thread-safe.
| delta | value by which the current position is moved. This parameter can be positive or negative. |
| void* GACALL Chromosome::Representation::GaCodeValuesBuffer::GetBuffer | ( | ) | const [inline] |
This method is not thread safe.
| int GACALL Chromosome::Representation::GaCodeValuesBuffer::GetSize | ( | ) | const [inline] |
This method is not thread safe.
| int GACALL Chromosome::Representation::GaCodeValuesBuffer::GetPosition | ( | ) | const [inline] |
This method is not thread safe.
void* Chromosome::Representation::GaCodeValuesBuffer::_buffer [private] |
Pointer to memory which is allocated for the buffer.
int Chromosome::Representation::GaCodeValuesBuffer::_size [private] |
Size in bytes of allocated memory.
This attribute keeps track of current position for filling the buffer.