akregator
c4_Bytes Class Reference
#include <mk4.h>
Detailed Description
Generic data buffer, with optional automatic clean up.These objects are used to pass around untyped data without concern about clean-up. They know whether the bytes need to be de-allocated when these objects go out of scope. Small amounts of data are stored in the object.
Objects of this class are used a lot within Metakit to manipulate its own data items generically. The c4_BytesProp class allows storing binary data explicitly in a file. If such data files must be portable, then the application itself must define a generic format to deal with byte order.
How to store an object in binary form in a row (this is not portable):
struct MyStruct { ... }; MyStruct something; c4_BytesProp pData ("Data"); c4_Row row; pData (row) = c4_Bytes (&something, sizeof something);
Definition at line 497 of file mk4.h.
Public Member Functions | |
| c4_Bytes (const c4_Bytes &) | |
| c4_Bytes (const void *, int, bool) | |
| c4_Bytes (const void *, int) | |
| c4_Bytes () | |
| const t4_byte * | Contents () const |
| c4_Bytes & | operator= (const c4_Bytes &) |
| t4_byte * | SetBuffer (int) |
| t4_byte * | SetBufferClear (int) |
| int | Size () const |
| void | Swap (c4_Bytes &) |
| ~c4_Bytes () | |
Friends | |
| bool | operator!= (const c4_Bytes &, const c4_Bytes &) |
| bool | operator== (const c4_Bytes &, const c4_Bytes &) |
Constructor & Destructor Documentation
| c4_Bytes::c4_Bytes | ( | ) |
| c4_Bytes::c4_Bytes | ( | const void * | , | |
| int | ||||
| ) |
| c4_Bytes::c4_Bytes | ( | const void * | buf_, | |
| int | len_, | |||
| bool | copy_ | |||
| ) |
| c4_Bytes::c4_Bytes | ( | const c4_Bytes & | src_ | ) |
| c4_Bytes::~c4_Bytes | ( | ) |
Member Function Documentation
| const t4_byte* c4_Bytes::Contents | ( | ) | const |
| t4_byte * c4_Bytes::SetBuffer | ( | int | length_ | ) |
| t4_byte * c4_Bytes::SetBufferClear | ( | int | length_ | ) |
| int c4_Bytes::Size | ( | ) | const |
| void c4_Bytes::Swap | ( | c4_Bytes & | bytes_ | ) |
Friends And Related Function Documentation
Member Data Documentation
| double c4_Bytes::_aligner |
The documentation for this class was generated from the following files:
KDE 4.2 API Reference