|
rigProject 0.1.1
RigKit pack API - rigProject
|
Document/page data + JSON document load/save systems. More...
#include <rigProject/src/rigProject.h>
Public Member Functions | |
| void | setFileExtension (std::string ext) |
| Preferred document file extension (with or without leading dot). | |
| const std::string & | fileExtension () const |
| Normalized extension including leading dot (default .rig). | |
| std::string | documentPath (const std::string &stemOrPath) const |
Build a path using the preferred extension when stemOrPath has none. | |
| void | requestSave (const std::string &path={}) |
| Queue a save on the next Update. | |
| void | requestLoad (const std::string &path) |
| Queue a load on the next Update. | |
| void | registerSerializer (project::ComponentSerializer serializer) |
| Register a component codec owned by another pack (or the app). | |
Document/page data + JSON document load/save systems.
Depends on rigComponent for registration order. Default file extension is .rig (override with setFileExtension, e.g. "rigdoc"). Reads and writes the JSON document. A .rigz is a ZIP with one .rig at the archive root plus data/, and data/ may contain further .rig files. openPackage / writeRigz handle that ZIP.
| std::string rigkit::rigProject::documentPath | ( | const std::string & | stemOrPath | ) | const |
Build a path using the preferred extension when stemOrPath has none.
| stemOrPath | Absolute/relative path or bare stem (show to show.rig). |
| void rigkit::rigProject::registerSerializer | ( | project::ComponentSerializer | serializer | ) |
Register a component codec owned by another pack (or the app).
Prefer project::addSerializer<T>(...) then this, or pass the filled ComponentSerializer. Owning packs register their portable PODs here; this pack only walks the registry on save/load.
| void rigkit::rigProject::requestLoad | ( | const std::string & | path | ) |
Queue a load on the next Update.
| path | Source path (required). Bare stems get fileExtension() appended. |
| void rigkit::rigProject::requestSave | ( | const std::string & | path = {} | ) |
Queue a save on the next Update.
| path | Target path; empty uses CProject::path when set. Bare stems get fileExtension() appended. |
| void rigkit::rigProject::setFileExtension | ( | std::string | ext | ) |
Preferred document file extension (with or without leading dot).
| ext | e.g. "rig", ".rig", "rigdoc". Empty resets to .rig. |