00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #ifndef TORC_GENERIC_OM_SCALARPORTREFERENCE_HPP
00017 #define TORC_GENERIC_OM_SCALARPORTREFERENCE_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
00028 #include "torc/generic/om/PortReference.hpp"
00029 #include "torc/generic/om/Scalar.hpp"
00030 #include "torc/generic/om/FactoryType.hpp"
00031 #include "torc/generic/om/VisitorType.hpp"
00032 #include "torc/generic/util/Error.hpp"
00033
00034 namespace torc { namespace generic { class BaseVisitor; } }
00035
00036 namespace torc {
00037
00038 namespace generic {
00039
00040
00041
00042
00043
00044
00045 class ScalarPortReference
00046 : public PortReference,
00047 public Scalar<PortReference> {
00048 #ifdef GENOM_SERIALIZATION
00049 friend class boost::serialization::access;
00050 #endif //GENOM_SERIALIZATION
00051
00052 friend class FactoryType<ScalarPortReference>;
00053
00054 public:
00055 typedef VisitorType<ScalarPortReference> Visitor;
00056
00057
00058
00059
00060 class Factory: public FactoryType<ScalarPortReference>
00061 {
00062 public:
00063 using FactoryType<ScalarPortReference>::create;
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073 virtual ScalarPortReferenceSharedPtr
00074 newScalarPortReferencePtr( const InstanceSharedPtr &inInstancePtr,
00075 const PortSharedPtr &inPortPtr,
00076 const PortBundleReferenceSharedPtr &inParentCollection
00077 = PortBundleReferenceSharedPtr() ) throw(Error);
00078 };
00079
00080 virtual void
00081 accept(BaseVisitor & inoutVisitor) throw(Error);
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100
00101
00102
00103
00104
00105
00106
00107
00108
00109
00110
00111 virtual Connection
00112 connect(const NetSharedPtr &inNet) throw(Error);
00113
00114 using Connectable::disconnect;
00115
00116 virtual void
00117 disconnect(const Connection &inConnection) throw(Error);
00118
00119 ~ScalarPortReference() throw();
00120
00121 protected:
00122 ScalarPortReference();
00123
00124 private:
00125 #ifdef GENOM_SERIALIZATION
00126 template<class Archive> void
00127 serialize( Archive &ar, unsigned int );
00128 #endif //GENOM_SERIALIZATION
00129
00130 };
00131
00132 }
00133
00134 }
00135 #endif // TORC_GENERIC_OM_SCALARPORTREFERENCE_HPP