33 explicit Chunk () =
default;
34 explicit Chunk ( ChunkReprPtr chunkRepr );
84 template<
typename AttributeStruct >
89 template<
typename AttributeStruct >
106 template<
typename AttributeStruct >
110 return m_chunkPtr->AddAttribute( type, (
const DataPtr)&content,
sizeof( AttributeStruct ) );
116 template<
typename AttributeStruct >
120 return AddAttribute( GetAttributeTypeID< AttributeStruct >(), content );
Chunk ParentChunk()
Get Chunks parent.
Definition: Chunk.cpp:59
Chunk FirstChild()
Gets first child chunk of this chunk.
Definition: Chunk.cpp:41
uint64 AttributeType
Definition: AttributeTypes.h:12
DataPack AccessData()
Returns chunk's data.
Definition: Chunk.cpp:95
Definition: DirectInputModule.cpp:11
Data pointer and it's size. This struct is used to transfer ownership of pointer. ...
Definition: AttributeTypes.h:34
Represents memory chunk in file.
Definition: Chunk.h:24
Main class for loading and writing HCF files.
Definition: HCF.h:34
DataUnderlayingType * DataPtr
Definition: AttributeTypes.h:14
bool operator==(Chunk other) const
Definition: Chunk.cpp:113
Plik zawiera definicje podstawowych typów zmiennych.
bool HasChildren()
Check if you should call FirstChild or AccessData.
Definition: Chunk.cpp:50
Attribute AddAttribute(AttributeType type, const DataPtr data, Size dataSize)
Adds attribute and fills it with data.
Definition: Chunk.cpp:68
Data pointer and it's size.
Definition: AttributeTypes.h:19
Chunk NextChunk()
Gets next chunk on the same nesting level.
Definition: Chunk.cpp:32
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.
Definition: Chunk.cpp:77
size_t Size
Definition: TypesDefinitions.h:35
Definition: Attribute.h:21
bool IsValid() const
Checks if you can use this attribute properly.
Definition: Chunk.cpp:104
Chunk CreateChunk()
Create child chunk.
Definition: Chunk.cpp:23
ChunkReprPtr m_chunkPtr
Definition: Chunk.h:29
DEFINE_PTR_TYPE(AttributeRepr)
DataUPack StealData()
Returns chunk's data and transfers ownership to caller.
Definition: Chunk.cpp:86