[gme-users] Request for method addition to CBuilderModel

Peter Volgyesi peter.volgyesi at vanderbilt.edu
Tue Apr 13 19:34:11 CDT 2004


I've modified the following methods:

CBuilderFolder::CreateNewModel()
CBuilderFolder::CreateNewAtom()
CBuilderFolder::CreateNewReference()
CBuilderFolder::CreateNewSet()

CBuilderModel::CreateNewModel()
CBuilderModel::CreateNewAtom()
CBuilderModel::CreateNewReference()
CBuilderModel::CreateNewSet()

All these methods expect two optional parameters now: the first is a pointer
to the base type you would like to use, the second is a boolean value
whether you want to create a subtype or an instance.
By default the base type parameter is null, which results in the original
behaviour.

--
peter

> -----Original Message-----
> From: gme-users-bounces at list.isis.vanderbilt.edu 
> [mailto:gme-users-bounces at list.isis.vanderbilt.edu] On Behalf 
> Of Sandeep Neema
> Sent: Tuesday, April 13, 2004 6:06 PM
> To: gme-users
> Subject: FW: [gme-users] Request for method addition to CBuilderModel
> 
> Peter, Zoltan, and other BON developers:
> 
> Please see Jeff's earlier post. For PCES work Jeff's team 
> needs a way to create model-instances thru the BON interface. 
> Prior to the PCES PI meeting due to the pressing demo needs I 
> made a 'suitable modification'
> to the BON to add this method (see below). I would appreciate 
> if this method (or something equivalent with a better 
> implementation) finds a place in an (hopefully early) BON 
> release. Could you guys comment on if/when this will be done 
> (or if its already there in BON or BON2)
> 
> Also, any thoughts on how convenient BON2 is for using in a 
> domain-independent interpreter/plug-in?
> 
> Thanks,
> Sandeep
> 
> 
> --
> Sandeep Neema
> Research Scientist,
> Institute of Software Integrated Systems, Vanderbilt University
> Phone: 615-343-9996
> Email: sandeep.k.neema at vanderbilt.edu
> 
> -----Original Message-----
> From: Jeff Gray [mailto:gray at cis.uab.edu]
> Sent: Saturday, April 10, 2004 1:08 AM
> To: gme-users
> Subject: [gme-users] Request for method addition to CBuilderModel
> 
> 
> For PCES, we have been working at integrating our aspect model weaving
> transformation engine into the GME
> (http://www.gray-area.org/Research/C-SAW/). For one special use by
> Sandeep, he needed to make an update to the builder.cpp file 
> to provide
> functionality that he needed. 
> 
> Could the following method be considered as an addition in a future
> version of builder.cpp?
> 
> --------
> 
> CBuilderModel *CBuilderModel::CreateNewModel(CString partName,
> CBuilderModel *type)
> 
> {
> 
> CBuilderModelList *objectlist;
> 
> VERIFY( modelLists.Lookup(partName, objectlist) );
> 
> CBstr rname(partName);
> 
> CComPtr<IMgaMetaRole> role;
> 
> COMVERIFY(
> CComQIPtr<IMgaMetaModel>(GetMeta())->get_RoleByName((CBstrIn)rname,
> &role) );
> 
> ASSERT(role);
> 
> CComPtr<IMgaFCO> i = NULL;
> 
> COMVERIFY( GetIModel()->DeriveChildObject(type->GetIModel(), role,
> VARIANT_TRUE, &i) );
> 
> ASSERT( i != NULL );
> 
>  
> 
> CBuilderModel* o = CBuilderFactory::Create(CComQIPtr<IMgaModel>(i),
> this);
> 
> o->Resolve();
> 
> objectlist->AddTail(o);
> 
> children.AddTail(o);
> 
> models.AddTail(o);
> 
> return o;
> 
> }
> 
> 
> Thanks for any help
> 
> Jeff
> 
> ----------------------------------------------------
> Jeff Gray, Ph.D.
> Department of Computer and Information Sciences
> University of Alabama at Birmingham
> gray at cis.uab.edu 
> http://www.gray-area.org
> 
> 
> 
> _______________________________________________
> gme-users mailing list
> gme-users at list.isis.vanderbilt.edu
> http://list.isis.vanderbilt.edu/mailman/listinfo/gme-users
> _______________________________________________
> 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