StateRow.h

Go to the documentation of this file.
00001 
00002 /*
00003  * ALMA - Atacama Large Millimeter Array
00004  * (c) European Southern Observatory, 2002
00005  * (c) Associated Universities Inc., 2002
00006  * Copyright by ESO (in the framework of the ALMA collaboration),
00007  * Copyright by AUI (in the framework of the ALMA collaboration),
00008  * All rights reserved.
00009  * 
00010  * This library is free software; you can redistribute it and/or
00011  * modify it under the terms of the GNU Lesser General Public
00012  * License as published by the Free software Foundation; either
00013  * version 2.1 of the License, or (at your option) any later version.
00014  * 
00015  * This library is distributed in the hope that it will be useful,
00016  * but WITHOUT ANY WARRANTY, without even the implied warranty of
00017  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00018  * Lesser General Public License for more details.
00019  * 
00020  * You should have received a copy of the GNU Lesser General Public
00021  * License along with this library; if not, write to the Free Software
00022  * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
00023  * MA 02111-1307  USA
00024  *
00025  * Warning!
00026  *  -------------------------------------------------------------------- 
00027  * | This is generated code!  Do not modify this file.                  |
00028  * | If you do, all changes will be lost when the file is re-generated. |
00029  *  --------------------------------------------------------------------
00030  *
00031  * File StateRow.h
00032  */
00033  
00034 #ifndef StateRow_CLASS
00035 #define StateRow_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::StateRowIDL;
00047 #endif
00048 
00049 
00050 
00051 
00052 
00053 
00054 #include <Tag.h>
00055 using  asdm::Tag;
00056 
00057 
00058 
00059 
00060         
00061 
00062         
00063 #include "CCalibrationDevice.h"
00064 using namespace CalibrationDeviceMod;
00065         
00066 
00067         
00068 
00069         
00070 
00071         
00072 
00073         
00074 
00075 
00076 
00077 #include <ConversionException.h>
00078 #include <NoSuchRow.h>
00079 #include <IllegalAccessException.h>
00080 
00081 
00082 /*\file State.h
00083     \brief Generated from model's revision "1.55", branch "HEAD"
00084 */
00085 
00086 namespace asdm {
00087 
00088 //class asdm::StateTable;
00089 
00090         
00091 
00092 class StateRow;
00093 typedef void (StateRow::*StateAttributeFromBin) (EndianISStream& eiss);
00094 
00101 class StateRow {
00102 friend class asdm::StateTable;
00103 
00104 public:
00105 
00106         virtual ~StateRow();
00107 
00111         StateTable &getTable() const;
00112         
00117         bool isAdded() const;
00118                 
00120         // Intrinsic Table Attributes //
00122         
00123         
00124         // ===> Attribute stateId
00125         
00126         
00127         
00128 
00129         
00134         Tag getStateId() const;
00135         
00136  
00137         
00138         
00139         
00140         
00141 
00142 
00143         
00144         // ===> Attribute calDeviceName
00145         
00146         
00147         
00148 
00149         
00154         CalibrationDeviceMod::CalibrationDevice getCalDeviceName() const;
00155         
00156  
00157         
00158         
00166         void setCalDeviceName (CalibrationDeviceMod::CalibrationDevice calDeviceName);
00167                 
00168         
00169         
00170         
00171 
00172 
00173         
00174         // ===> Attribute sig
00175         
00176         
00177         
00178 
00179         
00184         bool getSig() const;
00185         
00186  
00187         
00188         
00196         void setSig (bool sig);
00197                 
00198         
00199         
00200         
00201 
00202 
00203         
00204         // ===> Attribute ref
00205         
00206         
00207         
00208 
00209         
00214         bool getRef() const;
00215         
00216  
00217         
00218         
00226         void setRef (bool ref);
00227                 
00228         
00229         
00230         
00231 
00232 
00233         
00234         // ===> Attribute onSky
00235         
00236         
00237         
00238 
00239         
00244         bool getOnSky() const;
00245         
00246  
00247         
00248         
00256         void setOnSky (bool onSky);
00257                 
00258         
00259         
00260         
00261 
00262 
00263         
00264         // ===> Attribute weight, which is optional
00265         
00266         
00267         
00272         bool isWeightExists() const;
00273         
00274 
00275         
00281         float getWeight() const;
00282         
00283  
00284         
00285         
00292         void setWeight (float weight);
00293                 
00294         
00295         
00296         
00300         void clearWeight ();
00301         
00302 
00303 
00305         // Extrinsic Table Attributes //
00307         
00309         // Links //
00311         
00312         
00313         
00314         
00328         bool compareNoAutoInc(CalibrationDeviceMod::CalibrationDevice calDeviceName, bool sig, bool ref, bool onSky);
00329         
00330         
00331 
00332         
00346         bool compareRequiredValue(CalibrationDeviceMod::CalibrationDevice calDeviceName, bool sig, bool ref, bool onSky); 
00347                  
00348         
00357         bool equalByRequiredValue(StateRow* x) ;
00358         
00359 #ifndef WITHOUT_ACS
00360 
00364         StateRowIDL *toIDL() const;
00365 #endif
00366         
00367 #ifndef WITHOUT_ACS
00368 
00373         void setFromIDL (StateRowIDL x) ;
00374 #endif
00375         
00380         string toXML() const;
00381 
00388         void setFromXML (string rowDoc) ;       
00389 
00390 private:
00394         StateTable &table;
00398         bool hasBeenAdded;
00399 
00400         // This method is used by the Table class when this row is added to the table.
00401         void isAdded(bool added);
00402 
00403 
00412         StateRow (StateTable &table);
00413 
00431          StateRow (StateTable &table, StateRow &row);
00432                 
00434         // Intrinsic Table Attributes //
00436         
00437         
00438         // ===> Attribute stateId
00439         
00440         
00441 
00442         Tag stateId;
00443 
00444         
00445         
00446         
00456         void setStateId (Tag stateId);
00457                 
00458         
00459 
00460         
00461         // ===> Attribute calDeviceName
00462         
00463         
00464 
00465         CalibrationDeviceMod::CalibrationDevice calDeviceName;
00466 
00467         
00468         
00469         
00470 
00471         
00472         // ===> Attribute sig
00473         
00474         
00475 
00476         bool sig;
00477 
00478         
00479         
00480         
00481 
00482         
00483         // ===> Attribute ref
00484         
00485         
00486 
00487         bool ref;
00488 
00489         
00490         
00491         
00492 
00493         
00494         // ===> Attribute onSky
00495         
00496         
00497 
00498         bool onSky;
00499 
00500         
00501         
00502         
00503 
00504         
00505         // ===> Attribute weight, which is optional
00506         
00507         
00508         bool weightExists;
00509         
00510 
00511         float weight;
00512 
00513         
00514         
00515         
00516 
00518         // Extrinsic Table Attributes //
00520         
00522         // Links //
00524         
00525         
00527         // binary-deserialization material//
00529         map<string, StateAttributeFromBin> fromBinMethods;
00530 void stateIdFromBin( EndianISStream& eiss);
00531 void calDeviceNameFromBin( EndianISStream& eiss);
00532 void sigFromBin( EndianISStream& eiss);
00533 void refFromBin( EndianISStream& eiss);
00534 void onSkyFromBin( EndianISStream& eiss);
00535 
00536 void weightFromBin( EndianISStream& eiss);
00537         
00538         
00543          void toBin(EndianOSStream& eoss);
00544                  
00552          static StateRow* fromBin(EndianISStream& eiss, StateTable& table, const vector<string>& attributesSeq);         
00553 
00554 };
00555 
00556 } // End namespace asdm
00557 
00558 #endif /* State_CLASS */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines