|
Sleeping Wombat GUI
0.100
swGUI
|
Represents memory chunk in file. More...
#include <Chunk.h>
Public Member Functions | |
| Chunk ()=default | |
| Chunk (ChunkReprPtr chunkRepr) | |
| ~Chunk ()=default | |
| bool | IsValid () const |
| Checks if you can use this attribute properly. More... | |
| bool | operator== (Chunk other) const |
Chunks manipulation | |
| Chunk | CreateChunk () |
| Create child chunk. More... | |
| Chunk | NextChunk () |
| Gets next chunk on the same nesting level. More... | |
| Chunk | FirstChild () |
| Gets first child chunk of this chunk. More... | |
| bool | HasChildren () |
| Check if you should call FirstChild or AccessData. More... | |
| Chunk | ParentChunk () |
| Get Chunks parent. More... | |
Data access | |
| bool | Fill (const DataPtr data, Size dataSize) |
| Fills chunk with data. You can fill only chunks without children. One filled chunk, can't add children anymore. More... | |
| DataUPack | StealData () |
| Returns chunk's data and transfers ownership to caller. More... | |
| DataPack | AccessData () |
| Returns chunk's data. More... | |
Attributes manipulation | |
| Attribute | AddAttribute (AttributeType type, const DataPtr data, Size dataSize) |
| Adds attribute and fills it with data. More... | |
| template<typename AttributeStruct > | |
| Attribute | AddAttribute (AttributeType type, const AttributeStruct &content) |
| Adds attribute and creates content from POD structure. More... | |
| template<typename AttributeStruct > | |
| Attribute | AddAttribute (const AttributeStruct &content) |
| Adds attribute and creates content from POD structure. Attribute type will be taken from struct. Specialize GetAttributeTypeID template. More... | |
Private Member Functions | |
| FRIEND_CLASS_TESTER (HCF) | |
Private Attributes | |
| ChunkReprPtr | m_chunkPtr |
Represents memory chunk in file.
Chunk can consist of nested chunks or it can contain data.
|
explicitdefault |
|
explicit |
|
default |
| DataPack sw::Chunk::AccessData | ( | ) |
Returns chunk's data.
| Attribute sw::Chunk::AddAttribute | ( | AttributeType | type, |
| const DataPtr | data, | ||
| Size | dataSize | ||
| ) |
Adds attribute and fills it with data.
|
inline |
Adds attribute and creates content from POD structure.
| [in] | type | You must provide type of attribute by yourself. Use second spetialization if struct defines attribute type getter. |
|
inline |
Adds attribute and creates content from POD structure. Attribute type will be taken from struct. Specialize GetAttributeTypeID template.
| Chunk sw::Chunk::CreateChunk | ( | ) |
Create child chunk.
Fills chunk with data. You can fill only chunks without children. One filled chunk, can't add children anymore.
| Chunk sw::Chunk::FirstChild | ( | ) |
Gets first child chunk of this chunk.
|
private |
| bool sw::Chunk::HasChildren | ( | ) |
Check if you should call FirstChild or AccessData.
| bool sw::Chunk::IsValid | ( | ) | const |
Checks if you can use this attribute properly.
| Chunk sw::Chunk::NextChunk | ( | ) |
Gets next chunk on the same nesting level.
| bool sw::Chunk::operator== | ( | Chunk | other | ) | const |
| Chunk sw::Chunk::ParentChunk | ( | ) |
Get Chunks parent.
| DataUPack sw::Chunk::StealData | ( | ) |
Returns chunk's data and transfers ownership to caller.
|
private |
1.8.9.1