27 class ChunkRepr :
public std::enable_shared_from_this< ChunkRepr >
54 static ChunkReprPtr
Create (
ImplHCF* hcf, ChunkReprPtr parent );
bool CanLoadData() const
Definition: ChunkRepr.cpp:300
void AddNextChunk(ChunkReprPtr &newChunk)
Definition: ChunkRepr.cpp:221
Size m_absolutOffset
Offset from beginning of file.
Definition: ChunkRepr.h:36
ImplHCF * m_hcf
Definition: ChunkRepr.h:32
uint64 AttributeType
Definition: AttributeTypes.h:12
Definition: ChunkRepr.h:27
ChunkReprPtr m_childChunk
First child chunk.
Definition: ChunkRepr.h:40
Attribute AddAttribute(AttributeType type, const DataPtr data, Size dataSize)
Definition: ChunkRepr.cpp:137
Definition: DirectInputModule.cpp:11
ChunkReprWPtr m_parent
Parent chunk.
Definition: ChunkRepr.h:38
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
static ChunkReprPtr Create(ImplHCF *hcf, ChunkReprPtr parent)
Definition: ChunkRepr.cpp:50
DataUnderlayingType * DataPtr
Definition: AttributeTypes.h:14
ChunkHeader m_header
Definition: ChunkRepr.h:34
DataUPack m_data
Contains chunk's data.
Definition: ChunkRepr.h:44
Plik zawiera definicje podstawowych typów zmiennych.
bool CanCreateChunk() const
Definition: ChunkRepr.cpp:270
bool CheckValidity() const
Definition: ChunkRepr.cpp:235
Chunk ParentChunk()
Get Chunks parent.
Definition: ChunkRepr.cpp:130
void WriteHeader(Size revertOffset)
Definition: ChunkRepr.cpp:324
static ChunkReprPtr CreateFromFile(ImplHCF *hcf, ChunkReprPtr parent, Size fileOffset)
Definition: ChunkRepr.cpp:43
ChunkRepr(ImplHCF *hcf, ChunkReprPtr &parent)
Write only constructor.
Definition: ChunkRepr.cpp:19
DataPack AccessData()
Returns chunk's data.
Definition: ChunkRepr.cpp:205
Data pointer and it's size.
Definition: AttributeTypes.h:19
bool CanAddAttribute() const
Definition: ChunkRepr.cpp:254
size_t Size
Definition: TypesDefinitions.h:35
Definition: Attribute.h:21
ChunkReprPtr m_nextChunk
Next chunk on the same nesting level.
Definition: ChunkRepr.h:39
DEFINE_WPTR_TYPE(AttributeRepr)
DataUPack LoadData()
Definition: ChunkRepr.cpp:358
void UpdateHeader()
Updates header in file using current info from m_header field.
Definition: ChunkRepr.cpp:350
void LoadHeader(Size revertOffset)
Definition: ChunkRepr.cpp:337
DataUPack StealData()
Returns chunk's data and transfers ownership to caller.
Definition: ChunkRepr.cpp:193
DEFINE_PTR_TYPE(AttributeRepr)
bool HasChildren() const
Check if you should call FirstChild or AccessData.
Definition: ChunkRepr.cpp:123
Chunk FirstChild()
Gets first child chunk of this chunk.
Definition: ChunkRepr.cpp:101
Chunk CreateChunk()
Definition: ChunkRepr.cpp:58
bool Fill(const DataPtr data, Size dataSize)
Definition: ChunkRepr.cpp:155
bool CanFillData() const
Definition: ChunkRepr.cpp:285
AttributeReprPtr m_firstAttrib
Attributes list.
Definition: ChunkRepr.h:42
Chunk NextChunk()
Gets next chunk on the same nesting level.
Definition: ChunkRepr.cpp:82