00001 #ifndef ROLEREP_H
00002 #define ROLEREP_H
00003
00004 class ConnectionRep;
00005 class ConnJoint;
00006 class ModelRep;
00007 class SetRep;
00008 class AtomRep;
00009 class ReferenceRep;
00010 class RoleRep;
00011 class PartRep;
00012 class FCO;
00013
00014 #include "string"
00015 #include "list"
00016 #include "vector"
00017
00018 class StringLex
00019 {
00020 public:
00021 bool operator()( const std::string& peer1, const std::string& peer2) const;
00022 };
00023
00024 class PartStringLex
00025 {
00026 public:
00027 bool operator()( const std::string& peer1, const std::string& peer2) const;
00028 };
00029
00030 class RoleStringLex
00031 {
00032 public:
00033 bool operator()( const RoleRep& peer1, const RoleRep& peer2) const;
00034 };
00035
00036 class RoleRep {
00037
00038 public:
00039
00040 typedef std::vector<RoleRep> RoleRepSeries;
00041 typedef RoleRepSeries::iterator RoleRepSeries_Iterator;
00042 typedef RoleRepSeries::const_iterator RoleRepSeries_ConstIterator;
00043
00044 RoleRep(
00045 const std::string &role_name,
00046 FCO* ptr,
00047 ModelRep* model_ptr,
00048 bool is_port,
00049 const std::string &cardinality,
00050 bool inh_role,
00051 bool long_form);
00052
00053 RoleRep( const RoleRep & peer) ;
00054 const RoleRep& operator=( const RoleRep & peer);
00055 bool operator==( const RoleRep& peer) const;
00056 bool operator!=( const RoleRep& peer) const;
00057
00058 friend bool operator<(const RoleRep&, const RoleRep&);
00059
00060
00061 const std::string& getOnlyRoleName() const;
00062 std::string getSmartRoleName() const;
00063
00064 FCO * getFCOPtr() const;
00065 ModelRep * getModelRepPtr() const;
00066 bool isPort() const;
00067 const std::string& getCardinality() const;
00068
00069 void setInheritedRole( bool val);
00070 bool isInheritedRole() const;
00071
00072 void setLongForm( bool val);
00073 bool isLongForm() const;
00074
00075 private:
00076 std::string m_roleName;
00077 FCO* m_ptr;
00078 ModelRep * m_model;
00079 bool m_isPort;
00080 std::string m_cardinality;
00081
00082
00083
00084
00085
00086 bool m_inheritedRole;
00087
00088
00089
00090
00091 bool m_longForm;
00092
00093 };
00094 #endif //ROLEREP_H