casa  $Rev:20696$
ScaleRow.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 ScaleRow.h
00032  */
00033  
00034 #ifndef ScaleRow_CLASS
00035 #define ScaleRow_CLASS
00036 
00037 #include <vector>
00038 #include <string>
00039 #include <set>
00040 
00041 #ifndef WITHOUT_ACS
00042 #include <asdmIDLC.h>
00043 #endif
00044 
00045 
00046 
00047 
00048 
00049 
00050          
00051 #include <Tag.h>
00052         
00053 
00054 
00055 
00056 
00057         
00058 
00059         
00060 #include "CTimeScale.h"
00061         
00062 
00063         
00064 #include "CDataScale.h"
00065         
00066 
00067         
00068 #include "CDataScale.h"
00069         
00070 
00071         
00072 #include "CWeightType.h"
00073         
00074 
00075 
00076 
00077 #include <ConversionException.h>
00078 #include <NoSuchRow.h>
00079 #include <IllegalAccessException.h>
00080 
00081 #include <RowTransformer.h>
00082 //#include <TableStreamReader.h>
00083 
00084 /*\file Scale.h
00085     \brief Generated from model's revision "1.62", branch "HEAD"
00086 */
00087 
00088 namespace asdm {
00089 
00090 //class asdm::ScaleTable;
00091 
00092         
00093 
00094 class ScaleRow;
00095 typedef void (ScaleRow::*ScaleAttributeFromBin) (EndianIStream& eis);
00096 typedef void (ScaleRow::*ScaleAttributeFromText) (const string& s);
00097 
00104 class ScaleRow {
00105 friend class asdm::ScaleTable;
00106 friend class asdm::RowTransformer<ScaleRow>;
00107 //friend class asdm::TableStreamReader<ScaleTable, ScaleRow>;
00108 
00109 public:
00110 
00111         virtual ~ScaleRow();
00112 
00116         ScaleTable &getTable() const;
00117         
00122         bool isAdded() const;
00123                 
00125         // Intrinsic Table Attributes //
00127         
00128         
00129         // ===> Attribute scaleId
00130         
00131         
00132         
00133 
00134         
00139         Tag getScaleId() const;
00140         
00141  
00142         
00143         
00144         
00145         
00146 
00147 
00148         
00149         // ===> Attribute timeScale
00150         
00151         
00152         
00153 
00154         
00159         TimeScaleMod::TimeScale getTimeScale() const;
00160         
00161  
00162         
00163         
00171         void setTimeScale (TimeScaleMod::TimeScale timeScale);
00172                 
00173         
00174         
00175         
00176 
00177 
00178         
00179         // ===> Attribute crossDataScale
00180         
00181         
00182         
00183 
00184         
00189         DataScaleMod::DataScale getCrossDataScale() const;
00190         
00191  
00192         
00193         
00201         void setCrossDataScale (DataScaleMod::DataScale crossDataScale);
00202                 
00203         
00204         
00205         
00206 
00207 
00208         
00209         // ===> Attribute autoDataScale
00210         
00211         
00212         
00213 
00214         
00219         DataScaleMod::DataScale getAutoDataScale() const;
00220         
00221  
00222         
00223         
00231         void setAutoDataScale (DataScaleMod::DataScale autoDataScale);
00232                 
00233         
00234         
00235         
00236 
00237 
00238         
00239         // ===> Attribute weightType
00240         
00241         
00242         
00243 
00244         
00249         WeightTypeMod::WeightType getWeightType() const;
00250         
00251  
00252         
00253         
00261         void setWeightType (WeightTypeMod::WeightType weightType);
00262                 
00263         
00264         
00265         
00266 
00267 
00269         // Extrinsic Table Attributes //
00271         
00273         // Links //
00275         
00276         
00277         
00278         
00292         bool compareNoAutoInc(TimeScaleMod::TimeScale timeScale, DataScaleMod::DataScale crossDataScale, DataScaleMod::DataScale autoDataScale, WeightTypeMod::WeightType weightType);
00293         
00294         
00295 
00296         
00310         bool compareRequiredValue(TimeScaleMod::TimeScale timeScale, DataScaleMod::DataScale crossDataScale, DataScaleMod::DataScale autoDataScale, WeightTypeMod::WeightType weightType); 
00311                  
00312         
00321         bool equalByRequiredValue(ScaleRow* x) ;
00322         
00323 #ifndef WITHOUT_ACS
00324 
00328         asdmIDL::ScaleRowIDL *toIDL() const;
00329 #endif
00330         
00331 #ifndef WITHOUT_ACS
00332 
00337         void setFromIDL (asdmIDL::ScaleRowIDL x) ;
00338 #endif
00339         
00344         std::string toXML() const;
00345 
00352         void setFromXML (std::string rowDoc) ;
00353 
00356         // binary-deserialization material from an EndianIStream  //
00358 
00359         std::map<std::string, ScaleAttributeFromBin> fromBinMethods;
00360 void scaleIdFromBin( EndianIStream& eis);
00361 void timeScaleFromBin( EndianIStream& eis);
00362 void crossDataScaleFromBin( EndianIStream& eis);
00363 void autoDataScaleFromBin( EndianIStream& eis);
00364 void weightTypeFromBin( EndianIStream& eis);
00365 
00366         
00367 
00375          static ScaleRow* fromBin(EndianIStream& eis, ScaleTable& table, const std::vector<std::string>& attributesSeq);         
00376  
00383          void fromText(const std::string& attributeName, const std::string&  t);
00385 
00386 private:
00390         ScaleTable &table;
00394         bool hasBeenAdded;
00395 
00396         // This method is used by the Table class when this row is added to the table.
00397         void isAdded(bool added);
00398 
00399 
00408         ScaleRow (ScaleTable &table);
00409 
00427          ScaleRow (ScaleTable &table, ScaleRow &row);
00428                 
00430         // Intrinsic Table Attributes //
00432         
00433         
00434         // ===> Attribute scaleId
00435         
00436         
00437 
00438         Tag scaleId;
00439 
00440         
00441         
00442         
00452         void setScaleId (Tag scaleId);
00453                 
00454         
00455 
00456         
00457         // ===> Attribute timeScale
00458         
00459         
00460 
00461         TimeScaleMod::TimeScale timeScale;
00462 
00463         
00464         
00465         
00466 
00467         
00468         // ===> Attribute crossDataScale
00469         
00470         
00471 
00472         DataScaleMod::DataScale crossDataScale;
00473 
00474         
00475         
00476         
00477 
00478         
00479         // ===> Attribute autoDataScale
00480         
00481         
00482 
00483         DataScaleMod::DataScale autoDataScale;
00484 
00485         
00486         
00487         
00488 
00489         
00490         // ===> Attribute weightType
00491         
00492         
00493 
00494         WeightTypeMod::WeightType weightType;
00495 
00496         
00497         
00498         
00499 
00501         // Extrinsic Table Attributes //
00503         
00505         // Links //
00507         
00508         
00509 /*
00511         // binary-deserialization material from an EndianIStream  //
00513         std::map<std::string, ScaleAttributeFromBin> fromBinMethods;
00514 void scaleIdFromBin( EndianIStream& eis);
00515 void timeScaleFromBin( EndianIStream& eis);
00516 void crossDataScaleFromBin( EndianIStream& eis);
00517 void autoDataScaleFromBin( EndianIStream& eis);
00518 void weightTypeFromBin( EndianIStream& eis);
00519 
00520         
00521 */
00522         
00524         // text-deserialization material //
00526         std::map<std::string, ScaleAttributeFromText> fromTextMethods;
00527         
00528 void scaleIdFromText (const string & s);
00529         
00530         
00531 void timeScaleFromText (const string & s);
00532         
00533         
00534 void crossDataScaleFromText (const string & s);
00535         
00536         
00537 void autoDataScaleFromText (const string & s);
00538         
00539         
00540 void weightTypeFromText (const string & s);
00541         
00542 
00543                 
00544         
00549          void toBin(EndianOSStream& eoss);
00550                  
00560 };
00561 
00562 } // End namespace asdm
00563 
00564 #endif /* Scale_CLASS */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines