00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #ifndef TORC_GENERIC_OM_LOGICALRESPONSE_HPP
00017 #define TORC_GENERIC_OM_LOGICALRESPONSE_HPP
00018
00019 #include "torc/generic/om/PointerTypes.hpp"
00020 #include "torc/generic/om/Visitable.hpp"
00021 #include "torc/generic/om/VisitorType.hpp"
00022 #include "torc/generic/om/SelfReferencing.hpp"
00023 #include "torc/generic/om/FactoryType.hpp"
00024
00025 namespace torc { namespace generic { class Port; } }
00026 namespace torc { namespace generic { class PortList; } }
00027 namespace torc { namespace generic { class PortListAlias; } }
00028 namespace torc { namespace generic { class LogicElement; } }
00029
00030 namespace torc {
00031
00032 namespace generic {
00033
00034
00035
00036
00037
00038
00039 class LogicalResponse
00040 : public Visitable,
00041 public SelfReferencing<LogicalResponse>
00042 {
00043 friend class FactoryType<LogicalResponse>;
00044
00045 public:
00046
00047
00048
00049
00050 enum ResponseType
00051 {
00052 eResponseTypeInput = 0,
00053 eResponseTypeOutput
00054 };
00055
00056
00057
00058
00059
00060
00061 inline const ResponseType
00062 getResponseType() const throw();
00063
00064
00065
00066
00067
00068
00069 void
00070 setResponseType( const ResponseType & inSource ) throw();
00071
00072
00073
00074
00075 typedef VisitorType<LogicalResponse> Visitor;
00076
00077 virtual void
00078 accept(BaseVisitor & inoutVisitor) throw(Error);
00079
00080
00081
00082
00083 class Factory: public FactoryType<LogicalResponse>
00084 {
00085 public:
00086 using FactoryType<LogicalResponse>::create;
00087
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097 virtual LogicalResponseSharedPtr
00098 newLogicalResponsePtr( const ResponseType & inResponseType,
00099 const PortSharedPtr & inPort,
00100 const LogicElementSharedPtr & inLogicWaveForm,
00101 const PortListAliasSharedPtr & inPortListAlias
00102 = PortListAliasSharedPtr() ) throw(Error);
00103 };
00104
00105
00106
00107
00108
00109
00110 inline const PortSharedPtr
00111 getConnectedPort() const throw();
00112
00113
00114
00115
00116
00117
00118 void
00119 setConnectedPort( const PortSharedPtr & inPort ) throw();
00120
00121
00122
00123
00124
00125
00126 inline const PortListSharedPtr
00127 getConnectedPortList() const throw();
00128
00129
00130
00131
00132
00133
00134 void
00135 setConnectedPortList( const PortListSharedPtr & inPortList ) throw();
00136
00137
00138
00139
00140
00141
00142 inline const PortListAliasSharedPtr
00143 getConnectedPortListAlias() const throw();
00144
00145
00146
00147
00148
00149
00150 void
00151 setConnectedPortListAlias( const PortListAliasSharedPtr & inPortListAlias ) throw();
00152
00153
00154
00155
00156
00157
00158
00159 inline const LogicElementSharedPtr
00160 getLogicWaveForm() const throw();
00161
00162
00163
00164
00165
00166
00167 void
00168 setLogicWaveForm( const LogicElementSharedPtr & inSource ) throw();
00169
00170 ~LogicalResponse() throw();
00171
00172 protected:
00173 LogicalResponse();
00174
00175 private:
00176 LogicalResponse(const LogicalResponse & source) throw();
00177
00178 LogicalResponse &
00179 operator=(const LogicalResponse & source) throw();
00180
00181 ResponseType mResponseType;
00182 PortSharedPtr mConnectedPort;
00183 PortListSharedPtr mConnectedPortList;
00184 PortListAliasSharedPtr mConnectedPortListAlias;
00185 LogicElementSharedPtr mLogicWaveForm;
00186
00187 };
00188
00189
00190
00191
00192
00193
00194 inline const LogicalResponse::ResponseType
00195 LogicalResponse::getResponseType() const throw() {
00196 return mResponseType;
00197 }
00198
00199
00200
00201
00202
00203
00204 inline const PortSharedPtr
00205 LogicalResponse::getConnectedPort() const throw() {
00206 return mConnectedPort;
00207 }
00208
00209
00210
00211
00212
00213
00214 inline const PortListSharedPtr
00215 LogicalResponse::getConnectedPortList() const throw() {
00216 return mConnectedPortList;
00217 }
00218
00219
00220
00221
00222
00223
00224 inline const PortListAliasSharedPtr
00225 LogicalResponse::getConnectedPortListAlias() const throw() {
00226 return mConnectedPortListAlias;
00227 }
00228
00229
00230
00231
00232
00233
00234 inline const LogicElementSharedPtr
00235 LogicalResponse::getLogicWaveForm() const throw() {
00236 return mLogicWaveForm;
00237 }
00238
00239 }
00240
00241 }
00242 #endif // TORC_GENERIC_OM_LOGICALRESPONSE_HPP