Class: etk::Buffer


Synopsis:

+                       Buffer            (int32_t _count);
+ Buffer (const etk::Buffer & _obj);
+ ~Buffer (void);
+ bool dumpIn (etk::FSNode & _file);
+ bool dumpFrom (etk::FSNode & _file);
+ etk::Buffer & operator= (const etk::Buffer & _obj);
+ int8_t operator[] (int32_t _pos);
+ int8_t & get (int32_t _pos);
+ int32_t get (int32_t _pos,
UChar & _value,
charset_te _charset);
+ std::vector<int8_t> get (int32_t _pos,
int32_t _nbElement);
+ void push_back (const int8_t & _item);
+ void insert (int32_t _pos,
const int8_t & _item);
+ void insert (int32_t _pos,
std::vector<int8_t> & _items);
+ void insert (int32_t _pos,
int8_t * _items,
int32_t _nbElement);
+ void replace (int32_t _pos,
const int8_t & _item);
+ void replace (int32_t _pos,
int32_t _nbRemoveElement,
std::vector<int8_t> & _items);
+ void replace (int32_t _pos,
int32_t _nbRemoveElement,
int8_t * _items,
int32_t _nbElement);
+ void remove (int32_t _pos,
int32_t _nbRemoveElement);
+ void pop_back (void);
+ void clear (void);
+ int8_t & getDirect (int32_t _realElementPosition);
+ int32_t size (void);
- void changeAllocation (int32_t _newSize);
- bool gapMove (int32_t _pos);
- bool gapResize (int32_t _pos,
int32_t _newGapLen);
- int32_t gapSize (void);
- void gapCheckMaxSize (void);

Description:

/** * @brief Buffer classes. Designed for access o */

Detail:

etk::Buffer ()

Buffer(int32_t _count);

Create an empty vector


etk::Buffer ()

Buffer(const etk::Buffer & _obj);

Re-copy constructor (copy all needed data)


etk::~Buffer ()

~Buffer(void);

Destructor of the current Class


dumpIn ()

bool dumpIn(etk::FSNode & _file);

Save in the current file open


dumpFrom ()

bool dumpFrom(etk::FSNode & _file);

Load in the current file open


operator= ()

etk::Buffer & operator=(const etk::Buffer & _obj);

Re-copy operator


operator[] ()

int8_t operator[](int32_t _pos);

Operator [] : Get the data at the requested position (gap abstraction done).


get ()

int8_t & get(int32_t _pos);

Get a current element in the vector


get ()

int32_t get(int32_t _pos,
            UChar & _value,
            charset_te _charset);

Get a current element in the vector


get ()

std::vector<int8_t> get(int32_t _pos,
                        int32_t _nbElement);

Get elements from a specific position.


push_back ()

void push_back(const int8_t & _item);

Add at the Last position of the Vector


insert ()

void insert(int32_t _pos,
            const int8_t & _item);

Insert One item at the specify position.


insert ()

void insert(int32_t _pos,
            std::vector<int8_t> & _items);

Insert data in the buffer


insert ()

void insert(int32_t _pos,
            int8_t * _items,
            int32_t _nbElement);

Insert data in the buffer


replace ()

void replace(int32_t _pos,
             const int8_t & _item);

Replace one element in the buffer


replace ()

void replace(int32_t _pos,
             int32_t _nbRemoveElement,
             std::vector<int8_t> & _items);

Replace specified data.


replace ()

void replace(int32_t _pos,
             int32_t _nbRemoveElement,
             int8_t * _items,
             int32_t _nbElement);

Replace specified data.


remove ()

void remove(int32_t _pos,
            int32_t _nbRemoveElement);

Remove specific data in the buffer.


pop_back ()

void pop_back(void);

Remove the last element of the Buffer.


clear ()

void clear(void);

Clean all the data in the buffer.


getDirect ()

int8_t & getDirect(int32_t _realElementPosition);

Get a current element in the vector (iterator system)


size ()

int32_t size(void);

Get the number of element in the vector


changeAllocation ()

void changeAllocation(int32_t _newSize);

Change the current allocation to the corect one (depend on the current size)


gapMove ()

bool gapMove(int32_t _pos);

Move the current gap at an other position


gapResize ()

bool gapResize(int32_t _pos,
               int32_t _newGapLen);

Change The gap position and size


gapSize ()

int32_t gapSize(void);

Get the current gap size.


gapCheckMaxSize ()

void gapCheckMaxSize(void);

Control if the writing gap is not too big (automatic resize the buffer).