00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #ifndef TORC_GENERIC_OM_PORTELEMENT_HPP
00017 #define TORC_GENERIC_OM_PORTELEMENT_HPP
00018
00019 #include "torc/generic/om/PointerTypes.hpp"
00020
00021 namespace torc { namespace generic { class Port; } }
00022 namespace torc { namespace generic { class PortReference; } }
00023
00024 namespace torc {
00025
00026 namespace generic {
00027
00028
00029
00030
00031
00032
00033 class PortElement {
00034 public:
00035
00036
00037
00038
00039 enum ElementType {
00040 eElementTypePort,
00041 eElementTypePortReference
00042 };
00043
00044
00045
00046
00047
00048
00049 inline const ElementType
00050 getType() const throw();
00051
00052
00053
00054
00055
00056
00057 void
00058 setType( const ElementType & inSource ) throw();
00059
00060
00061
00062
00063
00064
00065 inline const PortSharedPtr
00066 getPort() const throw();
00067
00068
00069
00070
00071
00072
00073 inline const PortReferenceSharedPtr
00074 getPortReference() const throw();
00075
00076 PortElement();
00077 PortElement( const PortSharedPtr &inPort );
00078 PortElement( const PortReferenceSharedPtr &inPortRef );
00079
00080 PortElement( const PortElement &inRhs );
00081
00082 PortElement &
00083 operator =( const PortElement &inRhs );
00084
00085 ~PortElement() throw();
00086
00087 private:
00088 ElementType mType;
00089 PortSharedPtr mPort;
00090 PortReferenceSharedPtr mPortReference;
00091 };
00092
00093 inline const PortElement::ElementType
00094 PortElement::getType() const throw() {
00095 return mType;
00096 }
00097
00098 inline const PortSharedPtr
00099 PortElement::getPort() const throw() {
00100 return mPort;
00101 }
00102
00103 inline const PortReferenceSharedPtr
00104 PortElement::getPortReference() const throw() {
00105 return mPortReference;
00106 }
00107
00108 }
00109
00110 }
00111 #endif // TORC_GENERIC_OM_PORTELEMENT_HPP