00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #ifndef TORC_GENERIC_OM_SCALARPORT_HPP
00017 #define TORC_GENERIC_OM_SCALARPORT_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/util/Error.hpp"
00028 #include "torc/generic/om/FactoryType.hpp"
00029 #include "torc/generic/om/Port.hpp"
00030 #include "torc/generic/om/Scalar.hpp"
00031 #include "torc/generic/om/VisitorType.hpp"
00032
00033 namespace torc { namespace generic { class BaseVisitor; } }
00034
00035 namespace torc {
00036
00037 namespace generic {
00038
00039
00040
00041
00042
00043
00044 class ScalarPort
00045 : public Port,
00046 public Scalar<Port> {
00047 #ifdef GENOM_SERIALIZATION
00048 friend class boost::serialization::access;
00049 #endif //GENOM_SERIALIZATION
00050
00051 friend class FactoryType<ScalarPort>;
00052
00053 public:
00054 typedef VisitorType<ScalarPort> Visitor;
00055
00056
00057
00058
00059 class Factory: public FactoryType<ScalarPort>
00060 {
00061 public:
00062 using FactoryType<ScalarPort>::create;
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074 virtual ScalarPortSharedPtr
00075 newScalarPortPtr( const std::string &inName,
00076 const PortDirection &inDirection,
00077 const ViewSharedPtr &inViewPtr,
00078 const PortBundleSharedPtr &inParentCollection = PortBundleSharedPtr(),
00079 const std::string &inOriginalName = std::string()) throw(Error);
00080 };
00081
00082 virtual void
00083 accept(BaseVisitor & inoutVisitor) throw(Error);
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
00112
00113 virtual Connection
00114 connect(const NetSharedPtr &inNet) throw(Error);
00115
00116 using Connectable::disconnect;
00117
00118 virtual void
00119 disconnect(const Connection &inConnection) throw(Error);
00120
00121 virtual
00122 ~ScalarPort() throw();
00123
00124 protected:
00125 ScalarPort();
00126
00127 private:
00128 #ifdef GENOM_SERIALIZATION
00129 template<class Archive> void
00130 serialize( Archive &ar, unsigned int );
00131 #endif //GENOM_SERIALIZATION
00132
00133 };
00134
00135 }
00136
00137 }
00138 #endif // TORC_GENERIC_OM_SCALARPORT_HPP