Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034 #ifndef ProcessorRow_CLASS
00035 #define ProcessorRow_CLASS
00036
00037 #include <vector>
00038 #include <string>
00039 #include <set>
00040 using std::vector;
00041 using std::string;
00042 using std::set;
00043
00044 #ifndef WITHOUT_ACS
00045 #include <asdmIDLC.h>
00046 using asdmIDL::ProcessorRowIDL;
00047 #endif
00048
00049
00050
00051
00052
00053
00054 #include <Tag.h>
00055 using asdm::Tag;
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065 #include "CProcessorType.h"
00066 using namespace ProcessorTypeMod;
00067
00068
00069
00070 #include "CProcessorSubType.h"
00071 using namespace ProcessorSubTypeMod;
00072
00073
00074
00075
00076 #include <ConversionException.h>
00077 #include <NoSuchRow.h>
00078 #include <IllegalAccessException.h>
00079
00080
00081
00082
00083
00084
00085 namespace asdm {
00086
00087
00088
00089
00090
00091 class ProcessorRow;
00092 typedef void (ProcessorRow::*ProcessorAttributeFromBin) (EndianISStream& eiss);
00093
00100 class ProcessorRow {
00101 friend class asdm::ProcessorTable;
00102
00103 public:
00104
00105 virtual ~ProcessorRow();
00106
00110 ProcessorTable &getTable() const;
00111
00116 bool isAdded() const;
00117
00119
00121
00122
00123
00124
00125
00126
00127
00128
00133 Tag getProcessorId() const;
00134
00135
00136
00137
00138
00139
00140
00141
00142
00143
00144
00145
00146
00147
00148
00153 Tag getModeId() const;
00154
00155
00156
00157
00165 void setModeId (Tag modeId);
00166
00167
00168
00169
00170
00171
00172
00173
00174
00175
00176
00177
00178
00183 ProcessorTypeMod::ProcessorType getProcessorType() const;
00184
00185
00186
00187
00195 void setProcessorType (ProcessorTypeMod::ProcessorType processorType);
00196
00197
00198
00199
00200
00201
00202
00203
00204
00205
00206
00207
00208
00213 ProcessorSubTypeMod::ProcessorSubType getProcessorSubType() const;
00214
00215
00216
00217
00225 void setProcessorSubType (ProcessorSubTypeMod::ProcessorSubType processorSubType);
00226
00227
00228
00229
00230
00231
00233
00235
00237
00239
00240
00241
00242
00254 bool compareNoAutoInc(Tag modeId, ProcessorTypeMod::ProcessorType processorType, ProcessorSubTypeMod::ProcessorSubType processorSubType);
00255
00256
00257
00258
00270 bool compareRequiredValue(Tag modeId, ProcessorTypeMod::ProcessorType processorType, ProcessorSubTypeMod::ProcessorSubType processorSubType);
00271
00272
00281 bool equalByRequiredValue(ProcessorRow* x) ;
00282
00283 #ifndef WITHOUT_ACS
00284
00288 ProcessorRowIDL *toIDL() const;
00289 #endif
00290
00291 #ifndef WITHOUT_ACS
00292
00297 void setFromIDL (ProcessorRowIDL x) ;
00298 #endif
00299
00304 string toXML() const;
00305
00312 void setFromXML (string rowDoc) ;
00313
00314 private:
00318 ProcessorTable &table;
00322 bool hasBeenAdded;
00323
00324
00325 void isAdded(bool added);
00326
00327
00336 ProcessorRow (ProcessorTable &table);
00337
00355 ProcessorRow (ProcessorTable &table, ProcessorRow &row);
00356
00358
00360
00361
00362
00363
00364
00365
00366 Tag processorId;
00367
00368
00369
00370
00380 void setProcessorId (Tag processorId);
00381
00382
00383
00384
00385
00386
00387
00388
00389 Tag modeId;
00390
00391
00392
00393
00394
00395
00396
00397
00398
00399
00400 ProcessorTypeMod::ProcessorType processorType;
00401
00402
00403
00404
00405
00406
00407
00408
00409
00410
00411 ProcessorSubTypeMod::ProcessorSubType processorSubType;
00412
00413
00414
00415
00416
00418
00420
00422
00424
00425
00427
00429 map<string, ProcessorAttributeFromBin> fromBinMethods;
00430 void processorIdFromBin( EndianISStream& eiss);
00431 void modeIdFromBin( EndianISStream& eiss);
00432 void processorTypeFromBin( EndianISStream& eiss);
00433 void processorSubTypeFromBin( EndianISStream& eiss);
00434
00435
00436
00441 void toBin(EndianOSStream& eoss);
00442
00450 static ProcessorRow* fromBin(EndianISStream& eiss, ProcessorTable& table, const vector<string>& attributesSeq);
00451
00452 };
00453
00454 }
00455
00456 #endif