00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #ifndef TORC_GENERIC_OM_PORTREFERENCE_HPP
00017 #define TORC_GENERIC_OM_PORTREFERENCE_HPP
00018
00019 #include "torc/generic/om/PointerTypes.hpp"
00020 #include "torc/generic/om/DumpRestoreConfig.hpp"
00021
00022
00023 #ifdef GENOM_SERIALIZATION
00024 #include <boost/serialization/access.hpp>
00025 #endif //GENOM_SERIALIZATION
00026
00027 #include "torc/generic/om/Composite.hpp"
00028 #include "torc/generic/om/Connectable.hpp"
00029 #include "torc/generic/om/Instance.hpp"
00030 #include "torc/generic/om/ParentedObject.hpp"
00031 #include "torc/generic/om/PropertyContainer.hpp"
00032 #include "torc/generic/om/Visitable.hpp"
00033
00034 namespace torc { namespace generic { class Port; } }
00035 namespace torc { namespace generic { class PortAttributes; } }
00036
00037 namespace torc {
00038
00039 namespace generic {
00040
00041
00042
00043
00044
00045
00046 class PortReference
00047 : public Connectable,
00048 public PropertyContainer,
00049 public Visitable,
00050 virtual public Composite<PortReference>,
00051 public ParentedObject<Instance> {
00052
00053 #ifdef GENOM_SERIALIZATION
00054 friend class boost::serialization::access;
00055 #endif //GENOM_SERIALIZATION
00056
00057 public:
00058 PortReference();
00059
00060 virtual
00061 ~PortReference() throw();
00062
00063 private:
00064 PortReference(const PortReference & source);
00065
00066 PortReference &
00067 operator=(const PortReference & source) throw();
00068
00069 public:
00070
00071
00072
00073
00074
00075 inline PortSharedPtr
00076 getMaster() const throw();
00077
00078
00079
00080
00081
00082
00083 virtual void
00084 bindToMasterPort(const PortSharedPtr &inMaster) throw(Error);
00085
00086
00087
00088
00089
00090
00091 inline const PortAttributesSharedPtr
00092 getAttributes() const throw();
00093
00094
00095
00096
00097
00098
00099
00100
00101 void
00102 setAttributes(const PortAttributesSharedPtr & inSource) throw();
00103
00104
00105
00106
00107
00108
00109 std::string
00110 getName() throw();
00111
00112 private:
00113 #ifdef GENOM_SERIALIZATION
00114 template<class Archive> void
00115 serialize( Archive &ar, unsigned int );
00116 #endif //GENOM_SERIALIZATION
00117
00118 PortSharedPtr mMaster;
00119 PortAttributesSharedPtr mAttributes;
00120 };
00121
00122
00123
00124
00125
00126
00127 inline PortSharedPtr
00128 PortReference::getMaster() const throw() {
00129 return mMaster;
00130 }
00131
00132
00133
00134
00135
00136
00137 inline const PortAttributesSharedPtr
00138 PortReference::getAttributes() const throw() {
00139 return mAttributes;
00140 }
00141
00142 }
00143
00144 }
00145 #endif // TORC_GENERIC_OM_PORTREFERENCE_HPP