00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #ifndef TORC_GENERIC_OM_LOGICVALUEATTRIBUTES_HPP
00017 #define TORC_GENERIC_OM_LOGICVALUEATTRIBUTES_HPP
00018
00019 #include "torc/generic/om/PointerTypes.hpp"
00020 #include "torc/generic/om/Value.hpp"
00021 #include "torc/generic/util/Error.hpp"
00022
00023 #include <list>
00024
00025 namespace torc { namespace generic { class LogicValue; } }
00026
00027 namespace torc {
00028
00029 namespace generic {
00030
00031
00032
00033
00034
00035 class LogicValueAttributes
00036 {
00037
00038 public:
00039
00040
00041
00042 struct LogicMap
00043 {
00044
00045
00046
00047
00048 enum LogicMapType
00049 {
00050 eLogicMapTypeInput = 0,
00051 eLogicMapTypeOutput
00052 };
00053
00054 std::string mLogicRef;
00055 std::string mLibraryRef;
00056 LogicMapType mLogicMapType;
00057 };
00058
00059
00060
00061
00062
00063
00064
00065 inline const LogicValueSharedPtr
00066 getStrongLogicValue() const throw();
00067
00068
00069
00070
00071
00072
00073
00074 void
00075 setStrongLogicValue(const LogicValueSharedPtr & inSource) throw();
00076
00077
00078
00079
00080
00081
00082
00083 inline const LogicValueSharedPtr
00084 getWeakLogicValue() const throw();
00085
00086
00087
00088
00089
00090
00091
00092 void
00093 setWeakLogicValue(const LogicValueSharedPtr & inSource) throw();
00094
00095
00096
00097
00098
00099
00100 inline const Value::MiNoMax
00101 getVoltageMap() const throw();
00102
00103
00104
00105
00106
00107
00108 void
00109 setVoltageMap(const Value::MiNoMax & value) throw();
00110
00111
00112
00113
00114
00115
00116 inline const bool
00117 getIsVoltageMapSet() const throw();
00118
00119
00120
00121
00122
00123
00124 inline const Value::MiNoMax
00125 getCurrentMap() const throw();
00126
00127
00128
00129
00130
00131
00132 void
00133 setCurrentMap(const Value::MiNoMax & value) throw();
00134
00135
00136
00137
00138
00139
00140 inline const bool
00141 getIsCurrentMapSet() const throw();
00142
00143
00144
00145
00146
00147
00148 inline const Value::Boolean
00149 getBooleanMap() const throw();
00150
00151
00152
00153
00154
00155
00156 void
00157 setBooleanMap(const Value::Boolean & value) throw();
00158
00159
00160
00161
00162
00163
00164 inline const bool
00165 getIsBooleanMapSet() const throw();
00166
00167
00168
00169
00170
00171
00172 inline void
00173 getCompoundLogicValues(
00174 std::list< LogicValueSharedPtr > & outLogicValues) const throw();
00175
00176
00177
00178
00179
00180
00181 void
00182 setCompoundLogicValues(
00183 const std::list< LogicValueSharedPtr > & inSource) throw(Error);
00184
00185
00186
00187
00188
00189
00190 inline void
00191 getDominatedLogicValues(
00192 std::list< LogicValueSharedPtr > & outLogicValues) const throw();
00193
00194
00195
00196
00197
00198
00199 void
00200 setDominatedLogicValues(
00201 const std::list< LogicValueSharedPtr > & inSource) throw(Error);
00202
00203
00204
00205
00206
00207
00208 inline const bool
00209 getIsIsolated() const throw();
00210
00211
00212
00213
00214
00215
00216 void
00217 setIsIsolated(const bool & inSource) throw();
00218
00219
00220
00221
00222
00223
00224 inline void
00225 getLogicMaps(std::list< LogicMap* > & outLogicMaps) const throw();
00226
00227
00228
00229
00230
00231
00232 void
00233 setLogicMaps(const std::list< LogicMap* > & inSource) throw();
00234
00235
00236
00237
00238
00239
00240
00241
00242
00243 void
00244 addLogicMap(LogicMap* & inLogicMap) throw(Error);
00245
00246
00247
00248
00249
00250
00251 inline void
00252 getResolvedLogicValues(
00253 std::list< LogicValueSharedPtr > & outLogicValues) const throw();
00254
00255
00256
00257
00258
00259
00260 void
00261 setResolvedLogicValues(
00262 const std::list< LogicValueSharedPtr > & inSource) throw();
00263
00264 LogicValueAttributes();
00265
00266 ~LogicValueAttributes() throw();
00267
00268 LogicValueAttributes(const LogicValueAttributes & source);
00269
00270 LogicValueAttributes &
00271 operator=(const LogicValueAttributes & source) throw();
00272
00273 private:
00274 Value::MiNoMax mVoltageMap;
00275 bool mIsVoltageMapSet;
00276 Value::MiNoMax mCurrentMap;
00277 bool mIsCurrentMapSet;
00278 Value::Boolean mBooleanMap;
00279 bool mIsBooleanMapSet;
00280 std::list< LogicValueSharedPtr > mCompounds;
00281 LogicValueSharedPtr mWeak;
00282 LogicValueSharedPtr mStrong;
00283 std::list< LogicValueSharedPtr > mDominates;
00284 std::list< LogicMap* > mLogicMaps;
00285 bool mIsIsolated;
00286 std::list< LogicValueSharedPtr > mResolves;
00287
00288 };
00289
00290
00291
00292
00293
00294
00295
00296 inline const LogicValueSharedPtr
00297 LogicValueAttributes::getStrongLogicValue() const throw() {
00298 return mStrong;
00299 }
00300
00301
00302
00303
00304
00305
00306
00307 inline const LogicValueSharedPtr
00308 LogicValueAttributes::getWeakLogicValue() const throw() {
00309 return mWeak;
00310 }
00311
00312
00313
00314
00315
00316
00317 inline const Value::MiNoMax
00318 LogicValueAttributes::getVoltageMap() const throw() {
00319 return mVoltageMap;
00320 }
00321
00322
00323
00324
00325
00326
00327 inline const bool
00328 LogicValueAttributes::getIsVoltageMapSet() const throw() {
00329 return mIsVoltageMapSet;
00330 }
00331
00332
00333
00334
00335
00336
00337 inline const Value::MiNoMax
00338 LogicValueAttributes::getCurrentMap() const throw() {
00339 return mCurrentMap;
00340 }
00341
00342
00343
00344
00345
00346
00347 inline const bool
00348 LogicValueAttributes::getIsCurrentMapSet() const throw() {
00349 return mIsCurrentMapSet;
00350 }
00351
00352
00353
00354
00355
00356
00357 inline const Value::Boolean
00358 LogicValueAttributes::getBooleanMap() const throw() {
00359 return mBooleanMap;
00360 }
00361
00362
00363
00364
00365
00366
00367 inline const bool
00368 LogicValueAttributes::getIsBooleanMapSet() const throw() {
00369 return mIsBooleanMapSet;
00370 }
00371
00372
00373
00374
00375
00376
00377 inline void
00378 LogicValueAttributes::getCompoundLogicValues(
00379 std::list< LogicValueSharedPtr > & outLogicValues) const throw() {
00380 outLogicValues.insert( outLogicValues.end(),
00381 mCompounds.begin(), mCompounds.end() );
00382 }
00383
00384
00385
00386
00387
00388
00389 inline void
00390 LogicValueAttributes::getDominatedLogicValues(
00391 std::list< LogicValueSharedPtr > & outLogicValues) const throw() {
00392 outLogicValues.insert( outLogicValues.end(),
00393 mDominates.begin(), mDominates.end() );
00394 }
00395
00396
00397
00398
00399
00400
00401 inline const bool
00402 LogicValueAttributes::getIsIsolated() const throw() {
00403 return mIsIsolated;
00404 }
00405
00406
00407
00408
00409
00410
00411 inline void
00412 LogicValueAttributes::getResolvedLogicValues(
00413 std::list< LogicValueSharedPtr > & outLogicValues) const throw() {
00414 outLogicValues.insert ( outLogicValues.end(),
00415 mResolves.begin(), mResolves.end() );
00416 }
00417
00418
00419
00420
00421
00422
00423 inline void
00424 LogicValueAttributes::getLogicMaps(
00425 std::list< LogicMap* > & outLogicMaps) const throw() {
00426 outLogicMaps.insert( outLogicMaps.end(),
00427 mLogicMaps.begin(), mLogicMaps.end() );
00428 }
00429
00430 }
00431
00432 }
00433 #endif // TORC_GENERIC_OM_LOGICVALUEATTRIBUTES_HPP