#include <gobjconfig.h>
#include <gobj/context.h>
#include <gobj/id.h>
#include <gobj/model.h>
#include <gobj/stream.h>
#include <stdio.h>
Functions | |
void | Gj_modelmgr_new (Gj_Ctx* ctx) |
Create a new model manager. | |
int | Gj_modelmgr_create (Gj_Ctx* ctx, Gj_Stream* stream) |
Create a model manager from a stream. More... | |
int | Gj_modelmgr_write (Gj_Ctx* ctx, Gj_Stream* stream) |
Write the model manager to a stream. More... | |
int | Gj_modelmgr_delete (Gj_Ctx* ctx) |
Destroy the model manager. More... | |
int | Gj_modelmgr_writeModels (Gj_Ctx* ctx, Gj_Stream* stream) |
Write the model database to the given stream. More... | |
int | Gj_modelmgr_readModels (Gj_Ctx* ctx, Gj_Stream* stream) |
Read model database entries form the given stream. More... | |
int | Gj_modelmgr_clearModels (Gj_Ctx* ctx) |
Clear the model database. More... | |
Gj_Id* | Gj_modelmgr_getModelId (Gj_Ctx* ctx, Gj_Path* name) |
Get the model id of a model given by its path. More... | |
Gj_Model* | Gj_modelmgr_getModel (Gj_Ctx* ctx, Gj_Id* id) |
Get a model ptr for a given id. More... | |
void | Gj_modelmgr_releaseModel (Gj_Ctx* ctx, Gj_Model* model) |
Release a model. | |
int | Gj_modelmgr_registerModel (Gj_Ctx* ctx, Gj_Model* model) |
Register a new model. More... | |
Gj_Model* | Gj_modelmgr_unregisterModel (Gj_Ctx* ctx, Gj_Id* id) |
Unregister a model. More... | |
void | Gj_modelmgr_createNamespace (Gj_Ctx* ctx, char* name) |
Create a new namespace. More... | |
void | Gj_modelmgr_deleteNamespace (Gj_Ctx* ctx, char* name) |
Delete a namespace. More... | |
void | Gj_modelmgr_dump (Gj_Ctx* ctx, FILE* stream) |
Print out information of this modelmgr to the given stream. |
|
Create a model manager from a stream.
|
|
Write the model manager to a stream.
|
|
Destroy the model manager.
|
|
Write the model database to the given stream.
|
|
Read model database entries form the given stream. Read models are added to the database.
|
|
Clear the model database.
|
|
Get the model id of a model given by its path. The returned id is STILL OWNED by the manager.
|
|
Get a model ptr for a given id. The returned model is STILL OWNED by the manager.
|
|
Register a new model. The model is NOT DUPLICATED, the modelmgr overtakes the OWNERSHIP of it.
|
|
Unregister a model. The model itsself will not be deleted, rather a pointer to it is returned.
|
|
Create a new namespace. NOT SUPPORTED YET. |
|
Delete a namespace. NOT SUPPORTED YET. |