00001 #ifndef CONNECTIONREP_H 00002 #define CONNECTIONREP_H 00003 00004 #include "FCO.h" 00005 #include "ConnJoint.h" 00006 #include "list" 00007 00009 class ConnectionRep : public FCO 00010 { 00011 public: // constant strings 00012 static const std::string Color_str;//"IsAbstract" 00013 static const std::string ConnLineEnd_str;//"Icon" 00014 static const std::string ConnLineStart_str;//"PortIcon" 00015 static const std::string ConnLineType_str;//"Decorator" 00016 static const std::string LabelFormatStr_str;//"LabelFormatStr" 00017 static const std::string SrcAttrLabel1_str;//"SrcAttrLabel1" 00018 static const std::string SrcAttrLabel2_str;//"SrcAttrLabel2" 00019 static const std::string DstAttrLabel1_str;//"DstAttrLabel1" 00020 static const std::string DstAttrLabel2_str;//"DstAttrLabel2" 00021 00022 public: 00023 ConnectionRep( BON::FCO& ptr, BON::FCO& resp_ptr); 00024 ~ConnectionRep(); 00025 00026 /*virtual*/ std::string doDump(); 00027 00028 inline Any::KIND_TYPE getMyKind() const { return Any::CONN; } 00029 00030 public: 00031 /*virtual*/ void initAttributes(); 00032 void addJoint( ConnJoint & joint); 00033 void appendJointElements( const ConnJoint & joint); 00034 void inherit(); 00035 bool checkConnectionTargets(); 00036 void createConstraints( Sheet*); 00037 00038 std::string dumpConnDetails(); 00039 00040 protected: 00041 std::list<ConnJoint> m_jointList; 00042 00043 std::string m_sAttrColor; 00044 std::string m_sAttrConnLineEnd; 00045 std::string m_sAttrConnLineStart; 00046 std::string m_sAttrConnLineType; 00047 std::string m_sAttrLabelFormatStr; 00048 std::string m_sAttrSrcAttrLabel1; 00049 std::string m_sAttrSrcAttrLabel2; 00050 std::string m_sAttrDstAttrLabel1; 00051 std::string m_sAttrDstAttrLabel2; 00052 00053 private: // forbiding copy 00054 ConnectionRep( const ConnectionRep&); 00055 const ConnectionRep& operator=( const ConnectionRep&); 00056 }; 00057 00058 #endif //CONNECTIONREP_H