|
Sleeping Wombat GUI
0.100
swGUI
|
Main class for loading and writing HCF files. More...
#include <HCF.h>
Public Types | |
| enum | WriteMode : uint8 { DirectToFile, Indirect } |
Public Member Functions | |
| HCF () | |
| ~HCF ()=default | |
| Chunk | GetRootChunk () |
| Chunk | CreateRootChunk () |
Loading and saving | |
| bool | LoadFile (const filesystem::Path &filePath, bool readOnly) |
| bool | Load (DataPtr data, Size size) |
| bool | WriteFile (const filesystem::Path &filePath) |
| Saves content to file. More... | |
| bool | OpenFile (const filesystem::Path &filePath, WriteMode mode) |
| Opens file for writing. This functions allows to use WriteMode::DirectToFile. If you use Indirect mode, there's no need to call this function. 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... | |
Static Public Attributes | |
| static const bool | READ_ONLY = true |
| static const bool | READ_WRITE = false |
| static const Size | UserDefinedAttributes = 0xFFFFFFFFFFFF0000 |
Private Member Functions | |
| FRIEND_CLASS_TESTER (HCF) | |
Private Attributes | |
| ImplHCF | m_impl |
Main class for loading and writing HCF files.
|
explicit |
|
default |
| Attribute sw::HCF::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::HCF::CreateRootChunk | ( | ) |
|
private |
| Chunk sw::HCF::GetRootChunk | ( | ) |
| bool sw::HCF::LoadFile | ( | const filesystem::Path & | filePath, |
| bool | readOnly | ||
| ) |
| bool sw::HCF::OpenFile | ( | const filesystem::Path & | filePath, |
| WriteMode | mode | ||
| ) |
Opens file for writing. This functions allows to use WriteMode::DirectToFile. If you use Indirect mode, there's no need to call this function.
| bool sw::HCF::WriteFile | ( | const filesystem::Path & | filePath | ) |
Saves content to file.
|
private |
|
static |
|
static |
|
static |
1.8.9.1