FW: [gme-users] Request for method addition to CBuilderModel
Sandeep Neema
sandeep at isis.vanderbilt.edu
Tue Apr 13 12:05:51 CDT 2004
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
More information about the gme-users
mailing list