[gme-users] creating instance of a model
Akos Ledeczi
akos.ledeczi at vanderbilt.edu
Mon Jun 14 10:47:42 CDT 2004
Both CBuilderFolder and CBuilderModel have the following functions:
CBuilderModel *CreateNewModel(CString kindName,
CBuilderModel* baseType = NULL,
bool instance = true);
CBuilderAtom *CreateNewAtom(CString kindName,
CBuilderAtom* baseType = NULL,
bool instance = true);
CBuilderModelReference *CreateNewModelReference(CString kindName,
CBuilderObject* refTo);
CBuilderReference *CreateNewReference(CString kindName,
CBuilderObject* refTo,
CBuilderReference* baseType = NULL,
bool instance = true);
CBuilderSet *CreateNewSet(CString kindName,
CBuilderSet* baseType = NULL,
bool instance = true);
If the baseType is not NULL than they'll create derived objects. If
instance is true then intances, oetherwise subtypes.
But there may be a misunderstanding here. If your paradigm has a kind
"Car", you can create models in your project that have "Car" as their
kind. They will become types (archetypes). Then you can create subtypes
or instances of these objects. You cannot create an instance of a Car
from scratch. This may just be a terminology issue though...
Akos
Perdikis Dimitris wrote:
> Hi,
> I'm currently working on an interpreter. I want this interpreter to
> create instances of each model in the project. Let's assume that my
> modeling paradigm has a model kind called "Car". I want for each "Car"
> model in my modeling project to create an instance of "Car". But so far
> I haven't found any function of the "CBuilderModel" class to perform
> this operation. Does anyone have any idea on how this can be done?
>
> Thanks in advance,
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> gme-users mailing list
> gme-users at list.isis.vanderbilt.edu
> http://list.isis.vanderbilt.edu/mailman/listinfo/gme-users
More information about the gme-users
mailing list