[gme-users] Request for method addition to CBuilderModel
Jeff Gray
gray at cis.uab.edu
Sat Apr 10 02:08:11 CDT 2004
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
More information about the gme-users
mailing list