00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #include "stdafx.h"
00023 #include "MON.h"
00024
00025 namespace MON
00026 {
00027
00028 #define FILTER_BEGIN( filterClass, filterVar ) \
00029 { { \
00030 const std::set<filterClass>& setFilter = filterVar; \
00031 for ( std::set<filterClass>::const_iterator it = setFilter.begin() ; it != setFilter.end() ; it++ )
00032
00033 #define FILTER_END } }
00034
00035 #define FULLFILTER( filteredClass, filteredVar, filterClass, cond, value ) \
00036 { { \
00037 std::set<filterClass> setResult; \
00038 FILTER_BEGIN( filteredClass, filteredVar ) { \
00039 if ( cond ) \
00040 setResult.insert( value ); \
00041 } FILTER_END; \
00042 return setResult; \
00043 } }
00044
00045 #define FINDRELATION( filteredClass, filteredVar, cond ) \
00046 { { \
00047 FILTER_BEGIN( filteredClass, filteredVar ) { \
00048 if ( cond ) \
00049 return true; \
00050 } FILTER_END; \
00051 return false; \
00052 } }
00053
00054
00055
00056
00057
00058
00059
00060 Project::Project()
00061 : Util::GenRefCounter( NULL )
00062 {
00063 }
00064
00065 Project::Project( ProjectImpl* pProject )
00066 : Util::GenRefCounter( pProject )
00067 {
00068 }
00069
00070 Project::Project( IMgaMetaProject* spProject )
00071 : Util::GenRefCounter( ProjectImpl::attach( spProject ) )
00072 {
00073 }
00074
00075 Project::Project( const Project& project )
00076 : Util::GenRefCounter( project )
00077 {
00078 }
00079
00080 Project& Project::operator = ( const Project& project )
00081 {
00082 using namespace Util;
00083 GenRefCounter::operator=( project );
00084 return *this;
00085 }
00086
00087 ProjectPtr Project::getProjectI() const
00088 {
00089 return ( (ProjectImpl*) getCounted() )->getProjectI();
00090 }
00091
00092 std::string Project::name() const
00093 {
00094 return ( (ProjectImpl*) getCounted() )->getName();
00095 }
00096
00097 std::string Project::displayedName() const
00098 {
00099 return ( (ProjectImpl*) getCounted() )->getDisplayedName();
00100 }
00101
00102 std::string Project::author() const
00103 {
00104 return ( (ProjectImpl*) getCounted() )->getAuthor();
00105 }
00106
00107 std::string Project::comment() const
00108 {
00109 return ( (ProjectImpl*) getCounted() )->getComment();
00110 }
00111
00112 std::string Project::creationTime() const
00113 {
00114 return ( (ProjectImpl*) getCounted() )->getCreationTime();
00115 }
00116
00117 Folder Project::rootFolder() const
00118 {
00119 return ( (ProjectImpl*) getCounted() )->getRootFolder();
00120 }
00121
00122 std::string Project::infoString( bool bWithIdentifiers ) const
00123 {
00124 return ( (ProjectImpl*) getCounted() )->getInfoString( bWithIdentifiers );
00125 }
00126
00127 std::set<Folder> Project::folders() const
00128 {
00129 FULLFILTER( ObjectImpl*, ( (ProjectImpl*) getCounted() )->getObjects( OT_Folder ), Folder, true, *it );
00130 }
00131
00132 std::set<Atom> Project::atoms() const
00133 {
00134 FULLFILTER( ObjectImpl*, ( (ProjectImpl*) getCounted() )->getObjects( OT_Atom ), Atom, true, *it );
00135 }
00136
00137 std::set<Model> Project::models() const
00138 {
00139 FULLFILTER( ObjectImpl*, ( (ProjectImpl*) getCounted() )->getObjects( OT_Model ), Model, true, *it );
00140 }
00141
00142 std::set<Set> Project::sets() const
00143 {
00144 FULLFILTER( ObjectImpl*, ( (ProjectImpl*) getCounted() )->getObjects( OT_Set ), Set, true, *it );
00145 }
00146
00147 std::set<Reference> Project::references() const
00148 {
00149 FULLFILTER( ObjectImpl*, ( (ProjectImpl*) getCounted() )->getObjects( OT_Reference ), Reference, true, *it );
00150 }
00151
00152 std::set<Connection> Project::connections() const
00153 {
00154 FULLFILTER( ObjectImpl*, ( (ProjectImpl*) getCounted() )->getObjects( OT_Connection ), Connection, true, *it );
00155 }
00156
00157 std::set<Aspect> Project::aspects() const
00158 {
00159 FULLFILTER( ObjectImpl*, ( (ProjectImpl*) getCounted() )->getObjects( OT_Aspect ), Aspect, true, *it );
00160 }
00161
00162 std::set<Attribute> Project::attributes() const
00163 {
00164 FULLFILTER( ObjectImpl*, ( (ProjectImpl*) getCounted() )->getObjects( OT_Attribute ), Attribute, true, *it );
00165 }
00166
00167 std::set<FolderContainment> Project::folderContainments() const
00168 {
00169 FULLFILTER( FolderContainmentImpl*, ( (ProjectImpl*) getCounted() )->getFolderContainments(), FolderContainment, true, *it );
00170 }
00171
00172 std::set<ReferenceAssociation> Project::referenceAssociations() const
00173 {
00174 FULLFILTER( ReferenceAssocImpl*, ( (ProjectImpl*) getCounted() )->getReferenceAssocs(), ReferenceAssociation, true, *it );
00175 }
00176
00177 std::set<SetMembership> Project::setMemberships() const
00178 {
00179 FULLFILTER( SetMembershipImpl*, ( (ProjectImpl*) getCounted() )->getSetMemberships(), SetMembership, true, *it );
00180 }
00181
00182 std::set<Containment> Project::containments() const
00183 {
00184 FULLFILTER( ObjectImpl*, ( (ProjectImpl*) getCounted() )->getObjects( OT_Role ), Containment, true, *it );
00185 }
00186
00187 std::set<ContainmentPart> Project::containmentParts() const
00188 {
00189 FULLFILTER( ObjectImpl*, ( (ProjectImpl*) getCounted() )->getObjects( OT_Part ), ContainmentPart, true, *it );
00190 }
00191
00192 std::set<ConnectionEnd> Project::connectionEnds() const
00193 {
00194 FULLFILTER( ConnectionEndImpl*, ( (ProjectImpl*) getCounted() )->getConnectionEnds(), ConnectionEnd, true, *it );
00195 }
00196
00197 std::set<ModelInAspect> Project::modelInAspects() const
00198 {
00199 FULLFILTER( ModelInAspectImpl*, ( (ProjectImpl*) getCounted() )->getModelInAspects(), ModelInAspect, true, *it );
00200 }
00201
00202 std::set<AttributeAggregation> Project::attributeAggregations() const
00203 {
00204 FULLFILTER( AttributeAggregationImpl*, ( (ProjectImpl*) getCounted() )->getAttributeAggregations(), AttributeAggregation, true, *it );
00205 }
00206
00207 MetaObject Project::findByRef( long lRef ) const
00208 {
00209 return ( (ProjectImpl*) getCounted() )->findByRef( lRef );
00210 }
00211
00212 MetaObject Project::findByName( const std::string strName ) const
00213 {
00214 MetaObject mo = ( (ProjectImpl*) getCounted() )->findByName( strName );
00215 if( mo) return mo;
00216 else
00217 return ( (ProjectImpl*) getCounted() )->findByName( prefixWNmsp( strName ));
00218 }
00219
00220 std::string Project::prefixWNmsp( const std::string& strName) const
00221 {
00222 return ( m_nmsp.length()>0? m_nmsp + "::" : "") + strName;
00223 }
00224
00225
00226
00227
00228
00229
00230
00231 MetaObject::MetaObject()
00232 : Util::GenRefCounter( NULL )
00233 {
00234 }
00235
00236 MetaObject::MetaObject( ObjectImpl* pObject )
00237 : Util::GenRefCounter( pObject )
00238 {
00239 }
00240
00241 MetaObject::MetaObject( const MetaObject& object )
00242 : Util::GenRefCounter( object )
00243 {
00244 }
00245
00246 MetaObject& MetaObject::operator = ( const MetaObject& object )
00247 {
00248 using namespace Util;
00249 GenRefCounter::operator =( object );
00250 return *this;
00251 }
00252
00253 void MetaObject::castObjectImpl( ObjectType eType, ObjectType eType2 )
00254 {
00255 if ( getCounted( false ) ) {
00256 ObjectType oType = ( (ObjectImpl*) getCounted() )->getType();
00257 if ( eType2 == OT_Null && oType != eType || eType2 != OT_Null && ( oType < eType || oType > eType2 ) )
00258 setCounted( NULL );
00259 }
00260 }
00261
00262 ObjectPtr MetaObject::getObjectI() const
00263 {
00264 return ( (ObjectImpl*) getCounted() )->getObjectI();
00265 }
00266
00267 long MetaObject::ref() const
00268 {
00269 return ( (ObjectImpl*) getCounted() )->getRef();
00270 }
00271
00272 std::string MetaObject::name() const
00273 {
00274 return ( (ObjectImpl*) getCounted() )->getName();
00275 }
00276
00277 std::string MetaObject::displayedName() const
00278 {
00279 return ( (ObjectImpl*) getCounted() )->getDisplayedName();
00280 }
00281
00282 ObjectType MetaObject::type() const
00283 {
00284 return ( (ObjectImpl*) getCounted() )->getType();
00285 }
00286
00287 Project MetaObject::project() const
00288 {
00289 return ( (ObjectImpl*) getCounted() )->getProject();
00290 }
00291
00292 std::string MetaObject::infoString( bool bWithIdentifiers, bool bWithRef ) const
00293 {
00294 return ( (ObjectImpl*) getCounted() )->getInfoString( bWithIdentifiers, bWithRef );
00295 }
00296
00297 RegistryNode MetaObject::registry() const
00298 {
00299 return ( (ObjectImpl*) getCounted() )->getRegistryNode( "/" );
00300 }
00301
00302
00303
00304
00305
00306
00307
00308 Object::Object()
00309 : MetaObject()
00310 {
00311 }
00312
00313 Object::Object( ObjectImpl* pObject )
00314 : MetaObject( pObject )
00315 {
00316 castObjectImpl( OT_Model, OT_Folder );
00317 }
00318
00319 Object::Object( const MetaObject& object )
00320 : MetaObject( object )
00321 {
00322 castObjectImpl( OT_Model, OT_Folder );
00323 }
00324
00325 Object& Object::operator = ( const MetaObject& object )
00326 {
00327 MetaObject::operator=( object );
00328 castObjectImpl( OT_Model, OT_Folder );
00329 return *this;
00330 }
00331
00332 std::set<FolderContainment> Object::parentFolderContainments() const
00333 {
00334 FULLFILTER( FolderContainmentImpl*, ( (ProjectImpl*) project().getCounted() )->getFolderContainments(), FolderContainment, (*it)->getChild() == getCounted(), *it );
00335 }
00336
00337 std::set<Folder> Object::parentFolders() const
00338 {
00339 FULLFILTER( FolderContainmentImpl*, ( (ProjectImpl*) project().getCounted() )->getFolderContainments(), Folder, (*it)->getChild() == getCounted(), (*it)->getParent() );
00340 }
00341
00342 bool Object::isFolderParent( const Folder& folder ) const
00343 {
00344 FINDRELATION( FolderContainmentImpl*, ( (ProjectImpl*) project().getCounted() )->getFolderContainments(), (*it)->getChild() == getCounted() && (*it)->getParent() == folder.getCounted( false ) );
00345 }
00346
00347 std::set<Constraint> Object::constraints() const
00348 {
00349 if ( ( (ObjectImpl*) getCounted() )->getType() == OT_Folder ) {
00350 FULLFILTER( ConstraintImpl*, ( (FolderImpl*) getCounted() )->getConstraints(), Constraint, true, *it );
00351 }
00352 else {
00353 FULLFILTER( ConstraintImpl*, ( (FCOImpl*) getCounted() )->getConstraints(), Constraint, true, *it );
00354 }
00355 }
00356
00357
00358
00359
00360
00361
00362
00363 Folder::Folder( ObjectImpl* pObject )
00364 : Object( pObject )
00365 {
00366 castObjectImpl( OT_Folder );
00367 }
00368
00369 Folder::Folder( const MetaObject& object )
00370 : Object( object )
00371 {
00372 castObjectImpl( OT_Folder );
00373 }
00374
00375 Folder::Folder( IMgaMetaBase* spObject )
00376 {
00377 CComQIPtr<IMgaMetaFolder> spFolder = spObject;
00378 setCounted( FolderImpl::attach( spFolder ) );
00379 }
00380
00381 Folder& Folder::operator = ( const MetaObject& object )
00382 {
00383 Object::operator=( object );
00384 castObjectImpl( OT_Folder );
00385 return *this;
00386 }
00387
00388 FolderPtr Folder::getFolderI() const
00389 {
00390 return ( (FolderImpl*) getCounted() )->getFolderI();
00391 }
00392
00393 std::set<FolderContainment> Folder::childFolderContainments() const
00394 {
00395 FULLFILTER( FolderContainmentImpl*, ( (ProjectImpl*) project().getCounted() )->getFolderContainments(), FolderContainment, (*it)->getParent() == getCounted(), *it );
00396 }
00397
00398 std::set<Object> Folder::childObjects() const
00399 {
00400 FULLFILTER( FolderContainmentImpl*, ( (ProjectImpl*) project().getCounted() )->getFolderContainments(), Object, (*it)->getParent() == getCounted(), (*it)->getChild() );
00401 }
00402
00403 std::set<Folder> Folder::childFolders() const
00404 {
00405 FULLFILTER( FolderContainmentImpl*, ( (ProjectImpl*) project().getCounted() )->getFolderContainments(), Folder, (*it)->getParent() == getCounted() && (*it)->getChild() ->getType() == OT_Folder, (*it)->getChild() );
00406 }
00407
00408 std::set<FCO> Folder::childFCOs() const
00409 {
00410 FULLFILTER( FolderContainmentImpl*, ( (ProjectImpl*) project().getCounted() )->getFolderContainments(), FCO, (*it)->getParent() == getCounted() && (*it)->getChild() ->getType() != OT_Folder, (*it)->getChild() );
00411 }
00412
00413 std::set<Atom> Folder::childAtoms() const
00414 {
00415 FULLFILTER( FolderContainmentImpl*, ( (ProjectImpl*) project().getCounted() )->getFolderContainments(), Atom, (*it)->getParent() == getCounted() && (*it)->getChild() ->getType() == OT_Atom, (*it)->getChild() );
00416 }
00417
00418 std::set<Model> Folder::childModels() const
00419 {
00420 FULLFILTER( FolderContainmentImpl*, ( (ProjectImpl*) project().getCounted() )->getFolderContainments(), Model, (*it)->getParent() == getCounted() && (*it)->getChild() ->getType() == OT_Model, (*it)->getChild() );
00421 }
00422
00423 bool Folder::isObjectChild( const Object& object ) const
00424 {
00425 FINDRELATION( FolderContainmentImpl*, ( (ProjectImpl*) project().getCounted() )->getFolderContainments(), (*it)->getParent() == getCounted() && (*it)->getChild() == object.getCounted( false ) );
00426 }
00427
00428
00429
00430
00431
00432
00433
00434 FCO::FCO( ObjectImpl* pObject )
00435 : Object( pObject )
00436 {
00437 castObjectImpl( OT_Model, OT_Set );
00438 }
00439
00440 FCO::FCO( const MetaObject& object )
00441 : Object( object )
00442 {
00443 castObjectImpl( OT_Model, OT_Set );
00444 }
00445
00446 FCO& FCO::operator = ( const MetaObject& object )
00447 {
00448 Object::operator=( object );
00449 castObjectImpl( OT_Model, OT_Set );
00450 return *this;
00451 }
00452
00453 FCOPtr FCO::getFCOI() const
00454 {
00455 return ( (FCOImpl*) getCounted() )->getFCOI();
00456 }
00457
00458 std::set<Containment> FCO::parentContainments() const
00459 {
00460 FULLFILTER( ObjectImpl*, ( (ProjectImpl*) project().getCounted() )->getObjects( OT_Role ), Containment, ( (ContainmentImpl*) (*it) )->getChild() == getCounted(), *it );
00461 }
00462
00463 std::set<Model> FCO::parentModels() const
00464 {
00465 FULLFILTER( ObjectImpl*, ( (ProjectImpl*) project().getCounted() )->getObjects( OT_Role ), Model, ( (ContainmentImpl*) (*it) )->getChild() == getCounted(), ( (ContainmentImpl*) (*it) )->getParent() );
00466 }
00467
00468 bool FCO::isModelParent( const Model& model ) const
00469 {
00470 FINDRELATION( ObjectImpl*, ( (ProjectImpl*) project().getCounted() )->getObjects( OT_Role ), ( (ContainmentImpl*) (*it) )->getChild() == getCounted() && ( (ContainmentImpl*) (*it) )->getParent() == model.getCounted( false ) );
00471 }
00472
00473 std::set<ConnectionEnd> FCO::connectionEnds() const
00474 {
00475 FULLFILTER( ConnectionEndImpl*, ( (ProjectImpl*) project().getCounted() )->getConnectionEnds(), ConnectionEnd, (*it)->getEnd()->getChild() == getCounted(), *it );
00476 }
00477
00478 std::set<ConnectionRole> FCO::targetOf() const
00479 {
00480 FULLFILTER( ConnectionEndImpl*, ( (ProjectImpl*) project().getCounted() )->getConnectionEnds(), ConnectionRole, (*it)->getEnd()->getChild() == getCounted(), (*it)->getConnectionRole() );
00481 }
00482
00483 bool FCO::isTargetOf( const ConnectionRole& role ) const
00484 {
00485 FINDRELATION( ConnectionEndImpl*, ( (ProjectImpl*) project().getCounted() )->getConnectionEnds(), (*it)->getEnd()->getChild() == getCounted() && (*it)->getConnectionRole() == role.getCounted( false ) );
00486 }
00487
00488 std::set<ReferenceAssociation> FCO::referenceAssociations() const
00489 {
00490 FULLFILTER( ReferenceAssocImpl*, ( (ProjectImpl*) project().getCounted() )->getReferenceAssocs(), ReferenceAssociation, (*it)->getTarget() == getCounted(), *it );
00491 }
00492
00493 std::set<Reference> FCO::referencedBy() const
00494 {
00495 FULLFILTER( ReferenceAssocImpl*, ( (ProjectImpl*) project().getCounted() )->getReferenceAssocs(), Reference, (*it)->getTarget() == getCounted(), (*it)->getReference() );
00496 }
00497
00498 bool FCO::isReferencedBy( const Reference& reference ) const
00499 {
00500 FINDRELATION( ReferenceAssocImpl*, ( (ProjectImpl*) project().getCounted() )->getReferenceAssocs(), (*it)->getTarget() == getCounted() && (*it)->getReference() == reference.getCounted( false ) );
00501 }
00502
00503 std::set<SetMembership> FCO::setMemberships() const
00504 {
00505 FULLFILTER( SetMembershipImpl*, ( (ProjectImpl*) project().getCounted() )->getSetMemberships(), SetMembership, (*it)->getMember()->getChild() == getCounted(), *it );
00506 }
00507
00508 std::set<Set> FCO::memberOf() const
00509 {
00510 FULLFILTER( SetMembershipImpl*, ( (ProjectImpl*) project().getCounted() )->getSetMemberships(), Set, (*it)->getMember()->getChild() == getCounted(), (*it)->getSet() );
00511 }
00512
00513 bool FCO::isMemberOf( const Set& set ) const
00514 {
00515 FINDRELATION( SetMembershipImpl*, ( (ProjectImpl*) project().getCounted() )->getSetMemberships(), (*it)->getMember()->getChild() == getCounted() && (*it)->getSet() == set.getCounted( false ) );
00516 }
00517
00518 std::set<AttributeAggregation> FCO::attributeAggregations() const
00519 {
00520 FULLFILTER( AttributeAggregationImpl*, ( (ProjectImpl*) project().getCounted() )->getAttributeAggregations(), AttributeAggregation, (*it)->getFCO() == getCounted(), *it );
00521 }
00522
00523 std::set<Attribute> FCO::attributes( bool bLocalsAlso ) const
00524 {
00525 std::set<Attribute> setAttributes;
00526 const std::set<AttributeAggregationImpl*>& setAggregations = ( (ProjectImpl*) project().getCounted() )->getAttributeAggregations();
00527 for ( std::set<AttributeAggregationImpl*>::const_iterator it = setAggregations.begin() ; it != setAggregations.end() ; it++ )
00528 if ( (*it)->getFCO() == getCounted() )
00529 setAttributes.insert( (*it)->getAttribute() );
00530 if ( bLocalsAlso ) {
00531 const std::set<AttributeImpl*>& setLocals = ( (FCOImpl*) getCounted() )->getAttributes();
00532 setAttributes.insert( setLocals.begin(), setLocals.end() );
00533 }
00534 return setAttributes;
00535 }
00536
00537 std::set<Attribute> FCO::localAttributes() const
00538 {
00539 FULLFILTER( AttributeImpl*, ( (FCOImpl*) getCounted() )->getAttributes(), Attribute, true, *it );
00540 }
00541
00542 bool FCO::hasAttribute( const Attribute& attribute, bool bLocalsAlso ) const
00543 {
00544 const std::set<AttributeAggregationImpl*>& setAggregations = ( (ProjectImpl*) project().getCounted() )->getAttributeAggregations();
00545 std::set<AttributeAggregationImpl*>::const_iterator it;
00546 for ( it = setAggregations.begin() ; it != setAggregations.end() ; it++ )
00547 if ( (*it)->getFCO() == getCounted() && (*it)->getAttribute() == attribute.getCounted( false ) )
00548 return true;
00549 if ( bLocalsAlso ) {
00550 const std::set<AttributeImpl*>& setLocals = ( (FCOImpl*) getCounted() )->getAttributes();
00551 for ( std::set<AttributeImpl*>::const_iterator ita = setLocals.begin() ; ita != setLocals.end() ; ita++ )
00552 if ( *ita == attribute.getCounted( false ) )
00553 return true;
00554 }
00555 return false;
00556 }
00557
00558
00559
00560
00561
00562
00563
00564 Atom::Atom( ObjectImpl* pObject )
00565 : FCO( pObject )
00566 {
00567 castObjectImpl( OT_Atom );
00568 }
00569
00570 Atom::Atom( const MetaObject& object )
00571 : FCO( object )
00572 {
00573 castObjectImpl( OT_Atom );
00574 }
00575
00576 Atom::Atom( IMgaMetaBase* spObject )
00577 {
00578 CComQIPtr<IMgaMetaAtom> spAtom = spObject;
00579 setCounted( AtomImpl::attach( spAtom ) );
00580 }
00581
00582 Atom& Atom::operator = ( const MetaObject& object )
00583 {
00584 FCO::operator=( object );
00585 castObjectImpl( OT_Atom );
00586 return *this;
00587 }
00588
00589 AtomPtr Atom::getAtomI() const
00590 {
00591 return ( (AtomImpl*) getCounted() )->getAtomI();
00592 }
00593
00594
00595
00596
00597
00598
00599
00600 Model::Model( ObjectImpl* pObject )
00601 : FCO( pObject )
00602 {
00603 castObjectImpl( OT_Model );
00604 }
00605
00606 Model::Model( const MetaObject& object )
00607 : FCO( object )
00608 {
00609 castObjectImpl( OT_Model );
00610 }
00611
00612 Model::Model( IMgaMetaBase* spObject )
00613 {
00614 CComQIPtr<IMgaMetaModel> spModel = spObject;
00615 setCounted( ModelImpl::attach( spModel ) );
00616 }
00617
00618 Model& Model::operator = ( const MetaObject& object )
00619 {
00620 FCO::operator=( object );
00621 castObjectImpl( OT_Model );
00622 return *this;
00623 }
00624
00625 ModelPtr Model::getModelI() const
00626 {
00627 return ( (ModelImpl*) getCounted() )->getModelI();
00628 }
00629
00630 std::set<Containment> Model::childContainments() const
00631 {
00632 FULLFILTER( ObjectImpl*, ( (ProjectImpl*) project().getCounted() )->getObjects( OT_Role ), Containment, ( (ContainmentImpl*) (*it) )->getParent() == getCounted(), *it );
00633 }
00634
00635 std::set<FCO> Model::childFCOs() const
00636 {
00637 FULLFILTER( ObjectImpl*, ( (ProjectImpl*) project().getCounted() )->getObjects( OT_Role ), FCO, ( (ContainmentImpl*) (*it) )->getParent() == getCounted(), ( (ContainmentImpl*) (*it) )->getChild() );
00638 }
00639
00640 std::set<Atom> Model::childAtoms() const
00641 {
00642 FULLFILTER( ObjectImpl*, ( (ProjectImpl*) project().getCounted() )->getObjects( OT_Role ), Atom, ( (ContainmentImpl*) (*it) )->getParent() == getCounted() && ( (ContainmentImpl*) (*it) )->getChild()->getType() == OT_Atom, ( (ContainmentImpl*) (*it) )->getChild() );
00643 }
00644
00645 std::set<Model> Model::childModels() const
00646 {
00647 FULLFILTER( ObjectImpl*, ( (ProjectImpl*) project().getCounted() )->getObjects( OT_Role ), Model, ( (ContainmentImpl*) (*it) )->getParent() == getCounted() && ( (ContainmentImpl*) (*it) )->getChild()->getType() == OT_Model, ( (ContainmentImpl*) (*it) )->getChild() );
00648 }
00649
00650 std::set<Connection> Model::childConnections() const
00651 {
00652 FULLFILTER( ObjectImpl*, ( (ProjectImpl*) project().getCounted() )->getObjects( OT_Role ), Connection, ( (ContainmentImpl*) (*it) )->getParent() == getCounted() && ( (ContainmentImpl*) (*it) )->getChild()->getType() == OT_Connection, ( (ContainmentImpl*) (*it) )->getChild() );
00653 }
00654
00655 std::set<Set> Model::childSets() const
00656 {
00657 FULLFILTER( ObjectImpl*, ( (ProjectImpl*) project().getCounted() )->getObjects( OT_Role ), Set, ( (ContainmentImpl*) (*it) )->getParent() == getCounted() && ( (ContainmentImpl*) (*it) )->getChild()->getType() == OT_Set, ( (ContainmentImpl*) (*it) )->getChild() );
00658 }
00659
00660 std::set<Reference> Model::childReferences() const
00661 {
00662 FULLFILTER( ObjectImpl*, ( (ProjectImpl*) project().getCounted() )->getObjects( OT_Role ), Reference, ( (ContainmentImpl*) (*it) )->getParent() == getCounted() && ( (ContainmentImpl*) (*it) )->getChild()->getType() == OT_Reference, ( (ContainmentImpl*) (*it) )->getChild() );
00663 }
00664
00665 bool Model::isFCOChild( const FCO& fco ) const
00666 {
00667 FINDRELATION( ObjectImpl*, ( (ProjectImpl*) project().getCounted() )->getObjects( OT_Role ), ( (ContainmentImpl*) (*it) )->getParent() == getCounted() && ( (ContainmentImpl*) (*it) )->getChild() == fco.getCounted( false ) );
00668 }
00669
00670 std::set<ModelInAspect> Model::modelInAspects() const
00671 {
00672 FULLFILTER( ModelInAspectImpl*, ( (ProjectImpl*) project().getCounted() )->getModelInAspects(), ModelInAspect, (*it)->getModel() == getCounted(), *it );
00673 }
00674
00675 std::set<Aspect> Model::aspects() const
00676 {
00677 FULLFILTER( ModelInAspectImpl*, ( (ProjectImpl*) project().getCounted() )->getModelInAspects(), Aspect, (*it)->getModel() == getCounted(), (*it)->getAspect() );
00678 }
00679
00680 bool Model::hasAspect( const Aspect& aspect ) const
00681 {
00682 FINDRELATION( ModelInAspectImpl*, ( (ProjectImpl*) project().getCounted() )->getModelInAspects(), (*it)->getModel() == getCounted() && (*it)->getAspect() == aspect.getCounted( false ) );
00683 }
00684
00685
00686
00687
00688
00689
00690
00691 ConnectionRole::ConnectionRole()
00692 : Util::GenRefCounter( NULL )
00693 {
00694 }
00695
00696 ConnectionRole::ConnectionRole( ConnectionRoleImpl* pConnectionRole )
00697 : Util::GenRefCounter( pConnectionRole )
00698 {
00699 }
00700
00701 ConnectionRole::ConnectionRole( const ConnectionRole& connectionRole )
00702 : Util::GenRefCounter( connectionRole )
00703 {
00704 }
00705
00706 ConnectionRole& ConnectionRole::operator = ( const ConnectionRole& connectionRole )
00707 {
00708 using namespace Util;
00709 GenRefCounter::operator=( connectionRole );
00710 return *this;
00711 }
00712
00713 Project ConnectionRole::project() const
00714 {
00715 return ( (ConnectionRoleImpl*) getCounted() )->getProject();
00716 }
00717
00718 ConnectionSpecification ConnectionRole::specification() const
00719 {
00720 return ( (ConnectionRoleImpl*) getCounted() )->getConnectionSpec();
00721 }
00722
00723 std::string ConnectionRole::name() const
00724 {
00725 return ( (ConnectionRoleImpl*) getCounted() )->getName();
00726 }
00727
00728 std::set<ConnectionEnd> ConnectionRole::connectionEnds() const
00729 {
00730 FULLFILTER( ConnectionEndImpl*, ( (ProjectImpl*) project().getCounted() )->getConnectionEnds(), ConnectionEnd, (*it)->getConnectionRole() == getCounted(), *it );
00731 }
00732
00733 std::set<Containment> ConnectionRole::targetRoles() const
00734 {
00735 FULLFILTER( ConnectionEndImpl*, ( (ProjectImpl*) project().getCounted() )->getConnectionEnds(), Containment, (*it)->getConnectionRole() == getCounted(), (*it)->getEnd() );
00736 }
00737
00738 std::set<FCO> ConnectionRole::targets() const
00739 {
00740 FULLFILTER( ConnectionEndImpl*, ( (ProjectImpl*) project().getCounted() )->getConnectionEnds(), FCO, (*it)->getConnectionRole() == getCounted(), (*it)->getEnd()->getChild() );
00741 }
00742
00743 bool ConnectionRole::isTarget( const FCO& fco ) const
00744 {
00745 FINDRELATION( ConnectionEndImpl*, ( (ProjectImpl*) project().getCounted() )->getConnectionEnds(), (*it)->getConnectionRole() == getCounted() && (*it)->getEnd()->getChild() == fco.getCounted( false ) );
00746 }
00747
00748 bool ConnectionRole::isTarget( const Containment& containment ) const
00749 {
00750 FINDRELATION( ConnectionEndImpl*, ( (ProjectImpl*) project().getCounted() )->getConnectionEnds(), (*it)->getConnectionRole() == getCounted() && (*it)->getEnd() == containment.getCounted( false ) );
00751 }
00752
00753 std::string ConnectionRole::infoString( bool bWithIdentifiers, bool bWithRef ) const
00754 {
00755 return ( (ConnectionRoleImpl*) getCounted() )->getInfoString( bWithIdentifiers, bWithRef );
00756 }
00757
00758
00759
00760
00761
00762
00763
00764 ConnectionSpecification::ConnectionSpecification()
00765 : Util::GenRefCounter( NULL )
00766 {
00767 }
00768
00769 ConnectionSpecification::ConnectionSpecification( ConnectionSpecImpl* pConnectionSpec )
00770 : Util::GenRefCounter( pConnectionSpec )
00771 {
00772 }
00773
00774 ConnectionSpecification::ConnectionSpecification( const ConnectionSpecification& connectionSpec )
00775 : Util::GenRefCounter( connectionSpec )
00776 {
00777 }
00778
00779 ConnectionSpecification& ConnectionSpecification::operator = ( const ConnectionSpecification& connectionSpec )
00780 {
00781 using namespace Util;
00782 GenRefCounter::operator=( connectionSpec );
00783 return *this;
00784 }
00785
00786 Project ConnectionSpecification::project() const
00787 {
00788 return ( (ConnectionSpecImpl*) getCounted() )->getProject();
00789 }
00790
00791 Connection ConnectionSpecification::connection() const
00792 {
00793 return ( (ConnectionSpecImpl*) getCounted() )->getConnection();
00794 }
00795
00796 int ConnectionSpecification::number() const
00797 {
00798 return ( (ConnectionSpecImpl*) getCounted() )->getNumber();
00799 }
00800
00801 std::set<ConnectionRole> ConnectionSpecification::roles() const
00802 {
00803 FULLFILTER( ConnectionRoleImpl*, ( (ConnectionSpecImpl*) getCounted() )->getRoles(), ConnectionRole, true, *it );
00804 }
00805
00806 ConnectionRole ConnectionSpecification::role( const std::string& strRoleName ) const
00807 {
00808 const std::set<ConnectionRoleImpl*>& setRoles = ( (ConnectionSpecImpl*) getCounted() )->getRoles();
00809 for ( std::set<ConnectionRoleImpl*>::const_iterator it = setRoles.begin() ; it != setRoles.end() ; it++ )
00810 if ( (*it)->getName() == strRoleName )
00811 return *it;
00812 return NULL;
00813 }
00814
00815 std::string ConnectionSpecification::infoString( bool bWithIdentifiers, bool bWithRef ) const
00816 {
00817 return ( (ConnectionSpecImpl*) getCounted() )->getInfoString( bWithIdentifiers, bWithRef );
00818 }
00819
00820
00821
00822
00823
00824
00825
00826 Connection::Connection( ObjectImpl* pObject )
00827 : FCO( pObject )
00828 {
00829 castObjectImpl( OT_Connection );
00830 }
00831
00832 Connection::Connection( const MetaObject& object )
00833 : FCO( object )
00834 {
00835 castObjectImpl( OT_Connection );
00836 }
00837
00838 Connection::Connection( IMgaMetaBase* spObject )
00839 {
00840 CComQIPtr<IMgaMetaConnection> spConnection = spObject;
00841 setCounted( ConnectionImpl::attach( spConnection ) );
00842 }
00843
00844 Connection& Connection::operator = ( const MetaObject& object )
00845 {
00846 FCO::operator=( object );
00847 castObjectImpl( OT_Connection );
00848 return *this;
00849 }
00850
00851 ConnectionPtr Connection::getConnectionI() const
00852 {
00853 return ( (ConnectionImpl*) getCounted() )->getConnectionI();
00854 }
00855
00856 bool Connection::isSimple() const
00857 {
00858 return ( (ConnectionImpl*) getCounted() )->isSimple();
00859 }
00860
00861 bool Connection::isBidirectional() const
00862 {
00863 return ( (ConnectionImpl*) getCounted() )->isBidirectional();
00864 }
00865
00866 std::set<ConnectionSpecification> Connection::specifications() const
00867 {
00868 FULLFILTER( ConnectionSpecImpl*, ( (ConnectionImpl*) getCounted() )->getConnectionSpecs(), ConnectionSpecification, true, *it );
00869 }
00870
00871 size_t Connection::specificationCount() const
00872 {
00873 return ( (ConnectionImpl*) getCounted() )->getConnectionSpecs().size();
00874 }
00875
00876 ConnectionSpecification Connection::specification( int iNum ) const
00877 {
00878 const std::set<ConnectionSpecImpl*>& setSpecs = ( (ConnectionImpl*) getCounted() )->getConnectionSpecs();
00879 for ( std::set<ConnectionSpecImpl*>::const_iterator it = setSpecs.begin() ; it != setSpecs.end() ; it++ )
00880 if ( (*it)->getNumber() == iNum )
00881 return *it;
00882 return NULL;
00883 }
00884
00885
00886
00887
00888
00889
00890
00891 Set::Set( ObjectImpl* pObject )
00892 : FCO( pObject )
00893 {
00894 castObjectImpl( OT_Set );
00895 }
00896
00897 Set::Set( const MetaObject& object )
00898 : FCO( object )
00899 {
00900 castObjectImpl( OT_Set );
00901 }
00902
00903 Set::Set( IMgaMetaBase* spObject )
00904 {
00905 CComQIPtr<IMgaMetaSet> spSet = spObject;
00906 setCounted( SetImpl::attach( spSet ) );
00907 }
00908
00909 Set& Set::operator = ( const MetaObject& object )
00910 {
00911 FCO::operator=( object );
00912 castObjectImpl( OT_Set );
00913 return *this;
00914 }
00915
00916 SetPtr Set::getSetI() const
00917 {
00918 return ( (SetImpl*) getCounted() )->getSetI();
00919 }
00920
00921 std::set<SetMembership> Set::memberships() const
00922 {
00923 FULLFILTER( SetMembershipImpl*, ( (ProjectImpl*) project().getCounted() )->getSetMemberships(), SetMembership, (*it)->getSet() == getCounted(), *it );
00924 }
00925
00926 std::set<Containment> Set::memberRoles() const
00927 {
00928 FULLFILTER( SetMembershipImpl*, ( (ProjectImpl*) project().getCounted() )->getSetMemberships(), Containment, (*it)->getSet() == getCounted(), (*it)->getMember() );
00929 }
00930
00931
00932 bool Set::isMember( const Containment& role ) const
00933 {
00934 FINDRELATION( SetMembershipImpl*, ( (ProjectImpl*) project().getCounted() )->getSetMemberships(), (*it)->getSet() == getCounted() && (*it)->getMember()== role.getCounted( false ) );
00935 }
00936
00937
00938
00939
00940 bool Set::isMember( const FCO& fco ) const
00941 {
00942 FINDRELATION( SetMembershipImpl*, ( (ProjectImpl*) project().getCounted() )->getSetMemberships(), (*it)->getSet() == getCounted() && (*it)->getMember()->getChild() == fco.getCounted( false ) );
00943 }
00944
00945
00946
00947
00948
00949
00950
00951 Reference::Reference( ObjectImpl* pObject )
00952 : FCO( pObject )
00953 {
00954 castObjectImpl( OT_Reference );
00955 }
00956
00957 Reference::Reference( const MetaObject& object )
00958 : FCO( object )
00959 {
00960 castObjectImpl( OT_Reference );
00961 }
00962
00963 Reference::Reference( IMgaMetaBase* spObject )
00964 {
00965 CComQIPtr<IMgaMetaReference> spReference = spObject;
00966 setCounted ( ReferenceImpl::attach( spReference ) );
00967 }
00968
00969 Reference& Reference::operator = ( const MetaObject& object )
00970 {
00971 FCO::operator=( object );
00972 castObjectImpl( OT_Reference );
00973 return *this;
00974 }
00975
00976 ReferencePtr Reference::getReferenceI() const
00977 {
00978 return ( (ReferenceImpl*) getCounted() )->getReferenceI();
00979 }
00980
00981 std::set<ReferenceAssociation> Reference::refAssociations() const
00982 {
00983 FULLFILTER( ReferenceAssocImpl*, ( (ProjectImpl*) project().getCounted() )->getReferenceAssocs(), ReferenceAssociation, (*it)->getReference() == getCounted(), *it );
00984 }
00985
00986 std::set<FCO> Reference::targetFCOs() const
00987 {
00988 FULLFILTER( ReferenceAssocImpl*, ( (ProjectImpl*) project().getCounted() )->getReferenceAssocs(), FCO, (*it)->getReference() == getCounted(), (*it)->getTarget() );
00989
00990 }
00991
00992 bool Reference::isReferenced( const FCO& fco ) const
00993 {
00994 FINDRELATION( ReferenceAssocImpl*, ( (ProjectImpl*) project().getCounted() )->getReferenceAssocs(), (*it)->getReference() == getCounted() && (*it)->getTarget() == fco.getCounted( false ) );
00995 }
00996
00997
00998
00999
01000
01001
01002
01003 Containment::Containment( ObjectImpl* pObject )
01004 : MetaObject( pObject )
01005 {
01006 castObjectImpl( OT_Role );
01007 }
01008
01009
01010
01011
01012
01013
01014
01015 Containment::Containment( IMgaMetaBase* spObject )
01016 {
01017 CComQIPtr<IMgaMetaRole> spRole = spObject;
01018 setCounted( ContainmentImpl::attach( spRole ) );
01019 }
01020
01021 Containment& Containment::operator = ( const MetaObject& object )
01022 {
01023 MetaObject::operator=( object );
01024 castObjectImpl( OT_Role );
01025 return *this;
01026 }
01027
01028 ContainmentPtr Containment::getContainmentI() const
01029 {
01030 return ( (ContainmentImpl*) getCounted() )->getContainmentI();
01031 }
01032
01033 Model Containment::parent() const
01034 {
01035 return ( (ContainmentImpl*) getCounted() )->getParent();
01036 }
01037
01038 FCO Containment::child() const
01039 {
01040 return ( (ContainmentImpl*) getCounted() )->getChild();
01041 }
01042
01043 std::set<ConnectionEnd> Containment::connectionEnds() const
01044 {
01045 FULLFILTER( ConnectionEndImpl*, ( (ProjectImpl*) project().getCounted() )->getConnectionEnds(), ConnectionEnd, (*it)->getEnd() == getCounted(), *it );
01046 }
01047
01048 std::set<ConnectionRole> Containment::targetOf() const
01049 {
01050 FULLFILTER( ConnectionEndImpl*, ( (ProjectImpl*) project().getCounted() )->getConnectionEnds(), ConnectionRole, (*it)->getEnd() == getCounted(), (*it)->getConnectionRole() );
01051 }
01052
01053 bool Containment::isTargetOf( const ConnectionRole& role ) const
01054 {
01055 FINDRELATION( ConnectionEndImpl*, ( (ProjectImpl*) project().getCounted() )->getConnectionEnds(), (*it)->getEnd() == getCounted() && (*it)->getConnectionRole() == role.getCounted( false ) );
01056 }
01057
01058 std::set<ContainmentPart> Containment::parts() const
01059 {
01060 FULLFILTER( ObjectImpl*, ( (ProjectImpl*) project().getCounted() )->getObjects( OT_Part ), ContainmentPart, ( (ContainmentPartImpl*) (*it) )->getContainment() == getCounted(), *it );
01061 }
01062
01063 std::set<Aspect> Containment::aspects() const
01064 {
01065 FULLFILTER( ObjectImpl*, ( (ProjectImpl*) project().getCounted() )->getObjects( OT_Part ), Aspect, ( (ContainmentPartImpl*) (*it) )->getContainment() == getCounted(), ( (ContainmentPartImpl*) (*it) )->getAspect() );
01066 }
01067
01068 bool Containment::isVisibleIn( const Aspect& aspect ) const
01069 {
01070 FINDRELATION( ObjectImpl*, ( (ProjectImpl*) project().getCounted() )->getObjects( OT_Part ), ( (ContainmentPartImpl*) (*it) )->getContainment() == getCounted() && ( (ContainmentPartImpl*) (*it) )->getAspect() == aspect.getCounted( false ) );
01071 }
01072
01073 std::set<ReferenceAssociation> Containment::referenceAssociations() const
01074 {
01075 FULLFILTER( ReferenceAssocImpl*, ( (ProjectImpl*) project().getCounted() )->getReferenceAssocs(), ReferenceAssociation, (*it)->getTarget() == getCounted(), *it );
01076 }
01077
01078 std::set<Reference> Containment::referencedBy() const
01079 {
01080 FULLFILTER( ReferenceAssocImpl*, ( (ProjectImpl*) project().getCounted() )->getReferenceAssocs(), Reference, (*it)->getTarget() == getCounted(), (*it)->getReference() );
01081 }
01082
01083 bool Containment::isReferencedBy( const Reference& reference ) const
01084 {
01085 FINDRELATION( ReferenceAssocImpl*, ( (ProjectImpl*) project().getCounted() )->getReferenceAssocs(), (*it)->getTarget() == getCounted() && (*it)->getReference() == reference.getCounted( false ) );
01086 }
01087
01088 std::set<SetMembership> Containment::setMemberships() const
01089 {
01090 FULLFILTER( SetMembershipImpl*, ( (ProjectImpl*) project().getCounted() )->getSetMemberships(), SetMembership, (*it)->getMember() == getCounted(), *it );
01091 }
01092
01093 std::set<Set> Containment::memberOf() const
01094 {
01095 FULLFILTER( SetMembershipImpl*, ( (ProjectImpl*) project().getCounted() )->getSetMemberships(), Set, (*it)->getMember() == getCounted(), (*it)->getSet() );
01096 }
01097
01098 bool Containment::isMemberOf( const Set& set ) const
01099 {
01100 FINDRELATION( SetMembershipImpl*, ( (ProjectImpl*) project().getCounted() )->getSetMemberships(), (*it)->getMember() == getCounted() && (*it)->getSet() == set.getCounted( false ) );
01101 }
01102
01103
01104
01105
01106
01107
01108
01109 Attribute::Attribute( ObjectImpl* pObject )
01110 : MetaObject( pObject )
01111 {
01112 castObjectImpl( OT_Attribute );
01113 }
01114
01115 Attribute::Attribute( const MetaObject& object )
01116 : MetaObject( object )
01117 {
01118 castObjectImpl( OT_Attribute );
01119 }
01120
01121 Attribute::Attribute( IMgaMetaBase* spObject )
01122 {
01123 CComQIPtr<IMgaMetaAttribute> spAttribute = spObject;
01124 setCounted( AttributeImpl::attach( spAttribute ) );
01125 }
01126
01127 Attribute& Attribute::operator = ( const MetaObject& object )
01128 {
01129 MetaObject::operator=( object );
01130 castObjectImpl( OT_Attribute );
01131 return *this;
01132 }
01133
01134 AttributePtr Attribute::getAttributeI() const
01135 {
01136 return ( (AttributeImpl*) getCounted() )->getAttributeI();
01137 }
01138
01139 Util::Variant Attribute::defaultValue() const
01140 {
01141 return ( (AttributeImpl*) getCounted() )->getDefaultValue();
01142 }
01143
01144 AttributeType Attribute::valueType() const
01145 {
01146 return ( (AttributeImpl*) getCounted() )->getValueType();
01147 }
01148
01149 std::vector<Attribute::NameValue> Attribute::enumItems() const
01150 {
01151 return ( (AttributeImpl*) getCounted() )->getEnumItems();
01152 }
01153
01154 FCO Attribute::owner() const
01155 {
01156 return ( (AttributeImpl*) getCounted() )->getOwner();
01157 }
01158
01159 std::set<AttributeAggregation> Attribute::attributeAggregations() const
01160 {
01161 FULLFILTER( AttributeAggregationImpl*, ( (ProjectImpl*) project().getCounted() )->getAttributeAggregations(), AttributeAggregation, (*it)->getAttribute() == getCounted(), *it );
01162 }
01163
01164 std::set<FCO> Attribute::FCOs() const
01165 {
01166 FULLFILTER( AttributeAggregationImpl*, ( (ProjectImpl*) project().getCounted() )->getAttributeAggregations(), FCO, (*it)->getAttribute() == getCounted(), (*it)->getFCO() );
01167 }
01168
01169 bool Attribute::isContainedBy( const FCO& fco ) const
01170 {
01171 FINDRELATION( AttributeAggregationImpl*, ( (ProjectImpl*) project().getCounted() )->getAttributeAggregations(), (*it)->getAttribute() == getCounted() && (*it)->getFCO() == fco.getCounted( false ) );
01172 }
01173
01174
01175
01176
01177
01178
01179
01180 Aspect::Aspect( ObjectImpl* pObject )
01181 : MetaObject( pObject )
01182 {
01183 castObjectImpl( OT_Aspect );
01184 }
01185
01186 Aspect::Aspect( const MetaObject& object )
01187 : MetaObject( object )
01188 {
01189 castObjectImpl( OT_Aspect );
01190 }
01191
01192 Aspect::Aspect( IMgaMetaBase* spObject )
01193 {
01194 CComQIPtr<IMgaMetaAspect> spAspect = spObject;
01195 setCounted( AspectImpl::attach( spAspect ) );
01196 }
01197
01198 Aspect& Aspect::operator = ( const MetaObject& object )
01199 {
01200 MetaObject::operator=( object );
01201 castObjectImpl( OT_Aspect );
01202 return *this;
01203 }
01204
01205 AspectPtr Aspect::getAspectI() const
01206 {
01207 return ( (AspectImpl*) getCounted() )->getAspectI();
01208 }
01209
01210 std::set<ModelInAspect> Aspect::modelInAspects() const
01211 {
01212 FULLFILTER( ModelInAspectImpl*, ( (ProjectImpl*) project().getCounted() )->getModelInAspects(), ModelInAspect, (*it)->getAspect() == getCounted(), *it );
01213 }
01214
01215 std::set<Model> Aspect::models() const
01216 {
01217 FULLFILTER( ModelInAspectImpl*, ( (ProjectImpl*) project().getCounted() )->getModelInAspects(), Model, (*it)->getAspect() == getCounted(), (*it)->getModel() );
01218 }
01219
01220 bool Aspect::isContainedBy( const Model& model ) const
01221 {
01222 FINDRELATION( ModelInAspectImpl*, ( (ProjectImpl*) project().getCounted() )->getModelInAspects(), (*it)->getAspect() == getCounted() && (*it)->getModel() == model.getCounted( false ) );
01223 }
01224
01225 std::set<ContainmentPart> Aspect::parts() const
01226 {
01227 FULLFILTER( ObjectImpl*, ( (ProjectImpl*) project().getCounted() )->getObjects( OT_Part ), ContainmentPart, ( (ContainmentPartImpl*) (*it) )->getAspect() == getCounted(), *it );
01228 }
01229
01230 std::set<Containment> Aspect::containments() const
01231 {
01232 FULLFILTER( ObjectImpl*, ( (ProjectImpl*) project().getCounted() )->getObjects( OT_Part ), Containment, ( (ContainmentPartImpl*) (*it) )->getAspect() == getCounted(), ( (ContainmentPartImpl*) (*it) )->getContainment() );
01233 }
01234
01235 bool Aspect::hasContainment( const Containment& containment ) const
01236 {
01237 FINDRELATION( ObjectImpl*, ( (ProjectImpl*) project().getCounted() )->getObjects( OT_Part ), ( (ContainmentPartImpl*) (*it) )->getAspect() == getCounted() && ( (ContainmentPartImpl*) (*it) )->getContainment() == containment.getCounted( false ) );
01238 }
01239
01240
01241
01242
01243
01244
01245
01246 ContainmentPart::ContainmentPart( ObjectImpl* pObject )
01247 : MetaObject( pObject )
01248 {
01249 castObjectImpl( OT_Part );
01250 }
01251
01252 ContainmentPart::ContainmentPart( const MetaObject& object )
01253 : MetaObject( object )
01254 {
01255 castObjectImpl( OT_Aspect );
01256 }
01257
01258 ContainmentPart::ContainmentPart( IMgaMetaBase* spObject )
01259 {
01260 CComQIPtr<IMgaMetaPart> spPart = spObject;
01261 setCounted( ContainmentPartImpl::attach( spPart ) );
01262 }
01263
01264 ContainmentPart& ContainmentPart::operator = ( const MetaObject& object )
01265 {
01266 MetaObject::operator=( object );
01267 castObjectImpl( OT_Part );
01268 return *this;
01269 }
01270
01271 PartPtr ContainmentPart::getPartI() const
01272 {
01273 return ( (ContainmentPartImpl*) getCounted() )->getPartI();
01274 }
01275
01276 bool ContainmentPart::isLinked() const
01277 {
01278 return ( (ContainmentPartImpl*) getCounted() )->isLinked();
01279 }
01280
01281 bool ContainmentPart::isPrimary() const
01282 {
01283 return ( (ContainmentPartImpl*) getCounted() )->isPrimary();
01284 }
01285
01286 Containment ContainmentPart::containment() const
01287 {
01288 return ( (ContainmentPartImpl*) getCounted() )->getContainment();
01289 }
01290
01291 Aspect ContainmentPart::aspect() const
01292 {
01293 return ( (ContainmentPartImpl*) getCounted() )->getAspect();
01294 }
01295
01296
01297
01298
01299
01300
01301
01302 FolderContainment::FolderContainment()
01303 : Util::GenRefCounter( NULL )
01304 {
01305 }
01306
01307 FolderContainment::FolderContainment( FolderContainmentImpl* pFolderContainment )
01308 : Util::GenRefCounter( pFolderContainment )
01309 {
01310 }
01311
01312 FolderContainment::FolderContainment( const FolderContainment& folderContainment )
01313 : Util::GenRefCounter( folderContainment )
01314 {
01315 }
01316
01317 FolderContainment& FolderContainment::operator=( const FolderContainment& folderContainment )
01318 {
01319 using namespace Util;
01320 GenRefCounter::operator =( folderContainment );
01321 return *this;
01322 }
01323
01324 Project FolderContainment::project() const
01325 {
01326 return ( (FolderContainmentImpl*) getCounted() )->getProject();
01327 }
01328
01329 Folder FolderContainment::parent() const
01330 {
01331 return ( (FolderContainmentImpl*) getCounted() )->getParent();
01332 }
01333
01334 Object FolderContainment::child() const
01335 {
01336 return ( (FolderContainmentImpl*) getCounted() )->getChild();
01337 }
01338
01339 std::string FolderContainment::infoString( bool bWithIdentifiers, bool bWithRef ) const
01340 {
01341 return ( (FolderContainmentImpl*) getCounted() )->getInfoString( bWithIdentifiers, bWithRef );
01342 }
01343
01344
01345
01346
01347
01348
01349
01350 ReferenceAssociation::ReferenceAssociation()
01351 : Util::GenRefCounter( NULL )
01352 {
01353 }
01354
01355 ReferenceAssociation::ReferenceAssociation( ReferenceAssocImpl* pReferenceAssoc )
01356 : Util::GenRefCounter( pReferenceAssoc )
01357 {
01358 }
01359
01360 ReferenceAssociation::ReferenceAssociation( const ReferenceAssociation& referenceAssoc )
01361 : Util::GenRefCounter( referenceAssoc )
01362 {
01363 }
01364
01365 ReferenceAssociation& ReferenceAssociation::operator=( const ReferenceAssociation& referenceAssoc )
01366 {
01367 using namespace Util;
01368 GenRefCounter::operator=( referenceAssoc );
01369 return *this;
01370 }
01371
01372 Project ReferenceAssociation::project() const
01373 {
01374 return ( (ReferenceAssocImpl* ) getCounted() )->getProject();
01375 }
01376
01377 Reference ReferenceAssociation::reference() const
01378 {
01379 return ( (ReferenceAssocImpl* ) getCounted() )->getReference();
01380 }
01381
01382 FCO ReferenceAssociation::target() const
01383 {
01384 return ( (ReferenceAssocImpl* ) getCounted() )->getTarget();
01385 }
01386
01387 std::string ReferenceAssociation::infoString( bool bWithIdentifiers, bool bWithRef ) const
01388 {
01389 return ( (ReferenceAssocImpl* ) getCounted() )->getInfoString( bWithIdentifiers, bWithRef );
01390 }
01391
01392
01393
01394
01395
01396
01397
01398 SetMembership::SetMembership()
01399 : Util::GenRefCounter( NULL )
01400 {
01401 }
01402
01403 SetMembership::SetMembership( SetMembershipImpl* pSetMembership )
01404 : Util::GenRefCounter( pSetMembership )
01405 {
01406 }
01407
01408 SetMembership::SetMembership( const SetMembership& setMembership )
01409 : Util::GenRefCounter( setMembership )
01410 {
01411
01412 }
01413
01414 SetMembership& SetMembership::operator=( const SetMembership& setMembership )
01415 {
01416 using namespace Util;
01417 GenRefCounter::operator=( setMembership );
01418 return *this;
01419 }
01420
01421 Project SetMembership::project() const
01422 {
01423 return ( (SetMembershipImpl*) getCounted() )->getProject();
01424 }
01425
01426 Set SetMembership::set() const
01427 {
01428 return ( (SetMembershipImpl*) getCounted() )->getSet();
01429 }
01430
01431 Containment SetMembership::member() const
01432 {
01433 return ( (SetMembershipImpl*) getCounted() )->getMember();
01434 }
01435
01436 std::string SetMembership::infoString( bool bWithIdentifiers, bool bWithRef ) const
01437 {
01438 return ( (SetMembershipImpl*) getCounted() )->getInfoString( bWithIdentifiers, bWithRef );
01439 }
01440
01441
01442
01443
01444
01445
01446
01447 ConnectionEnd::ConnectionEnd()
01448 : Util::GenRefCounter( NULL )
01449 {
01450 }
01451
01452 ConnectionEnd::ConnectionEnd( ConnectionEndImpl* pConnectionEnd)
01453 : Util::GenRefCounter( pConnectionEnd )
01454 {
01455 }
01456
01457 ConnectionEnd::ConnectionEnd( const ConnectionEnd& connectionEnd )
01458 : Util::GenRefCounter( connectionEnd )
01459 {
01460 }
01461
01462 ConnectionEnd& ConnectionEnd::operator=( const ConnectionEnd& connectionEnd )
01463 {
01464 using namespace Util;
01465 GenRefCounter::operator=( connectionEnd );
01466 return *this;
01467 }
01468
01469 Project ConnectionEnd::project() const
01470 {
01471 return ( (ConnectionEndImpl*) getCounted() )->getProject();
01472 }
01473
01474 ConnectionRole ConnectionEnd::role() const
01475 {
01476 return ( (ConnectionEndImpl*) getCounted() )->getConnectionRole();
01477 }
01478
01479 Containment ConnectionEnd::target() const
01480 {
01481 return ( (ConnectionEndImpl*) getCounted() )->getEnd();
01482 }
01483
01484 std::string ConnectionEnd::infoString( bool bWithIdentifiers, bool bWithRef ) const
01485 {
01486 return ( (ConnectionEndImpl*) getCounted() )->getInfoString( bWithIdentifiers, bWithRef );
01487 }
01488
01489
01490
01491
01492
01493
01494
01495 ModelInAspect::ModelInAspect()
01496 : Util::GenRefCounter( NULL )
01497 {
01498 }
01499
01500 ModelInAspect::ModelInAspect( ModelInAspectImpl* pModelInAspect )
01501 : Util::GenRefCounter( pModelInAspect )
01502 {
01503 }
01504
01505 ModelInAspect::ModelInAspect( const ModelInAspect& modelInAspect )
01506 : Util::GenRefCounter( modelInAspect )
01507 {
01508 }
01509
01510 ModelInAspect& ModelInAspect::operator=( const ModelInAspect& modelInAspect )
01511 {
01512 using namespace Util;
01513 GenRefCounter::operator=( modelInAspect );
01514 return *this;
01515 }
01516
01517 Project ModelInAspect::project() const
01518 {
01519 return ( (ModelInAspectImpl*) getCounted() )->getProject();
01520 }
01521
01522 Aspect ModelInAspect::aspect() const
01523 {
01524 return ( (ModelInAspectImpl*) getCounted() )->getAspect();
01525 }
01526
01527 Model ModelInAspect::model() const
01528 {
01529 return ( (ModelInAspectImpl*) getCounted() )->getModel();
01530 }
01531
01532 std::string ModelInAspect::infoString( bool bWithIdentifiers, bool bWithRef ) const
01533 {
01534 return ( (ModelInAspectImpl*) getCounted() )->getInfoString( bWithIdentifiers, bWithRef );
01535 }
01536
01537
01538
01539
01540
01541
01542
01543 AttributeAggregation::AttributeAggregation()
01544 : Util::GenRefCounter( NULL )
01545 {
01546 }
01547
01548 AttributeAggregation::AttributeAggregation( AttributeAggregationImpl* pAttributeAggr )
01549 : Util::GenRefCounter( pAttributeAggr )
01550 {
01551 }
01552
01553 AttributeAggregation::AttributeAggregation( const AttributeAggregation& attributeAggr )
01554 : Util::GenRefCounter( attributeAggr )
01555 {
01556 }
01557
01558 AttributeAggregation& AttributeAggregation::operator=( const AttributeAggregation& attributeAggr )
01559 {
01560 using namespace Util;
01561 GenRefCounter::operator=( attributeAggr );
01562 return *this;
01563 }
01564
01565 Project AttributeAggregation::project() const
01566 {
01567 return ( (AttributeAggregationImpl*) getCounted() )->getProject();
01568 }
01569
01570 FCO AttributeAggregation::fco() const
01571 {
01572 return ( (AttributeAggregationImpl*) getCounted() )->getFCO();
01573 }
01574
01575 Attribute AttributeAggregation::attribute() const
01576 {
01577 return ( (AttributeAggregationImpl*) getCounted() )->getAttribute();
01578 }
01579
01580 std::string AttributeAggregation::infoString( bool bWithIdentifiers, bool bWithRef ) const
01581 {
01582 return ( (AttributeAggregationImpl*) getCounted() )->getInfoString( bWithIdentifiers, bWithRef );
01583 }
01584
01585
01586
01587
01588
01589
01590
01591 RegistryNode::RegistryNode()
01592 : Util::GenRefCounter( NULL )
01593 {
01594 }
01595
01596 RegistryNode::RegistryNode( const RegistryNode& node )
01597 : Util::GenRefCounter( node )
01598 {
01599 }
01600
01601 RegistryNode::RegistryNode( RegistryNodeImpl* pRegistryNode )
01602 : Util::GenRefCounter( pRegistryNode )
01603 {
01604 }
01605
01606 RegistryNode& RegistryNode::operator = ( const RegistryNode& node )
01607 {
01608 using namespace Util;
01609 GenRefCounter::operator=( node );
01610 return *this;
01611 }
01612
01613 Project RegistryNode::project() const
01614 {
01615 return ( (RegistryNodeImpl*) getCounted() )->getProject();
01616 }
01617
01618 MetaObject RegistryNode::object() const
01619 {
01620 return ( (RegistryNodeImpl*) getCounted() )->getObject();
01621 }
01622
01623 RegNodePtr RegistryNode::getRegNodeI() const
01624 {
01625 return ( (RegistryNodeImpl*) getCounted() )->getRegNodeI();
01626 }
01627
01628 bool RegistryNode::isRoot() const
01629 {
01630 return ( (RegistryNodeImpl*) getCounted() )->isRootNode();
01631 }
01632
01633 std::string RegistryNode::name() const
01634 {
01635 return ( (RegistryNodeImpl*) getCounted() )->getName();
01636 }
01637
01638 std::string RegistryNode::path() const
01639 {
01640 return ( (RegistryNodeImpl*) getCounted() )->getPath();
01641 }
01642
01643 std::string RegistryNode::value() const
01644 {
01645 return ( (RegistryNodeImpl*) getCounted() )->getValue();
01646 }
01647
01648 long RegistryNode::integerValue() const
01649 {
01650 return (long) Util::Variant( ( (RegistryNodeImpl*) getCounted() )->getValue() );
01651 }
01652
01653 double RegistryNode::realValue() const
01654 {
01655 return (double) Util::Variant( ( (RegistryNodeImpl*) getCounted() )->getValue() );
01656 }
01657
01658 bool RegistryNode::boolValue() const
01659 {
01660 return (bool) Util::Variant( ( (RegistryNodeImpl*) getCounted() )->getValue() );
01661 }
01662
01663 std::string RegistryNode::valueByPath( const std::string& strPath ) const
01664 {
01665 return ( (RegistryNodeImpl*) getCounted() )->getValueByPath( strPath );
01666 }
01667
01668 RegistryNode RegistryNode::parent() const
01669 {
01670 return ( (RegistryNodeImpl*) getCounted() )->getParent();
01671 }
01672
01673 std::set<RegistryNode> RegistryNode::children() const
01674 {
01675 FULLFILTER( RegistryNodeImpl*, ( (RegistryNodeImpl*) getCounted() )->getChildren(), RegistryNode, true, *it );
01676 }
01677
01678 RegistryNode RegistryNode::child( const std::string& strName ) const
01679 {
01680 return ( (RegistryNodeImpl*) getCounted() )->getChild( strName );
01681 }
01682
01683 RegistryNode RegistryNode::childByPath( const std::string& strPath ) const
01684 {
01685 return ( (RegistryNodeImpl*) getCounted() )->getChildByPath( strPath );
01686 }
01687
01688
01689
01690
01691
01692
01693
01694 Constraint::Constraint()
01695 : Util::GenRefCounter( NULL )
01696 {
01697 }
01698
01699 Constraint::Constraint( const Constraint& constraint )
01700 : Util::GenRefCounter( constraint )
01701 {
01702 }
01703
01704 Constraint::Constraint( ConstraintImpl* pConstraint )
01705 : Util::GenRefCounter( pConstraint )
01706 {
01707 }
01708
01709 Constraint& Constraint::operator = ( const Constraint& constraint )
01710 {
01711 using namespace Util;
01712 GenRefCounter::operator=( constraint );
01713 return *this;
01714 }
01715
01716 Project Constraint::project() const
01717 {
01718 return ( (ConstraintImpl*) getCounted() )->getProject();
01719 }
01720
01721 Object Constraint::object() const
01722 {
01723 return ( (ConstraintImpl*) getCounted() )->getObject();
01724 }
01725
01726 ConstraintPtr Constraint::getConstraintI() const
01727 {
01728 return ( (ConstraintImpl*) getCounted() )->getConstraintI();
01729 }
01730
01731 std::string Constraint::name() const
01732 {
01733 return ( (ConstraintImpl*) getCounted() )->getName();
01734 }
01735
01736 std::string Constraint::description() const
01737 {
01738 return ( (ConstraintImpl*) getCounted() )->getDescription();
01739 }
01740
01741 std::vector<std::string> Constraint::equation() const
01742 {
01743 return ( (ConstraintImpl*) getCounted() )->getEquation();
01744 }
01745
01746 std::set<ObjectEventType> Constraint::events() const
01747 {
01748 return ( (ConstraintImpl*) getCounted() )->getEvents();
01749 }
01750
01751 ConstraintPriority Constraint::priority() const
01752 {
01753 return ( (ConstraintImpl*) getCounted() )->getPriority();
01754 }
01755
01756 ConstraintDepth Constraint::depth() const
01757 {
01758 return ( (ConstraintImpl*) getCounted() )->getDepth();
01759 }
01760
01761 };