#include "gobj/model.h"
#include "gobj/errors.h"
#include "gobj/view.h"
#include "gobj/nativemgr.h"
#include "gobj/nativetypes.h"
#include "gobj/lang.h"
#include "gobj/utils.h"
#include "gobj/ids.h"
Functions | |
Gj_Model* | Gj_model_new (Gj_Ctx* ctx, char* name, Gj_Id* id, Gj_Model* hardinheritance) |
Create a new model. More... | |
Gj_Model* | Gj_model_create (Gj_Ctx* ctx, Gj_Stream* stream) |
Create a model form a given stream. More... | |
int | Gj_model_write (Gj_Ctx* ctx, Gj_Model* model, Gj_Stream* stream) |
Write a model to a given stream. More... | |
int | Gj_model_delete (Gj_Ctx* ctx, Gj_Model* ptr) |
Delete a model. More... | |
int | Gj_model_register (Gj_Ctx* ctx, Gj_Model* model) |
Register a model. More... | |
int | Gj_model_finish (Gj_Ctx* ctx, Gj_Model* model) |
Finish a model. More... | |
Gj_Bool | Gj_model_isRegisterd (Gj_Model* model) |
Gj_Bool | Gj_model_isFinished (Gj_Model* model) |
Check whether a model has been finished. | |
Gj_Bool | Gj_model_hasFixedProperties (Gj_Model* model) |
Check whether the model has fixed properties. | |
Gj_Id* | Gj_model_getId (Gj_Ctx* ctx, Gj_Model* model) |
Get the id of the model. More... | |
char* | Gj_model_getName (Gj_Model* model) |
Get the name of the model. More... | |
void | Gj_model_instanceCreated (Gj_Model* model) |
Say to the model that it is being instantiated. | |
void | Gj_model_instanceDeleted (Gj_Model* model) |
Say to the model that a instance of it is being deleted. | |
int | Gj_model_getPropertyCount (Gj_Ctx* ctx, Gj_Model* model) |
Return the property count (only used for models with fixed properties). More... | |
int | Gj_model_getPropertyName (Gj_Ctx* ctx, Gj_Model* model, int index, char** name) |
Get the name of a property given by its index. More... | |
Gj_Id* | Gj_model_getPropertyType (Gj_Ctx* ctx, Gj_Model* model, int index) |
Get the type of a property given by its index (only used for models with fixed properties). More... | |
int | Gj_model_addProperty (Gj_Ctx* ctx, Gj_Model* model, char* name, Gj_Id* type, Gj_Object* std) |
Add a property (only used for models with fixed properties). More... | |
int | gj_model_fillProperties (Gj_Ctx* ctx, Gj_Model* model, Gj_Object** list) |
Fill the given property list with duplicates of the standard values. More... | |
int | Gj_model_addView (Gj_Ctx* ctx, Gj_Model* model, Gj_View* view) |
Add a view. More... | |
int | Gj_model_deleteViews (Gj_Ctx* ctx, Gj_Model* model) |
Delete all views. More... | |
int | Gj_model_inherit (Gj_Ctx* ctx, Gj_Model* model, Gj_Id* id) |
Add an interheritance entry. | |
int | Gj_model_isCompatible (Gj_Ctx* ctx, Gj_Model* model, Gj_Id* type, Gj_Bool* flag) |
Check if the model is compatible with the given type (that means it is inherited from the type). More... | |
int | Gj_model_setChildType (Gj_Ctx* ctx, Gj_Model* model, Gj_Id* type) |
Set the child type (only used for models with non-fixed properties). More... | |
Gj_Id* | Gj_model_getChildType (Gj_Ctx* ctx, Gj_Model* model) |
Get the child type (only used for models with non-fixed properties). More... | |
int | Gj_model_setVaccessfunc (Gj_Ctx* ctx, Gj_Model* model, Gj_Path* vaccessfunc) |
Set the "virtual child access"-function. More... | |
int | Gj_model_setNativetype (Gj_Ctx* ctx, Gj_Model* model, Gj_Nativetype type) |
Set the native type. More... | |
Gj_Nativetype | Gj_model_getNativetype (Gj_Model* model) |
Get the native type. | |
Gj_Id* | Gj_model_getViewId (Gj_Ctx* ctx, Gj_Model* model, char* name) |
Get the id of the view given by its name. More... | |
Gj_View* | Gj_model_getView (Gj_Ctx* ctx, Gj_Model* model, Gj_Id* id) |
Get the pointer of the view given by its id. More... | |
Gj_View* | Gj_model_getConverter (Gj_Ctx* ctx, Gj_Model* model, Gj_Id* type) |
Get the pointer of a view able to convert this model to the given type (without parameters). More... | |
Gj_View* | Gj_model_nextView (Gj_Model* model, void** ptr) |
Get the next element of the view walkthrough. More... | |
int | Gj_model_getPropertyNumber (Gj_Ctx* ctx, Gj_Model* model, char* name) |
Get the number of a property given by its name (only used for models with fixed properties). More... |
|
Create a new model.
If
|
|
Create a model form a given stream.
|
|
Write a model to a given stream.
|
|
Delete a model. Does not unregister it.
|
|
Register a model.
The model is not being registered to any modelmgr (do this via
|
|
Finish a model. The model cannot be changed anymore and can now be exported.
|
|
Get the id of the model. The returned id is STILL OWNED by the model.
|
|
Get the name of the model. The returned name is STILL OWNED by the model. |
|
Return the property count (only used for models with fixed properties).
|
|
Get the name of a property given by its index. The name is still OWNED by the model.
|
|
Get the type of a property given by its index (only used for models with fixed properties).
|
|
Add a property (only used for models with fixed properties).
|
|
Fill the given property list with duplicates of the standard values.
For internal use only. |
|
Add a view.
This functions may be used after the
|
|
Delete all views.
|
|
Check if the model is compatible with the given type (that means it is inherited from the type).
|
|
Set the child type (only used for models with non-fixed properties).
|
|
Get the child type (only used for models with non-fixed properties). The returned id is STILL OWNED by the model.
|
|
Set the "virtual child access"-function. The path structure is NOT DUPLICATED, the model will overtake the OWNERSHIP of the path.
|
|
Set the native type.
|
|
Get the id of the view given by its name. The returned id is STILL OWNED by the model.
|
|
Get the pointer of the view given by its id. The returned view is STILL OWNED by the model.
|
|
Get the pointer of a view able to convert this model to the given type (without parameters). The returned view is STILL OWNED by the model.
|
|
Get the next element of the view walkthrough.
If |
|
Get the number of a property given by its name (only used for models with fixed properties).
|