00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #include "torc/generic/om/DumpRestoreConfig.hpp"
00017
00018 #ifndef HAVE_CONFIG_H
00019 #include "torc/generic/config.h"
00020 #endif
00021
00022 #ifdef GENOM_SERIALIZATION
00023 #include <boost/archive/binary_iarchive.hpp>
00024 #include <boost/archive/binary_oarchive.hpp>
00025 #include <boost/serialization/base_object.hpp>
00026 #include <boost/serialization/is_abstract.hpp>
00027 #endif //GENOM_SERIALIZATION
00028
00029 #include "torc/generic/om/Port.hpp"
00030 #include "torc/generic/om/PortAttributes.hpp"
00031
00032 #ifdef GENOM_SERIALIZATION
00033 #endif //GENOM_SERIALIZATION
00034
00035 namespace torc {
00036
00037 namespace generic {
00038
00039 Port::Port()
00040 : Composite<Port>(),
00041 Commentable(),
00042 Connectable(),
00043 Extern(),
00044 Nameable(),
00045 PropertyContainer(),
00046 Renamable(),
00047 Visitable(),
00048 ParentedObject<View>(),
00049 UserDataContainer(),
00050 mDirection( ePortDirectionUndefined ),
00051 mAttributes() {
00052 }
00053
00054 Port::~Port() throw() {
00055 }
00056
00057
00058
00059
00060
00061
00062 void
00063 Port::setDirection(const PortDirection &inSource) throw() {
00064 mDirection = inSource;
00065 }
00066
00067
00068
00069
00070
00071
00072
00073
00074 void
00075 Port::setAttributes(
00076 const PortAttributesSharedPtr & inSource) throw() {
00077 mAttributes = inSource;
00078 }
00079
00080 #ifdef GENOM_SERIALIZATION
00081 template<class Archive> void
00082 Port::serialize( Archive &ar, unsigned int ) {
00083 ar & boost::serialization::base_object<Commentable>( *this );
00084 ar & boost::serialization::base_object<Connectable>( *this );
00085 ar & boost::serialization::base_object<Extern>( *this );
00086 ar & boost::serialization::base_object<Nameable>( *this );
00087 ar & boost::serialization::base_object<
00088 PropertyContainer>( *this );
00089 ar & boost::serialization::base_object<Renamable>( *this );
00090 ar & boost::serialization::base_object<Visitable>( *this );
00091 ar & boost::serialization::base_object<
00092 Composite<Port> >( *this );
00093 ar & mDirection;
00094 ar & mAttributes;
00095
00096 }
00097
00098
00099 template void
00100 Port::serialize<boost::archive::binary_iarchive>(
00101 boost::archive::binary_iarchive & ar, const unsigned int);
00102
00103 template void
00104 Port::serialize<boost::archive::binary_oarchive>(
00105 boost::archive::binary_oarchive & ar, const unsigned int);
00106
00107 #endif //GENOM_SERIALIZATION
00108
00109
00110 }
00111
00112 }