LCOV - code coverage report
Current view: top level - alma/ASDM - CalAntennaSolutionsTable.h (source / functions) Hit Total Coverage
Test: ctest_coverage.info Lines: 0 7 0.0 %
Date: 2023-11-06 10:06:49 Functions: 0 1 0.0 %

          Line data    Source code
       1             : 
       2             : /*
       3             :  * ALMA - Atacama Large Millimeter Array
       4             :  * (c) European Southern Observatory, 2002
       5             :  * (c) Associated Universities Inc., 2002
       6             :  * Copyright by ESO (in the framework of the ALMA collaboration),
       7             :  * Copyright by AUI (in the framework of the ALMA collaboration),
       8             :  * All rights reserved.
       9             :  * 
      10             :  * This library is free software; you can redistribute it and/or
      11             :  * modify it under the terms of the GNU Lesser General Public
      12             :  * License as published by the Free software Foundation; either
      13             :  * version 2.1 of the License, or (at your option) any later version.
      14             :  * 
      15             :  * This library is distributed in the hope that it will be useful,
      16             :  * but WITHOUT ANY WARRANTY, without even the implied warranty of
      17             :  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
      18             :  * Lesser General Public License for more details.
      19             :  * 
      20             :  * You should have received a copy of the GNU Lesser General Public
      21             :  * License along with this library; if not, write to the Free Software
      22             :  * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
      23             :  * MA 02111-1307  USA
      24             :  *
      25             :  * Warning!
      26             :  *  -------------------------------------------------------------------- 
      27             :  * | This is generated code!  Do not modify this file.                  |
      28             :  * | If you do, all changes will be lost when the file is re-generated. |
      29             :  *  --------------------------------------------------------------------
      30             :  *
      31             :  * File CalAntennaSolutionsTable.h
      32             :  */
      33             :  
      34             : #ifndef CalAntennaSolutionsTable_CLASS
      35             : #define CalAntennaSolutionsTable_CLASS
      36             : 
      37             : #include <string>
      38             : #include <vector>
      39             : #include <map>
      40             : 
      41             : 
      42             : 
      43             :         
      44             : #include <alma/ASDM/Angle.h>
      45             :         
      46             : 
      47             :         
      48             : #include <alma/ASDM/ArrayTime.h>
      49             :         
      50             : 
      51             :         
      52             : #include <alma/ASDM/Frequency.h>
      53             :         
      54             : 
      55             :         
      56             : #include <alma/ASDM/Tag.h>
      57             :         
      58             : 
      59             :         
      60             : #include <alma/ASDM/Interval.h>
      61             :         
      62             : 
      63             : 
      64             : 
      65             : 
      66             :         
      67             : 
      68             :         
      69             : #include <alma/Enumerations/CAtmPhaseCorrection.h>
      70             :         
      71             : 
      72             :         
      73             : #include <alma/Enumerations/CBasebandName.h>
      74             :         
      75             : 
      76             :         
      77             : #include <alma/Enumerations/CReceiverBand.h>
      78             :         
      79             : 
      80             :         
      81             : 
      82             :         
      83             : 
      84             :         
      85             : 
      86             :         
      87             : 
      88             :         
      89             : 
      90             :         
      91             : 
      92             :         
      93             : 
      94             :         
      95             : #include <alma/Enumerations/CPolarizationType.h>
      96             :         
      97             : 
      98             :         
      99             : 
     100             :         
     101             : 
     102             :         
     103             : 
     104             :         
     105             : 
     106             :         
     107             : 
     108             : 
     109             : 
     110             : #include <alma/ASDM/ConversionException.h>
     111             : #include <alma/ASDM/DuplicateKey.h>
     112             : #include <alma/ASDM/UniquenessViolationException.h>
     113             : #include <alma/ASDM/NoSuchRow.h>
     114             : #include <alma/ASDM/DuplicateKey.h>
     115             : 
     116             : 
     117             : #ifndef WITHOUT_ACS
     118             : #include <asdmIDLC.h>
     119             : #endif
     120             : 
     121             : #include <alma/ASDM/Representable.h>
     122             : 
     123             : #include <pthread.h>
     124             : 
     125             : namespace asdm {
     126             : 
     127             : //class asdm::ASDM;
     128             : //class asdm::CalAntennaSolutionsRow;
     129             : 
     130             : class ASDM;
     131             : class CalAntennaSolutionsRow;
     132             : /**
     133             :  * The CalAntennaSolutionsTable class is an Alma table.
     134             :  * <BR>
     135             :  * 
     136             :  * \par Role
     137             :  * Results of atmosphere calibration by TelCal. This calibration determines the system temperatures corrected for atmospheric absorption. Ionospheric effects are not dealt with in the Table.
     138             :  * <BR>
     139             :  
     140             :  * Generated from model's revision "-1", branch ""
     141             :  *
     142             :  * <TABLE BORDER="1">
     143             :  * <CAPTION> Attributes of CalAntennaSolutions </CAPTION>
     144             :  * <TR BGCOLOR="#AAAAAA"> <TH> Name </TH> <TH> Type </TH> <TH> Expected shape  </TH> <TH> Comment </TH></TR>
     145             :  
     146             :  * <TR> <TH BGCOLOR="#CCCCCC" colspan="4" align="center"> Key </TD></TR>
     147             :         
     148             :  * <TR>
     149             :                 
     150             :  * <TD> antennaName </TD>
     151             :                  
     152             :  * <TD> std::string</TD>
     153             :  * <TD> &nbsp; </TD>
     154             :  * <TD> &nbsp;the name of the antenna. </TD>
     155             :  * </TR>
     156             :         
     157             :  * <TR>
     158             :                 
     159             :  * <TD> atmPhaseCorrection </TD>
     160             :                  
     161             :  * <TD> AtmPhaseCorrectionMod::AtmPhaseCorrection</TD>
     162             :  * <TD> &nbsp; </TD>
     163             :  * <TD> &nbsp; describes how the atmospheric phase correction has been applied. </TD>
     164             :  * </TR>
     165             :         
     166             :  * <TR>
     167             :                 
     168             :  * <TD> receiverBand </TD>
     169             :                  
     170             :  * <TD> ReceiverBandMod::ReceiverBand</TD>
     171             :  * <TD> &nbsp; </TD>
     172             :  * <TD> &nbsp;identifies the receiver band. </TD>
     173             :  * </TR>
     174             :         
     175             :  * <TR>
     176             :                 
     177             :  * <TD> basebandName </TD>
     178             :                  
     179             :  * <TD> BasebandNameMod::BasebandName</TD>
     180             :  * <TD> &nbsp; </TD>
     181             :  * <TD> &nbsp;identifies the baseband. </TD>
     182             :  * </TR>
     183             :         
     184             :  * <TR>
     185             :                 
     186             :  * <TD> calDataId </TD>
     187             :                  
     188             :  * <TD> Tag</TD>
     189             :  * <TD> &nbsp; </TD>
     190             :  * <TD> &nbsp;refers to a unique row in CalData Table. </TD>
     191             :  * </TR>
     192             :         
     193             :  * <TR>
     194             :                 
     195             :  * <TD> calReductionId </TD>
     196             :                  
     197             :  * <TD> Tag</TD>
     198             :  * <TD> &nbsp; </TD>
     199             :  * <TD> &nbsp;refers to a unique row in CalReduction Table. </TD>
     200             :  * </TR>
     201             :         
     202             :  * <TR>
     203             :                 
     204             :  * <TD> spectralWindowId </TD>
     205             :                  
     206             :  * <TD> Tag</TD>
     207             :  * <TD> &nbsp; </TD>
     208             :  * <TD> &nbsp; </TD>
     209             :  * </TR>
     210             :         
     211             : 
     212             : 
     213             :  * <TR> <TH BGCOLOR="#CCCCCC"  colspan="4" valign="center"> Value <br> (Mandatory) </TH></TR>
     214             :         
     215             :  * <TR>
     216             :  * <TD> startValidTime </TD> 
     217             :  * <TD> ArrayTime </TD>
     218             :  * <TD>  &nbsp;  </TD> 
     219             :  * <TD> &nbsp;the start time of result validity period. </TD>
     220             :  * </TR>
     221             :         
     222             :  * <TR>
     223             :  * <TD> endValidTime </TD> 
     224             :  * <TD> ArrayTime </TD>
     225             :  * <TD>  &nbsp;  </TD> 
     226             :  * <TD> &nbsp;the end time of result validity period. </TD>
     227             :  * </TR>
     228             :         
     229             :  * <TR>
     230             :  * <TD> numReceptor (numReceptor)</TD> 
     231             :  * <TD> int </TD>
     232             :  * <TD>  &nbsp;  </TD> 
     233             :  * <TD> &nbsp;the number of receptors. </TD>
     234             :  * </TR>
     235             :         
     236             :  * <TR>
     237             :  * <TD> refAntennaName </TD> 
     238             :  * <TD> std::string </TD>
     239             :  * <TD>  &nbsp;  </TD> 
     240             :  * <TD> &nbsp;the name of the antenna used as a
     241             : reference to get the antenna-based
     242             : phases.
     243             :  </TD>
     244             :  * </TR>
     245             :         
     246             :  * <TR>
     247             :  * <TD> direction </TD> 
     248             :  * <TD> std::vector<Angle > </TD>
     249             :  * <TD>  2 </TD> 
     250             :  * <TD> &nbsp;the direction of the source. </TD>
     251             :  * </TR>
     252             :         
     253             :  * <TR>
     254             :  * <TD> frequencyRange </TD> 
     255             :  * <TD> std::vector<Frequency > </TD>
     256             :  * <TD>  2 </TD> 
     257             :  * <TD> &nbsp;the frequency range. </TD>
     258             :  * </TR>
     259             :         
     260             :  * <TR>
     261             :  * <TD> integrationTime </TD> 
     262             :  * <TD> Interval </TD>
     263             :  * <TD>  &nbsp;  </TD> 
     264             :  * <TD> &nbsp;the integration duration for a data point. </TD>
     265             :  * </TR>
     266             :         
     267             :  * <TR>
     268             :  * <TD> polarizationTypes </TD> 
     269             :  * <TD> std::vector<PolarizationTypeMod::PolarizationType > </TD>
     270             :  * <TD>  numReceptor </TD> 
     271             :  * <TD> &nbsp;the polarizations of the receptors (an array with one value per receptor). </TD>
     272             :  * </TR>
     273             :         
     274             :  * <TR>
     275             :  * <TD> correctionValidity </TD> 
     276             :  * <TD> bool </TD>
     277             :  * <TD>  &nbsp;  </TD> 
     278             :  * <TD> &nbsp;the deduced validity of atmospheric path length correction (from water vapor radiometers). </TD>
     279             :  * </TR>
     280             :         
     281             :  * <TR>
     282             :  * <TD> phaseAnt </TD> 
     283             :  * <TD> std::vector<float > </TD>
     284             :  * <TD>  numReceptor </TD> 
     285             :  * <TD> &nbsp;the antenna based phase solution averaged over the scan (one value per receptor per antenna). See refAntennaName for the association of the values of this array with the antennas. </TD>
     286             :  * </TR>
     287             :         
     288             :  * <TR>
     289             :  * <TD> phaseAntRMS </TD> 
     290             :  * <TD> std::vector<float > </TD>
     291             :  * <TD>  numReceptor </TD> 
     292             :  * <TD> &nbsp;the RMS of the phase fluctuations relative to the antenna based average phase (one value per receptor per antenna). See refAntennaName for the association of the values of this array with the antennas. </TD>
     293             :  * </TR>
     294             :         
     295             :  * <TR>
     296             :  * <TD> amplitudeAnt </TD> 
     297             :  * <TD> std::vector<float > </TD>
     298             :  * <TD>  numReceptor </TD> 
     299             :  * <TD> &nbsp;the antenna based amplitude solution averaged over the scan (one value per receptor per antenna). See refAntennaName for the association of the values of this array with the antennas. </TD>
     300             :  * </TR>
     301             :         
     302             :  * <TR>
     303             :  * <TD> amplitudeAntRMS </TD> 
     304             :  * <TD> std::vector<float > </TD>
     305             :  * <TD>  numReceptor </TD> 
     306             :  * <TD> &nbsp;the antenna based amplitude solution averaged over the scan (one value per receptor per antenna). See refAntennaName for the association of the values of this array with the antennas. </TD>
     307             :  * </TR>
     308             :         
     309             : 
     310             : 
     311             :  * </TABLE>
     312             :  */
     313             : class CalAntennaSolutionsTable : public Representable {
     314             :         friend class ASDM;
     315             : 
     316             : public:
     317             : 
     318             : 
     319             :         /**
     320             :          * Return the list of field names that make up key key
     321             :          * as an array of strings.
     322             :          * @return a vector of string.
     323             :          */     
     324             :         static const std::vector<std::string>& getKeyName();
     325             : 
     326             : 
     327             :         virtual ~CalAntennaSolutionsTable();
     328             :         
     329             :         /**
     330             :          * Return the container to which this table belongs.
     331             :          *
     332             :          * @return the ASDM containing this table.
     333             :          */
     334             :         ASDM &getContainer() const;
     335             :         
     336             :         /**
     337             :          * Return the number of rows in the table.
     338             :          *
     339             :          * @return the number of rows in an unsigned int.
     340             :          */
     341             :         unsigned int size() const;
     342             :         
     343             :         /**
     344             :          * Return the name of this table.
     345             :          *
     346             :          * This is a instance method of the class.
     347             :          *
     348             :          * @return the name of this table in a string.
     349             :          */
     350             :         std::string getName() const;
     351             :         
     352             :         /**
     353             :          * Return the name of this table.
     354             :          *
     355             :          * This is a static method of the class.
     356             :          *
     357             :          * @return the name of this table in a string.
     358             :          */
     359             :         static std::string name() ;     
     360             :         
     361             :         /**
     362             :          * Return the version information about this table.
     363             :          *
     364             :          */
     365             :          std::string getVersion() const ;
     366             :         
     367             :         /**
     368             :          * Return the names of the attributes of this table.
     369             :          *
     370             :          * @return a vector of string
     371             :          */
     372             :          static const std::vector<std::string>& getAttributesNames();
     373             : 
     374             :         /**
     375             :          * Return the default sorted list of attributes names in the binary representation of the table.
     376             :          *
     377             :          * @return a const reference to a vector of string
     378             :          */
     379             :          static const std::vector<std::string>& defaultAttributesNamesInBin();
     380             :          
     381             :         /**
     382             :          * Return this table's Entity.
     383             :          */
     384             :         Entity getEntity() const;
     385             : 
     386             :         /**
     387             :          * Set this table's Entity.
     388             :          * @param e An entity. 
     389             :          */
     390             :         void setEntity(Entity e);
     391             :                 
     392             :         /**
     393             :          * Produces an XML representation conform
     394             :          * to the schema defined for CalAntennaSolutions (CalAntennaSolutionsTable.xsd).
     395             :          *
     396             :          * @returns a string containing the XML representation.
     397             :          * @throws ConversionException
     398             :          */
     399             :         std::string toXML()  ;
     400             : 
     401             : #ifndef WITHOUT_ACS
     402             :         // Conversion Methods
     403             :         /**
     404             :          * Convert this table into a CalAntennaSolutionsTableIDL CORBA structure.
     405             :          *
     406             :          * @return a pointer to a CalAntennaSolutionsTableIDL
     407             :          */
     408             :         asdmIDL::CalAntennaSolutionsTableIDL *toIDL() ;
     409             :         
     410             :         /**
     411             :          * Fills the CORBA data structure passed in parameter
     412             :          * with the content of this table.
     413             :          *
     414             :          * @param x a reference to the asdmIDL::CalAntennaSolutionsTableIDL to be populated
     415             :          * with the content of this.
     416             :          */
     417             :          void toIDL(asdmIDL::CalAntennaSolutionsTableIDL& x) const;
     418             :          
     419             : #endif
     420             : 
     421             : #ifndef WITHOUT_ACS
     422             :         /**
     423             :          * Populate this table from the content of a CalAntennaSolutionsTableIDL Corba structure.
     424             :          *
     425             :          * @throws DuplicateKey Thrown if the method tries to add a row having a key that is already in the table.
     426             :          * @throws ConversionException
     427             :          */     
     428             :         void fromIDL(asdmIDL::CalAntennaSolutionsTableIDL x) ;
     429             : #endif
     430             :         
     431             :         //
     432             :         // ====> Row creation.
     433             :         //
     434             :         
     435             :         /**
     436             :          * Create a new row with default values.
     437             :          * @return a pointer on a CalAntennaSolutionsRow
     438             :          */
     439             :         CalAntennaSolutionsRow *newRow();
     440             :         
     441             :         
     442             :         /**
     443             :          * Create a new row initialized to the specified values.
     444             :          * @return a pointer on the created and initialized row.
     445             :         
     446             :          * @param antennaName
     447             :         
     448             :          * @param atmPhaseCorrection
     449             :         
     450             :          * @param receiverBand
     451             :         
     452             :          * @param basebandName
     453             :         
     454             :          * @param calDataId
     455             :         
     456             :          * @param calReductionId
     457             :         
     458             :          * @param spectralWindowId
     459             :         
     460             :          * @param startValidTime
     461             :         
     462             :          * @param endValidTime
     463             :         
     464             :          * @param numReceptor
     465             :         
     466             :          * @param refAntennaName
     467             :         
     468             :          * @param direction
     469             :         
     470             :          * @param frequencyRange
     471             :         
     472             :          * @param integrationTime
     473             :         
     474             :          * @param polarizationTypes
     475             :         
     476             :          * @param correctionValidity
     477             :         
     478             :          * @param phaseAnt
     479             :         
     480             :          * @param phaseAntRMS
     481             :         
     482             :          * @param amplitudeAnt
     483             :         
     484             :          * @param amplitudeAntRMS
     485             :         
     486             :      */
     487             :         CalAntennaSolutionsRow *newRow(std::string antennaName, AtmPhaseCorrectionMod::AtmPhaseCorrection atmPhaseCorrection, ReceiverBandMod::ReceiverBand receiverBand, BasebandNameMod::BasebandName basebandName, Tag calDataId, Tag calReductionId, Tag spectralWindowId, ArrayTime startValidTime, ArrayTime endValidTime, int numReceptor, std::string refAntennaName, std::vector<Angle > direction, std::vector<Frequency > frequencyRange, Interval integrationTime, std::vector<PolarizationTypeMod::PolarizationType > polarizationTypes, bool correctionValidity, std::vector<float > phaseAnt, std::vector<float > phaseAntRMS, std::vector<float > amplitudeAnt, std::vector<float > amplitudeAntRMS);
     488             :         
     489             : 
     490             : 
     491             :         /**
     492             :          * Create a new row using a copy constructor mechanism.
     493             :          * 
     494             :          * The method creates a new CalAntennaSolutionsRow owned by this. Each attribute of the created row 
     495             :          * is a (deep) copy of the corresponding attribute of row. The method does not add 
     496             :          * the created row to this, its simply parents it to this, a call to the add method
     497             :          * has to be done in order to get the row added (very likely after having modified
     498             :          * some of its attributes).
     499             :          * If row is null then the method returns a new CalAntennaSolutionsRow with default values for its attributes. 
     500             :          *
     501             :          * @param row the row which is to be copied.
     502             :          */
     503             :          CalAntennaSolutionsRow *newRow(CalAntennaSolutionsRow *row); 
     504             : 
     505             :         //
     506             :         // ====> Append a row to its table.
     507             :         //
     508             :  
     509             :         
     510             :         /**
     511             :          * Add a row.
     512             :          * @param x a pointer to the CalAntennaSolutionsRow to be added.
     513             :          *
     514             :          * @return a pointer to a CalAntennaSolutionsRow. If the table contains a CalAntennaSolutionsRow whose attributes (key and mandatory values) are equal to x ones
     515             :          * then returns a pointer on that CalAntennaSolutionsRow, otherwise returns x.
     516             :          *
     517             :          * @throw DuplicateKey { thrown when the table contains a CalAntennaSolutionsRow with a key equal to the x one but having
     518             :          * and a value section different from x one }
     519             :          *
     520             :         
     521             :          */
     522             :         CalAntennaSolutionsRow* add(CalAntennaSolutionsRow* x) ; 
     523             : 
     524             :  
     525             : 
     526             : 
     527             : 
     528             :         //
     529             :         // ====> Methods returning rows.
     530             :         //
     531             :                 
     532             :         /**
     533             :          * Get a collection of pointers on the rows of the table.
     534             :          * @return Alls rows in a vector of pointers of CalAntennaSolutionsRow. The elements of this vector are stored in the order 
     535             :          * in which they have been added to the CalAntennaSolutionsTable.
     536             :          */
     537             :         std::vector<CalAntennaSolutionsRow *> get() ;
     538             :         
     539             :         /**
     540             :          * Get a const reference on the collection of rows pointers internally hold by the table.
     541             :          * @return A const reference of a vector of pointers of CalAntennaSolutionsRow. The elements of this vector are stored in the order 
     542             :          * in which they have been added to the CalAntennaSolutionsTable.
     543             :          *
     544             :          */
     545             :          const std::vector<CalAntennaSolutionsRow *>& get() const ;
     546             :         
     547             : 
     548             : 
     549             :  
     550             :         
     551             :         /**
     552             :          * Returns a CalAntennaSolutionsRow* given a key.
     553             :          * @return a pointer to the row having the key whose values are passed as parameters, or 0 if
     554             :          * no row exists for that key.
     555             :         
     556             :          * @param antennaName
     557             :         
     558             :          * @param atmPhaseCorrection
     559             :         
     560             :          * @param receiverBand
     561             :         
     562             :          * @param basebandName
     563             :         
     564             :          * @param calDataId
     565             :         
     566             :          * @param calReductionId
     567             :         
     568             :          * @param spectralWindowId
     569             :         
     570             :          *
     571             :          */
     572             :         CalAntennaSolutionsRow* getRowByKey(std::string antennaName, AtmPhaseCorrectionMod::AtmPhaseCorrection atmPhaseCorrection, ReceiverBandMod::ReceiverBand receiverBand, BasebandNameMod::BasebandName basebandName, Tag calDataId, Tag calReductionId, Tag spectralWindowId);
     573             : 
     574             :                 
     575             : 
     576             : 
     577             : 
     578             :         /**
     579             :          * Look up the table for a row whose all attributes 
     580             :          * are equal to the corresponding parameters of the method.
     581             :          * @return a pointer on this row if any, null otherwise.
     582             :          *
     583             :                         
     584             :          * @param antennaName
     585             :                         
     586             :          * @param atmPhaseCorrection
     587             :                         
     588             :          * @param receiverBand
     589             :                         
     590             :          * @param basebandName
     591             :                         
     592             :          * @param calDataId
     593             :                         
     594             :          * @param calReductionId
     595             :                         
     596             :          * @param spectralWindowId
     597             :                         
     598             :          * @param startValidTime
     599             :                         
     600             :          * @param endValidTime
     601             :                         
     602             :          * @param numReceptor
     603             :                         
     604             :          * @param refAntennaName
     605             :                         
     606             :          * @param direction
     607             :                         
     608             :          * @param frequencyRange
     609             :                         
     610             :          * @param integrationTime
     611             :                         
     612             :          * @param polarizationTypes
     613             :                         
     614             :          * @param correctionValidity
     615             :                         
     616             :          * @param phaseAnt
     617             :                         
     618             :          * @param phaseAntRMS
     619             :                         
     620             :          * @param amplitudeAnt
     621             :                         
     622             :          * @param amplitudeAntRMS
     623             :                          
     624             :          */
     625             :         CalAntennaSolutionsRow* lookup(std::string antennaName, AtmPhaseCorrectionMod::AtmPhaseCorrection atmPhaseCorrection, ReceiverBandMod::ReceiverBand receiverBand, BasebandNameMod::BasebandName basebandName, Tag calDataId, Tag calReductionId, Tag spectralWindowId, ArrayTime startValidTime, ArrayTime endValidTime, int numReceptor, std::string refAntennaName, std::vector<Angle > direction, std::vector<Frequency > frequencyRange, Interval integrationTime, std::vector<PolarizationTypeMod::PolarizationType > polarizationTypes, bool correctionValidity, std::vector<float > phaseAnt, std::vector<float > phaseAntRMS, std::vector<float > amplitudeAnt, std::vector<float > amplitudeAntRMS); 
     626             : 
     627             : 
     628             :         void setUnknownAttributeBinaryReader(const std::string& attributeName, BinaryAttributeReaderFunctor* barFctr);
     629             :         BinaryAttributeReaderFunctor* getUnknownAttributeBinaryReader(const std::string& attributeName) const;
     630             : 
     631             : private:
     632             : 
     633             :         /**
     634             :          * Create a CalAntennaSolutionsTable.
     635             :          * <p>
     636             :          * This constructor is private because only the
     637             :          * container can create tables.  All tables must know the container
     638             :          * to which they belong.
     639             :          * @param container The container to which this table belongs.
     640             :          */ 
     641             :         CalAntennaSolutionsTable (ASDM & container);
     642             : 
     643             :         ASDM & container;
     644             :         
     645             :         bool archiveAsBin; // If true archive binary else archive XML
     646             :         bool fileAsBin ; // If true file binary else file XML   
     647             :         
     648             :         std::string version ; 
     649             :         
     650             :         Entity entity;
     651             :         
     652             : 
     653             :         
     654             :         
     655             : 
     656             : 
     657             :         /**
     658             :          * If this table has an autoincrementable attribute then check if *x verifies the rule of uniqueness and throw exception if not.
     659             :          * Check if *x verifies the key uniqueness rule and throw an exception if not.
     660             :          * Append x to its table.
     661             :          * @throws DuplicateKey
     662             :          
     663             :          */
     664             :         CalAntennaSolutionsRow* checkAndAdd(CalAntennaSolutionsRow* x, bool skipCheckUniqueness=false) ;
     665             :         
     666             :         /**
     667             :          * Brutally append an CalAntennaSolutionsRow x to the collection of rows already stored in this table. No uniqueness check is done !
     668             :          *
     669             :          * @param CalAntennaSolutionsRow* x a pointer onto the CalAntennaSolutionsRow to be appended.
     670             :          */
     671             :          void append(CalAntennaSolutionsRow* x) ;
     672             :          
     673             :         /**
     674             :          * Brutally append an CalAntennaSolutionsRow x to the collection of rows already stored in this table. No uniqueness check is done !
     675             :          *
     676             :          * @param CalAntennaSolutionsRow* x a pointer onto the CalAntennaSolutionsRow to be appended.
     677             :          */
     678             :          void addWithoutCheckingUnique(CalAntennaSolutionsRow* x) ;
     679             :          
     680             :          
     681             : 
     682             : 
     683             : 
     684             : // A data structure to store the pointers on the table's rows.
     685             : 
     686             : // In all cases we maintain a private vector of CalAntennaSolutionsRow s.
     687             :    std::vector<CalAntennaSolutionsRow * > privateRows;
     688             :    
     689             : 
     690             :                         
     691             :         std::vector<CalAntennaSolutionsRow *> row;
     692             : 
     693             :         
     694             :         void error() ; //throw(ConversionException);
     695             : 
     696             :         
     697             :         /**
     698             :          * Populate this table from the content of a XML document that is required to
     699             :          * be conform to the XML schema defined for a CalAntennaSolutions (CalAntennaSolutionsTable.xsd).
     700             :          * @throws ConversionException
     701             :          * 
     702             :          */
     703             :         void fromXML(std::string& xmlDoc) ;
     704             :                 
     705             :         std::map<std::string, BinaryAttributeReaderFunctor *> unknownAttributes2Functors;
     706             : 
     707             :         /**
     708             :           * Private methods involved during the build of this table out of the content
     709             :           * of file(s) containing an external representation of a CalAntennaSolutions table.
     710             :           */
     711             :         void setFromMIMEFile(const std::string& directory);
     712             :         /*
     713             :         void openMIMEFile(const std::string& directory);
     714             :         */
     715             :         void setFromXMLFile(const std::string& directory);
     716             :         
     717             :                  /**
     718             :          * Serialize this into a stream of bytes and encapsulates that stream into a MIME message.
     719             :          * @returns a string containing the MIME message.
     720             :          *
     721             :          * @param byteOrder a const pointer to a static instance of the class ByteOrder.
     722             :          * 
     723             :          */
     724             :         std::string toMIME(const asdm::ByteOrder* byteOrder=asdm::ByteOrder::Machine_Endianity);
     725             :   
     726             :         
     727             :    /** 
     728             :      * Extracts the binary part of a MIME message and deserialize its content
     729             :          * to fill this with the result of the deserialization. 
     730             :          * @param mimeMsg the string containing the MIME message.
     731             :          * @throws ConversionException
     732             :          */
     733             :          void setFromMIME(const std::string & mimeMsg);
     734             :         
     735             :         /**
     736             :           * Private methods involved during the export of this table into disk file(s).
     737             :           */
     738             :         std::string MIMEXMLPart(const asdm::ByteOrder* byteOrder=asdm::ByteOrder::Machine_Endianity);
     739             :         
     740             :         /**
     741             :           * Stores a representation (binary or XML) of this table into a file.
     742             :           *
     743             :           * Depending on the boolean value of its private field fileAsBin a binary serialization  of this (fileAsBin==true)  
     744             :           * will be saved in a file "CalAntennaSolutions.bin" or an XML representation (fileAsBin==false) will be saved in a file "CalAntennaSolutions.xml".
     745             :           * The file is always written in a directory whose name is passed as a parameter.
     746             :          * @param directory The name of directory  where the file containing the table's representation will be saved.
     747             :           * 
     748             :           */
     749             :           void toFile(std::string directory);
     750             :           
     751             :           /**
     752             :            * Load the table in memory if necessary.
     753             :            */
     754             :           bool loadInProgress;
     755           0 :           void checkPresenceInMemory() {
     756           0 :                 if (!presentInMemory && !loadInProgress) {
     757           0 :                         loadInProgress = true;
     758           0 :                         setFromFile(getContainer().getDirectory());
     759           0 :                         presentInMemory = true;
     760           0 :                         loadInProgress = false;
     761             :                 }
     762           0 :           }
     763             :         /**
     764             :          * Reads and parses a file containing a representation of a CalAntennaSolutionsTable as those produced  by the toFile method.
     765             :          * This table is populated with the result of the parsing.
     766             :          * @param directory The name of the directory containing the file te be read and parsed.
     767             :          * @throws ConversionException If any error occurs while reading the 
     768             :          * files in the directory or parsing them.
     769             :          *
     770             :          */
     771             :          void setFromFile(const std::string& directory);    
     772             :  
     773             : };
     774             : 
     775             : } // End namespace asdm
     776             : 
     777             : #endif /* CalAntennaSolutionsTable_CLASS */

Generated by: LCOV version 1.16