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