00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef MONImpl_h
00023 #define MONImpl_h
00024
00025 #pragma warning( disable : 4786 )
00026
00027 #include "StdAfx.h"
00028 #include <string>
00029 #include <map>
00030 #include <set>
00031 #include <vector>
00032 #include "Meta.h"
00033 #include "Utils.h"
00034 #include "Common.h"
00035
00036 namespace MON
00037 {
00038 class ProjectImpl;
00039 class ObjectImpl;
00040 class FolderImpl;
00041 class FCOImpl;
00042 class AtomImpl;
00043 class ModelImpl;
00044 class SetImpl;
00045 class ReferenceImpl;
00046 class ConnectionImpl;
00047 class AspectImpl;
00048 class RegistryNodeImpl;
00049 class ConstraintImpl;
00050
00051 typedef Util::ComPtr<IMgaMetaProject> ProjectPtr;
00052 typedef Util::ComPtr<IMgaMetaBase> ObjectPtr;
00053 typedef Util::ComPtr<IMgaMetaFolder> FolderPtr;
00054 typedef Util::ComPtr<IMgaMetaFCO> FCOPtr;
00055 typedef Util::ComPtr<IMgaMetaAtom> AtomPtr;
00056 typedef Util::ComPtr<IMgaMetaModel> ModelPtr;
00057 typedef Util::ComPtr<IMgaMetaSet> SetPtr;
00058 typedef Util::ComPtr<IMgaMetaReference> ReferencePtr;
00059 typedef Util::ComPtr<IMgaMetaConnection> ConnectionPtr;
00060
00061 class FolderContainmentImpl;
00062 class ContainmentImpl;
00063 class AttributeImpl;
00064 class AttributeAggregationImpl;
00065 class ReferenceAssocImpl;
00066 class SetMembershipImpl;
00067 class ConnectionSpecImpl;
00068 class ConnectionRoleImpl;
00069 class ConnectionEndImpl;
00070 class ContainmentPartImpl;
00071 class ModelInAspectImpl;
00072
00073 typedef Util::ComPtr<IMgaMetaRole> ContainmentPtr;
00074 typedef Util::ComPtr<IMgaMetaAttribute> AttributePtr;
00075 typedef Util::ComPtr<IMgaMetaPart> PartPtr;
00076 typedef Util::ComPtr<IMgaMetaAspect> AspectPtr;
00077 typedef Util::ComPtr<IMgaMetaRegNode> RegNodePtr;
00078 typedef Util::ComPtr<IMgaConstraint> ConstraintPtr;
00079
00080
00081
00082
00083
00084
00085
00086 class ProjectImpl
00087 : public Util::GenRefCounted
00088 {
00089
00090 public :
00091 typedef std::map<long,ObjectImpl*> Ref2ObjectMap;
00092 typedef std::map<std::string,ObjectImpl*> Name2ObjectMap;
00093 typedef std::set<ObjectImpl*> ObjectSet;
00094 typedef std::map<int,ObjectSet> Type2ObjectsMap;
00095 typedef std::map<ProjectPtr,ProjectImpl*> ProjectMap;
00096
00097
00098 private :
00099 static ProjectMap mapProjects;
00100
00101 ProjectPtr m_spProject;
00102
00103 Ref2ObjectMap m_mapObjectsByRef;
00104 Name2ObjectMap m_mapObjectsByName;
00105
00106 Type2ObjectsMap m_mapObjectsByType;
00107 std::set<FolderContainmentImpl*> m_setFolderContainments;
00108 std::set<AttributeAggregationImpl*> m_setAttributeAggregations;
00109 std::set<ReferenceAssocImpl*> m_setReferenceAssocs;
00110 std::set<SetMembershipImpl*> m_setSetMemberships;
00111 std::set<ConnectionEndImpl*> m_setConnectionEnds;
00112 std::set<ModelInAspectImpl*> m_setModelInAspects;
00113
00114 FolderImpl* m_pRootFolder;
00115
00116
00117 private :
00118 ProjectImpl( IMgaMetaProject* pProject );
00119 public :
00120 static ProjectImpl* attach( IMgaMetaProject* pProject );
00121 ~ProjectImpl();
00122 bool setDeleted();
00123
00124
00125 public :
00126 ProjectPtr getProjectI() const;
00127 std::string getName() const;
00128 std::string getDisplayedName() const;
00129 std::string getAuthor() const;
00130 std::string getComment() const;
00131 std::string getCreationTime() const;
00132 std::string getInfoString( bool bWithIdentifiers = false ) const;
00133
00134
00135 public :
00136 FolderImpl* getRootFolder() const;
00137 const ObjectSet& getObjects( ObjectType eType ) const;
00138 const std::set<FolderContainmentImpl*>& getFolderContainments() const;
00139 const std::set<AttributeAggregationImpl*>& getAttributeAggregations() const;
00140 const std::set<ReferenceAssocImpl*>& getReferenceAssocs() const;
00141 const std::set<SetMembershipImpl*>& getSetMemberships() const;
00142 const std::set<ConnectionEndImpl*>& getConnectionEnds() const;
00143 const std::set<ModelInAspectImpl*>& getModelInAspects() const;
00144
00145
00146 public :
00147 ObjectImpl* findByRef( long lRelID ) const;
00148 ObjectImpl* findByName( const std::string& strName ) const;
00149
00150
00151 private :
00152 FolderImpl* processFolder( const FolderPtr& spFolder );
00153 FCOImpl* processFCO( const FCOPtr& spFCO );
00154 AtomImpl* processAtom( const AtomPtr& spAtom );
00155 ModelImpl* processModel( const ModelPtr& spModel );
00156 void processModel( ModelImpl* pModel );
00157 ReferenceImpl* processReference( const ReferencePtr& spReference );
00158 void processReference( ReferenceImpl* pReference );
00159 ConnectionImpl* processConnection( const ConnectionPtr& spConnection );
00160 void processConnection( ConnectionImpl* pConnection );
00161 SetImpl* processSet( const SetPtr& spSet );
00162 void processSet( SetImpl* pSet );
00163 AttributeImpl* processAttribute( const AttributePtr& spAttribute, FCOImpl* pOwner );
00164 AspectImpl* processAspect( const AspectPtr& spAspect );
00165 void insertObject( ObjectImpl* pObject );
00166 void getRolesResolved( const std::set<ContainmentImpl*>& setIn, bool bResolveReference, std::set<ContainmentImpl*>& roles, std::set<FolderContainmentImpl*>& foldroles ) const;
00167 std::set<ContainmentImpl*> getRoles( const std::set<ContainmentImpl*>& setIn, const std::string& strDescIn, bool bResolveReference ) const;
00168 std::set<ContainmentImpl*> getLocalRoles( FCOImpl* pKind, const std::string& strDescIn ) const;
00169 std::set<ContainmentImpl*> getGlobalRoles( const std::string& strDescIn ) const;
00170
00171
00172 private :
00173 ProjectImpl( const ProjectImpl& pI ) { }
00174 ProjectImpl& operator = ( const ProjectImpl& pI ) { return *this; }
00175 };
00176
00177
00178
00179
00180
00181
00182
00183 class ObjectImpl
00184 : public Util::GenRefCounted
00185 {
00186
00187 protected :
00188 typedef std::map<ObjectPtr,ObjectImpl*> ObjectMap;
00189 typedef std::map<std::string, RegistryNodeImpl*> RegistryMap;
00190
00191
00192 private :
00193 static ObjectMap mapObjects;
00194
00195 ProjectImpl* m_pProject;
00196 ObjectPtr m_spObject;
00197 RegistryMap m_mapRegistry;
00198
00199
00200 private :
00201 ObjectImpl( IMgaMetaBase* spObject, ProjectImpl* pProject );
00202 static ObjectImpl* find( IMgaMetaBase* spObject );
00203 static ObjectImpl* attachI( IMgaMetaBase* spObject, ProjectImpl* pProject = NULL );
00204 public :
00205 static ObjectImpl* attach( IMgaMetaBase* spObject );
00206 virtual ~ObjectImpl();
00207 bool setDeleted();
00208
00209
00210 public :
00211 ObjectPtr getObjectI() const;
00212 ProjectImpl* getProject() const;
00213
00214
00215 public :
00216 long getRef() const;
00217 std::string getName() const;
00218 std::string getDisplayedName() const;
00219 ObjectType getType() const;
00220
00221 virtual std::string getInfoString( bool bWithIdentifiers = false, bool bWithRef = false ) const = 0;
00222
00223 RegistryNodeImpl* getRegistryNode( const std::string& strPath );
00224
00225
00226 protected :
00227 std::string getInfoStringHelper( const std::string& strStereotype, bool bWithIdentifiers, bool bWithRef ) const;
00228
00229
00230 protected :
00231 ObjectImpl() { };
00232 private :
00233 ObjectImpl( const ObjectImpl& oI ) { }
00234 ObjectImpl& operator = ( const ObjectImpl& oI ) { return *this; }
00235
00236
00237 friend class ProjectImpl;
00238 friend class FolderImpl;
00239 friend class FCOImpl;
00240 friend class AttributeImpl;
00241 friend class AspectImpl;
00242 friend class ContainmentImpl;
00243 friend class ContainmentPartImpl;
00244 };
00245
00246
00247
00248
00249
00250
00251
00252 class FolderImpl
00253 : public ObjectImpl
00254 {
00255
00256 private :
00257 std::set<ConstraintImpl*> m_setConstraints;
00258
00259
00260 private :
00261 FolderImpl( IMgaMetaFolder* spFolder, ProjectImpl* pProject );
00262 static FolderImpl* attachI( IMgaMetaFolder* spFolder, ProjectImpl* pProject = NULL );
00263 public :
00264 static FolderImpl* attach( IMgaMetaFolder* spFolder );
00265 ~FolderImpl();
00266
00267
00268 public:
00269 FolderPtr getFolderI() const;
00270 virtual std::string getInfoString( bool bWithIdentifiers = false, bool bWithRef = false ) const;
00271
00272
00273 public :
00274 std::set<ConstraintImpl*> getConstraints() const;
00275
00276
00277 private :
00278 FolderImpl( const FolderImpl& fI ) { }
00279 FolderImpl& operator = ( const FolderImpl& fI ) { return *this; }
00280
00281
00282 friend class ProjectImpl;
00283 friend class ObjectImpl;
00284 };
00285
00286
00287
00288
00289
00290
00291
00292 class FCOImpl
00293 : public ObjectImpl
00294 {
00295
00296 private :
00297 std::set<ConstraintImpl*> m_setConstraints;
00298 std::set<AttributeImpl*> m_setAttributes;
00299
00300
00301 private :
00302 FCOImpl( IMgaMetaFCO* spFCO, ProjectImpl* pProject );
00303 static FCOImpl* find( IMgaMetaFCO* spFCO );
00304 static FCOImpl* attachI( IMgaMetaFCO* spFCO, ProjectImpl* pProject = NULL );
00305 public :
00306 static FCOImpl* attach( IMgaMetaFCO* spFCO );
00307 virtual ~FCOImpl();
00308
00309
00310 public :
00311 FCOPtr getFCOI() const;
00312
00313
00314 public :
00315 std::set<ConstraintImpl*> getConstraints() const;
00316 const std::set<AttributeImpl*>& getAttributes() const;
00317
00318
00319 private :
00320 FCOImpl() { }
00321 FCOImpl( const FCOImpl& fI ) { }
00322 FCOImpl& operator = ( const FCOImpl& fI ) { return *this; }
00323
00324
00325 friend class ProjectImpl;
00326 friend class ObjectImpl;
00327 friend class AtomImpl;
00328 friend class ModelImpl;
00329 friend class ReferenceImpl;
00330 friend class ConnectionImpl;
00331 friend class SetImpl;
00332 };
00333
00334
00335
00336
00337
00338
00339
00340 class AtomImpl
00341 : public FCOImpl
00342 {
00343
00344 private :
00345
00346
00347 private :
00348 AtomImpl( IMgaMetaAtom* spAtom, ProjectImpl* pProject );
00349 static AtomImpl* attachI( IMgaMetaAtom* spAtom, ProjectImpl* pProject = NULL );
00350 public :
00351 static AtomImpl* attach( IMgaMetaAtom* spAtom );
00352 ~AtomImpl();
00353
00354
00355 public :
00356 AtomPtr getAtomI() const;
00357 std::string getInfoString( bool bWithIdentifiers = false, bool bWithRef = false ) const;
00358
00359
00360 private :
00361 AtomImpl( const AtomImpl& aI ) { }
00362 AtomImpl& operator = ( const AtomImpl& aI ) { return *this; }
00363
00364
00365 friend class ProjectImpl;
00366 friend class FCOImpl;
00367 };
00368
00369
00370
00371
00372
00373
00374
00375 class ModelImpl
00376 : public FCOImpl
00377 {
00378
00379 private :
00380
00381
00382 private :
00383 ModelImpl( IMgaMetaModel* spModel, ProjectImpl* pProject );
00384 static ModelImpl* attachI( IMgaMetaModel* spModel, ProjectImpl* pProject = NULL );
00385 public :
00386 static ModelImpl* attach( IMgaMetaModel* spModel );
00387 ~ModelImpl();
00388
00389
00390 public :
00391 ModelPtr getModelI() const;
00392 std::string getInfoString( bool bWithIdentifiers = false, bool bWithRef = false ) const;
00393
00394
00395 private :
00396 ModelImpl( const ModelImpl& mI ) { }
00397 ModelImpl& operator = ( const ModelImpl& mI ) { return *this; }
00398
00399
00400 friend class ProjectImpl;
00401 friend class FCOImpl;
00402 friend class ContainmentImpl;
00403 };
00404
00405
00406
00407
00408
00409
00410
00411 class SetImpl
00412 : public FCOImpl
00413 {
00414
00415 private :
00416
00417
00418 private :
00419 SetImpl( IMgaMetaSet* spSet, ProjectImpl* pProject );
00420 static SetImpl* attachI( IMgaMetaSet* spSet, ProjectImpl* pProject = NULL );
00421 public :
00422 static SetImpl* attach( IMgaMetaSet* spSet );
00423 ~SetImpl();
00424
00425
00426 public :
00427 SetPtr getSetI() const;
00428 std::string getInfoString( bool bWithIdentifiers = false, bool bWithRef = false ) const;
00429
00430
00431 private :
00432 SetImpl( const SetImpl& sI ) { }
00433 SetImpl& operator = ( const SetImpl& sI ) { return *this; }
00434
00435
00436 friend class ProjectImpl;
00437 friend class FCOImpl;
00438 };
00439
00440
00441
00442
00443
00444
00445
00446 class ReferenceImpl
00447 : public FCOImpl
00448 {
00449
00450 private :
00451
00452
00453 private :
00454 ReferenceImpl( IMgaMetaReference* spReference, ProjectImpl* pProject );
00455 static ReferenceImpl* attachI( IMgaMetaReference* spReference, ProjectImpl* pProject = NULL );
00456 public :
00457 static ReferenceImpl* attach( IMgaMetaReference* spReference );
00458 ~ReferenceImpl();
00459
00460
00461 public :
00462 ReferencePtr getReferenceI() const;
00463 std::string getInfoString( bool bWithIdentifiers = false, bool bWithRef = false ) const;
00464
00465
00466 private :
00467 ReferenceImpl( const ReferenceImpl& rI ) { }
00468 ReferenceImpl& operator = ( const ReferenceImpl& rI ) { return *this; }
00469
00470
00471 friend class ProjectImpl;
00472 friend class FCOImpl;
00473 };
00474
00475
00476
00477
00478
00479
00480
00481 class ConnectionImpl
00482 : public FCOImpl
00483 {
00484
00485 private :
00486 std::set<ConnectionSpecImpl*> m_setConnSpecs;
00487 bool m_bBidirectional;
00488
00489
00490 private :
00491 ConnectionImpl( IMgaMetaConnection* spConnection, ProjectImpl* pProject );
00492 static ConnectionImpl* attachI( IMgaMetaConnection* spConnection, ProjectImpl* pProject = NULL );
00493 public :
00494 static ConnectionImpl* attach( IMgaMetaConnection* spConnection );
00495 ~ConnectionImpl();
00496
00497
00498 public :
00499 ConnectionPtr getConnectionI() const;
00500 const std::set<ConnectionSpecImpl*>& getConnectionSpecs() const;
00501 bool isSimple() const;
00502 bool isBidirectional() const;
00503 std::string getInfoString( bool bWithIdentifiers = false, bool bWithRef = false ) const;
00504
00505
00506 private :
00507 ConnectionImpl( const ConnectionImpl& cI ) { }
00508 ConnectionImpl& operator = ( const ConnectionImpl& cI ) { return *this; }
00509
00510
00511 friend class ProjectImpl;
00512 friend class FCOImpl;
00513 };
00514
00515
00516
00517
00518
00519
00520
00521 class ContainmentImpl
00522 : public ObjectImpl
00523 {
00524
00525 private :
00526 ModelImpl* m_pParent;
00527 FCOImpl* m_pChild;
00528
00529
00530 private :
00531 ContainmentImpl( IMgaMetaRole* spRole, ProjectImpl* pProject );
00532 static ContainmentImpl* attachI( IMgaMetaRole* spRole, ProjectImpl* pProject = NULL );
00533 public :
00534 static ContainmentImpl* attach( IMgaMetaRole* spRole );
00535 ~ContainmentImpl();
00536
00537
00538 public :
00539 ContainmentPtr getContainmentI() const;
00540 ModelImpl* getParent() const;
00541 FCOImpl* getChild() const;
00542 std::string getInfoString( bool bWithIdentifiers = false, bool bWithRef = false ) const;
00543
00544
00545 private :
00546 ContainmentImpl( const ContainmentImpl& cI ) { }
00547 ContainmentImpl& operator = ( const ContainmentImpl& cI ) { return *this; }
00548
00549
00550 friend class ProjectImpl;
00551 friend class ObjectImpl;
00552 friend class ContainmentPartImpl;
00553 };
00554
00555
00556
00557
00558
00559
00560
00561 class AttributeImpl
00562 : public ObjectImpl
00563 {
00564
00565 public :
00566 typedef std::pair<std::string,std::string> NameValue;
00567
00568
00569 private :
00570 FCOImpl* m_pOwner;
00571
00572
00573 private :
00574 AttributeImpl( IMgaMetaAttribute* spAttribute, ProjectImpl* pProject, FCOImpl* pFCO );
00575 static AttributeImpl* attachI( IMgaMetaAttribute* spAttribute, ProjectImpl* pProject = NULL, FCOImpl* pFCO = NULL );
00576 public :
00577 static AttributeImpl* attach( IMgaMetaAttribute* spAttribute );
00578 ~AttributeImpl();
00579
00580
00581 public :
00582 AttributePtr getAttributeI() const;
00583 Util::Variant getDefaultValue() const;
00584 AttributeType getValueType() const;
00585 std::vector<NameValue> getEnumItems() const;
00586 std::string getInfoString( bool bWithIdentifiers = false, bool bWithRef = false ) const;
00587 FCOImpl* getOwner() const;
00588
00589
00590 private :
00591 AttributeImpl( const AttributeImpl& cI ) { }
00592 AttributeImpl& operator = ( const AttributeImpl& cI ) { return *this; }
00593
00594
00595 friend class ProjectImpl;
00596 friend class ObjectImpl;
00597 };
00598
00599
00600
00601
00602
00603
00604
00605 class AspectImpl
00606 : public ObjectImpl
00607 {
00608
00609 private :
00610 AspectImpl( IMgaMetaAspect* spAspect, ProjectImpl* pProject );
00611 static AspectImpl* attachI( IMgaMetaAspect* spAspect, ProjectImpl* pProject = NULL );
00612 public :
00613 static AspectImpl* attach( IMgaMetaAspect* spAspect );
00614 ~AspectImpl();
00615
00616
00617 public :
00618 AspectPtr getAspectI() const;
00619 std::string getInfoString( bool bWithIdentifiers = false, bool bWithRef = false ) const;
00620
00621
00622 private :
00623 AspectImpl( const AspectImpl& cI ) { }
00624 AspectImpl& operator = ( const AspectImpl& cI ) { return *this; }
00625
00626
00627 friend class ProjectImpl;
00628 friend class ObjectImpl;
00629 friend class ContainmentPartImpl;
00630 };
00631
00632
00633
00634
00635
00636
00637
00638 class ContainmentPartImpl
00639 : public ObjectImpl
00640 {
00641
00642 private :
00643 ContainmentImpl* m_pContainment;
00644 AspectImpl* m_pAspect;
00645
00646
00647 private :
00648 ContainmentPartImpl( IMgaMetaPart* spPart, ProjectImpl* pProject );
00649 static ContainmentPartImpl* attachI( IMgaMetaPart* spPart, ProjectImpl* pProject = NULL );
00650 public :
00651 static ContainmentPartImpl* attach( IMgaMetaPart* spPart );
00652 ~ContainmentPartImpl();
00653
00654
00655 public :
00656 PartPtr getPartI() const;
00657 bool isPrimary() const;
00658 bool isLinked() const;
00659 ContainmentImpl* getContainment() const;
00660 AspectImpl* getAspect() const;
00661 std::string getInfoString( bool bWithIdentifiers = false, bool bWithRef = false ) const;
00662
00663
00664 private :
00665 ContainmentPartImpl( const ContainmentPartImpl& cI ) { }
00666 ContainmentPartImpl& operator = ( const ContainmentPartImpl& cI ) { return *this; }
00667
00668
00669 friend class ProjectImpl;
00670 friend class ObjectImpl;
00671 };
00672
00673
00674
00675
00676
00677
00678
00679 class FolderContainmentImpl
00680 : public Util::GenRefCounted
00681 {
00682
00683 private :
00684 FolderImpl* m_pParent;
00685 ObjectImpl* m_pChild;
00686
00687
00688 private :
00689 FolderContainmentImpl( FolderImpl* pParent, ObjectImpl* pChild );
00690 public :
00691 ~FolderContainmentImpl();
00692 bool setDeleted();
00693
00694
00695 public :
00696 ProjectImpl* getProject() const;
00697 FolderImpl* getParent() const;
00698 ObjectImpl* getChild() const;
00699 std::string getInfoString( bool bWithIdentifiers = false, bool bWithRef = false ) const;
00700
00701
00702 private :
00703 FolderContainmentImpl( const FolderContainmentImpl& fcI ) { }
00704 FolderContainmentImpl& operator = ( const FolderContainmentImpl& fcI ) { return *this; }
00705
00706
00707 friend class ProjectImpl;
00708 };
00709
00710
00711
00712
00713
00714
00715
00716 class AttributeAggregationImpl
00717 : public Util::GenRefCounted
00718 {
00719
00720 private :
00721 FCOImpl* m_pFCO;
00722 AttributeImpl* m_pAttribute;
00723
00724
00725 private :
00726 AttributeAggregationImpl( FCOImpl* pFCO, AttributeImpl* pAttribute );
00727 public :
00728 ~AttributeAggregationImpl();
00729 bool setDeleted();
00730
00731
00732 public :
00733 ProjectImpl* getProject() const;
00734 FCOImpl* getFCO() const;
00735 AttributeImpl* getAttribute() const;
00736 std::string getInfoString( bool bWithIdentifiers = false, bool bWithRef = false ) const;
00737
00738
00739 private :
00740 AttributeAggregationImpl( const AttributeAggregationImpl& aaI ) { }
00741 AttributeAggregationImpl& operator = ( const AttributeAggregationImpl& aaI ) { return *this; }
00742
00743
00744 friend class ProjectImpl;
00745 };
00746
00747
00748
00749
00750
00751
00752 class ReferenceAssocImpl
00753 : public Util::GenRefCounted
00754 {
00755
00756 private :
00757 ReferenceImpl* m_pReference;
00758 FCOImpl* m_pTarget;
00759
00760
00761 private :
00762 ReferenceAssocImpl( ReferenceImpl* pReference, FCOImpl* pTarget );
00763 public :
00764 ~ReferenceAssocImpl();
00765 bool setDeleted();
00766
00767
00768 public :
00769 ProjectImpl* getProject() const;
00770 ReferenceImpl* getReference() const;
00771 FCOImpl* getTarget() const;
00772 std::string getInfoString( bool bWithIdentifiers = false, bool bWithRef = false ) const;
00773
00774
00775 private :
00776 ReferenceAssocImpl( const ReferenceAssocImpl& raI ) { }
00777 ReferenceAssocImpl& operator = ( const ReferenceAssocImpl& raI ) { return *this; }
00778
00779
00780 friend class ProjectImpl;
00781 };
00782
00783
00784
00785
00786
00787
00788
00789 class SetMembershipImpl
00790 : public Util::GenRefCounted
00791 {
00792
00793 private :
00794 SetImpl* m_pSet;
00795 ContainmentImpl* m_pMember;
00796
00797
00798 private :
00799 SetMembershipImpl( SetImpl* pSet, ContainmentImpl* pMember );
00800 public :
00801 ~SetMembershipImpl();
00802 bool setDeleted();
00803
00804
00805 public :
00806 ProjectImpl* getProject() const;
00807 SetImpl* getSet() const;
00808 ContainmentImpl* getMember() const;
00809 std::string getInfoString( bool bWithIdentifiers = false, bool bWithRef = false ) const;
00810
00811
00812 private :
00813 SetMembershipImpl( const SetMembershipImpl& smI ) { }
00814 SetMembershipImpl& operator = ( const SetMembershipImpl& smI ) { return *this; }
00815
00816
00817 friend class ProjectImpl;
00818 };
00819
00820
00821
00822
00823
00824
00825
00826 class ConnectionSpecImpl
00827 : public Util::GenRefCounted
00828 {
00829
00830 private :
00831 ConnectionImpl* m_pConnection;
00832 std::set<ConnectionRoleImpl*> m_setRoles;
00833 int m_iNum;
00834
00835
00836 private :
00837 ConnectionSpecImpl( ConnectionImpl* pConnection, int iNum );
00838 public :
00839 ~ConnectionSpecImpl();
00840 bool setDeleted();
00841
00842
00843 public :
00844 ProjectImpl* getProject() const;
00845 ConnectionImpl* getConnection() const;
00846 const std::set<ConnectionRoleImpl*>& getRoles() const;
00847 int getNumber() const;
00848 std::string getInfoString( bool bWithIdentifiers = false, bool bWithRef = false ) const;
00849
00850
00851 private :
00852 ConnectionSpecImpl( const ConnectionSpecImpl& smI ) { }
00853 ConnectionSpecImpl& operator = ( const ConnectionSpecImpl& smI ) { return *this; }
00854
00855
00856 friend class ProjectImpl;
00857 };
00858
00859
00860
00861
00862
00863
00864
00865 class ConnectionRoleImpl
00866 : public Util::GenRefCounted
00867 {
00868
00869 private :
00870 std::string m_strRole;
00871 ConnectionSpecImpl* m_pSpec;
00872
00873
00874 private :
00875 ConnectionRoleImpl( ConnectionSpecImpl* pConnection, const std::string& strRole );
00876 public :
00877 ~ConnectionRoleImpl();
00878 bool setDeleted();
00879
00880
00881 public :
00882 ProjectImpl* getProject() const;
00883 ConnectionSpecImpl* getConnectionSpec() const;
00884 std::string getName() const;
00885 std::string getInfoString( bool bWithIdentifiers = false, bool bWithRef = false ) const;
00886
00887
00888 private :
00889 ConnectionRoleImpl( const ConnectionRoleImpl& smI ) { }
00890 ConnectionRoleImpl& operator = ( const ConnectionRoleImpl& smI ) { return *this; }
00891
00892
00893 friend class ProjectImpl;
00894 };
00895
00896
00897
00898
00899
00900
00901
00902 class ConnectionEndImpl
00903 : public Util::GenRefCounted
00904 {
00905
00906 private :
00907 ConnectionRoleImpl* m_pConnRole;
00908 ContainmentImpl* m_pRole;
00909
00910
00911 private :
00912 ConnectionEndImpl( ConnectionRoleImpl* pConnectionRole, ContainmentImpl* pRole );
00913 public :
00914 ~ConnectionEndImpl();
00915 bool setDeleted();
00916
00917
00918 public :
00919 ProjectImpl* getProject() const;
00920 ConnectionRoleImpl* getConnectionRole() const;
00921 ContainmentImpl* getEnd() const;
00922 std::string getInfoString( bool bWithIdentifiers = false, bool bWithRef = false ) const;
00923
00924
00925 private :
00926 ConnectionEndImpl( const ConnectionEndImpl& smI ) { }
00927 ConnectionEndImpl& operator = ( const ConnectionRoleImpl& smI ) { return *this; }
00928
00929
00930 friend class ProjectImpl;
00931 };
00932
00933
00934
00935
00936
00937
00938
00939 class ModelInAspectImpl
00940 : public Util::GenRefCounted
00941 {
00942
00943 private :
00944 AspectImpl* m_pAspect;
00945 ModelImpl* m_pModel;
00946
00947
00948 private :
00949 ModelInAspectImpl( AspectImpl* pAspect, ModelImpl* pModel );
00950 public :
00951 ~ModelInAspectImpl();
00952 bool setDeleted();
00953
00954
00955 public :
00956 ProjectImpl* getProject() const;
00957 AspectImpl* getAspect() const;
00958 ModelImpl* getModel() const;
00959 std::string getInfoString( bool bWithIdentifiers = false, bool bWithRef = false ) const;
00960
00961
00962 private :
00963 ModelInAspectImpl( const ModelInAspectImpl& smI ) { }
00964 ModelInAspectImpl& operator = ( const ModelInAspectImpl& smI ) { return *this; }
00965
00966
00967 friend class ProjectImpl;
00968 };
00969
00970
00971
00972
00973
00974
00975
00976 class RegistryNodeImpl
00977 : public Util::GenRefCounted
00978 {
00979
00980 private :
00981 ObjectImpl* m_pObject;
00982 RegNodePtr m_spNode;
00983 std::string m_strPath;
00984
00985
00986 protected :
00987 RegistryNodeImpl( IMgaMetaRegNode* spNode, ObjectImpl* pObject, const std::string& strPath );
00988 public :
00989 ~RegistryNodeImpl();
00990 bool setDeleted();
00991
00992
00993 public :
00994 ProjectImpl* getProject() const;
00995 ObjectImpl* getObject() const;
00996 RegNodePtr getRegNodeI() const;
00997 bool isRootNode() const;
00998
00999 std::string getName() const;
01000 std::string getPath() const;
01001 std::string getValue() const;
01002
01003 std::string getValueByPath( const std::string& strPath ) const;
01004
01005 RegistryNodeImpl* getParent() const;
01006 std::set<RegistryNodeImpl*> getChildren() const;
01007 RegistryNodeImpl* getChild( const std::string& strName ) const;
01008
01009 RegistryNodeImpl* getChildByPath( const std::string& strPath ) const;
01010
01011
01012 private :
01013 RegistryNodeImpl( const RegistryNodeImpl& oI ) { }
01014 RegistryNodeImpl& operator = ( const RegistryNodeImpl& oI ) { return *this; }
01015
01016
01017 friend class ObjectImpl;
01018 };
01019
01020
01021
01022
01023
01024
01025
01026 class ConstraintImpl
01027 : public Util::GenRefCounted
01028 {
01029
01030 private :
01031 ObjectImpl* m_pObject;
01032 ConstraintPtr m_spConstraint;
01033
01034
01035 protected :
01036 ConstraintImpl( IMgaConstraint* spConstraint, ObjectImpl* pObject );
01037 public :
01038 ~ConstraintImpl();
01039 bool setDeleted();
01040
01041
01042 public :
01043 ProjectImpl* getProject() const;
01044 ObjectImpl* getObject() const;
01045 ConstraintPtr getConstraintI() const;
01046
01047 std::string getName() const;
01048 std::string getDescription() const;
01049 std::vector<std::string> getEquation() const;
01050 std::set<ObjectEventType> getEvents() const;
01051 ConstraintPriority getPriority() const;
01052 ConstraintDepth getDepth() const;
01053
01054
01055 private :
01056 ConstraintImpl( const ConstraintImpl& oI ) { }
01057 ConstraintImpl& operator = ( const ConstraintImpl& oI ) { return *this; }
01058
01059
01060 friend class FCOImpl;
01061 friend class FolderImpl;
01062 };
01063
01064 };
01065
01066 #endif // MONImpl_h