Kzb file loader.
More...
#include <kanzi/core.ui/kzb/kzb_file.hpp>
Kzb file loader.
Stores all kzb information. This includes dictionaries for strings, files, property types, metaclasses. Resource manager refers to the KzbFile dictionaries when loading resources. Internally uses KzbMemoryParser to parse the values from files.
◆ PropertyContainer
Container type for property values.
◆ SizeType
Type specifying maximum size of files. Currently at 4Gb.
◆ KzbFile()
kanzi::KzbFile::KzbFile |
( |
Domain * |
domain, |
|
|
unique_ptr< File > |
file |
|
) |
| |
|
explicit |
Constructor.
- Parameters
-
domain | The UI domain. |
file | File to read from. |
◆ ~KzbFile()
kanzi::KzbFile::~KzbFile |
( |
| ) |
|
◆ open()
Open a file by path.
Throws an error if file is not found.
- Parameters
-
- Returns
- File opened.
◆ tryOpen()
Tries to open file by path.
Silently returns an empty unique pointer if file is not found.
- Parameters
-
- Returns
- File opened.
◆ loadResource()
Load a resource identified by path.
- Parameters
-
- Returns
- Resource loaded.
◆ getLoadTask()
Gets load task for given path.
- Parameters
-
- Returns
- Load task created.
◆ getDomain()
Domain* kanzi::KzbFile::getDomain |
( |
| ) |
const |
◆ getMetaclass()
const Metaclass* kanzi::KzbFile::getMetaclass |
( |
size_t |
index | ) |
const |
Gets metaclass by index.
- Parameters
-
- Returns
- Metaclass.
◆ getPropertyType()
Gets property type by index.
- Parameters
-
index | Index of property type. |
- Returns
- Property type.
◆ getString()
string_view kanzi::KzbFile::getString |
( |
size_t |
index | ) |
const |
Gets string from string dictionary by index.
- Parameters
-
- Returns
- View into string.
◆ getProjectName()
string kanzi::KzbFile::getProjectName |
( |
| ) |
const |
Gets project name.
Project name is the base filename part of the URL identifying a kzb file. This corresponds to what is called a 'hostname' in URLs. Kzb files loaded are identified by this name. Multiple kzb files can correspond to the same project name in the ResourceManager.
◆ getColorWorkflow()
Gets the color workflow The Color workflow that is used to generate a kzb file.
◆ collectResourceUrls()
Collects resource URLs in for a kzb file.
- Parameters
-
urls | List to store URLs to. |
◆ collectFileNames()
vector<string> kanzi::KzbFile::collectFileNames |
( |
| ) |
const |
Collects all file names in a kzb file.
- Returns
- Vector of file names.
◆ KzbFormatVersionMajor
const uint16_t kanzi::KzbFile::KzbFormatVersionMajor |
|
static |
The version number for the current kzb format.
Increased when the format changes. Major versions represent mainline (master branch) changes. Minor versions represent changes done on a specific branch. Version history:
- 0.0. The initial version. Used in Kanzi 3.6.1.
- 1.0. Introduced new versioning format that removes the Kanzi tool version from the kzb. Used in Kanzi 3.6.2.
- 2.0. Added multisample samples to render target textures. Cubemap images are flipped already in Kanzi Studio.
- 3.0. Added simple render target mode toggle to render target textures. Used in Kanzi 3.6.4.
- 4.0. Quaternion field order and Euler to quaternion algorithm changed.
- 5.0. Added enum to bindings specifying whether they are value sources or property modifiers.
- 6.0. Added To Source bindings. Changed order of fields in binding data to support To Source bindings.
- 7.0. Added render pass prefabs and render pass templates.
- 8.0. Reordered the MessageRouting enum, removed everything related to MessageRoutingDirect from Kanzi Engine.
- 9.0. Storing resource dictionary text resource strings locally.
- 10.0 Support for deferred loading of state node component templates.
- 11.0. Font file converted to FontFile. Font Family resource introduced.
- 12.0. Added bindings and changed uniform representation in material types. Changed precedence to target type in bindings, added render value binding target.
- 13.0. Added range binding processors.
- 14.0. Added color workflow.
- 15.0. Added Data Triggers.
- 16.0. Added data type field for shader uniforms.
- 17.0. Added binding texture access functions.
- 18.0. Consolidated Face To Camera properties.
- 19.0. Added parametric primitives.
- 20.0. Added stride to exported vertex data with necessary padding.
- 21.0. Remove LightEnabled property.
- 22.0. Added arguments to Write Log Action.
- 23.0. Added geometry, tessellation control, and tessellation evaluation shaders.
◆ KzbFormatVersionMinor
const uint16_t kanzi::KzbFile::KzbFormatVersionMinor |
|
static |
The documentation for this class was generated from the following file: