LCOV - code coverage report
Current view: top level - alma/ASDM - CalHolographyTable.h (source / functions) Hit Total Coverage
Test: casacpp_coverage.info Lines: 0 7 0.0 %
Date: 2024-10-12 00:35:29 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 CalHolographyTable.h
      32             :  */
      33             :  
      34             : #ifndef CalHolographyTable_CLASS
      35             : #define CalHolographyTable_CLASS
      36             : 
      37             : #include <string>
      38             : #include <vector>
      39             : #include <map>
      40             : 
      41             : 
      42             : 
      43             :         
      44             : #include <alma/ASDM/Temperature.h>
      45             :         
      46             : 
      47             :         
      48             : #include <alma/ASDM/ArrayTime.h>
      49             :         
      50             : 
      51             :         
      52             : #include <alma/ASDM/Angle.h>
      53             :         
      54             : 
      55             :         
      56             : #include <alma/ASDM/Length.h>
      57             :         
      58             : 
      59             :         
      60             : #include <alma/ASDM/Frequency.h>
      61             :         
      62             : 
      63             :         
      64             : #include <alma/ASDM/Tag.h>
      65             :         
      66             : 
      67             :         
      68             : #include <alma/ASDM/EntityRef.h>
      69             :         
      70             : 
      71             : 
      72             : 
      73             : 
      74             :         
      75             : 
      76             :         
      77             : #include <alma/Enumerations/CAntennaMake.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             : #include <alma/Enumerations/CReceiverBand.h>
     102             :         
     103             : 
     104             :         
     105             : 
     106             :         
     107             : 
     108             :         
     109             : 
     110             :         
     111             : 
     112             :         
     113             : 
     114             :         
     115             : 
     116             :         
     117             : 
     118             :         
     119             : 
     120             :         
     121             : 
     122             :         
     123             : 
     124             :         
     125             : 
     126             :         
     127             : 
     128             :         
     129             : 
     130             : 
     131             : 
     132             : #include <alma/ASDM/ConversionException.h>
     133             : #include <alma/ASDM/DuplicateKey.h>
     134             : #include <alma/ASDM/UniquenessViolationException.h>
     135             : #include <alma/ASDM/NoSuchRow.h>
     136             : #include <alma/ASDM/DuplicateKey.h>
     137             : 
     138             : 
     139             : #ifndef WITHOUT_ACS
     140             : #include <asdmIDLC.h>
     141             : #endif
     142             : 
     143             : #include <alma/ASDM/Representable.h>
     144             : 
     145             : #include <pthread.h>
     146             : 
     147             : namespace asdm {
     148             : 
     149             : //class asdm::ASDM;
     150             : //class asdm::CalHolographyRow;
     151             : 
     152             : class ASDM;
     153             : class CalHolographyRow;
     154             : /**
     155             :  * The CalHolographyTable class is an Alma table.
     156             :  * <BR>
     157             :  * 
     158             :  * \par Role
     159             :  * Result of holography calibration performed by TelCal.
     160             :  * <BR>
     161             :  
     162             :  * Generated from model's revision "-1", branch ""
     163             :  *
     164             :  * <TABLE BORDER="1">
     165             :  * <CAPTION> Attributes of CalHolography </CAPTION>
     166             :  * <TR BGCOLOR="#AAAAAA"> <TH> Name </TH> <TH> Type </TH> <TH> Expected shape  </TH> <TH> Comment </TH></TR>
     167             :  
     168             :  * <TR> <TH BGCOLOR="#CCCCCC" colspan="4" align="center"> Key </TD></TR>
     169             :         
     170             :  * <TR>
     171             :                 
     172             :  * <TD> antennaName </TD>
     173             :                  
     174             :  * <TD> std::string</TD>
     175             :  * <TD> &nbsp; </TD>
     176             :  * <TD> &nbsp;the name of the antenna. </TD>
     177             :  * </TR>
     178             :         
     179             :  * <TR>
     180             :                 
     181             :  * <TD> calDataId </TD>
     182             :                  
     183             :  * <TD> Tag</TD>
     184             :  * <TD> &nbsp; </TD>
     185             :  * <TD> &nbsp;refers to a unique row in CalData Table. </TD>
     186             :  * </TR>
     187             :         
     188             :  * <TR>
     189             :                 
     190             :  * <TD> calReductionId </TD>
     191             :                  
     192             :  * <TD> Tag</TD>
     193             :  * <TD> &nbsp; </TD>
     194             :  * <TD> &nbsp;refers to a unique row in CalReduction Table. </TD>
     195             :  * </TR>
     196             :         
     197             : 
     198             : 
     199             :  * <TR> <TH BGCOLOR="#CCCCCC"  colspan="4" valign="center"> Value <br> (Mandatory) </TH></TR>
     200             :         
     201             :  * <TR>
     202             :  * <TD> antennaMake </TD> 
     203             :  * <TD> AntennaMakeMod::AntennaMake </TD>
     204             :  * <TD>  &nbsp;  </TD> 
     205             :  * <TD> &nbsp;identifies the antenna make. </TD>
     206             :  * </TR>
     207             :         
     208             :  * <TR>
     209             :  * <TD> startValidTime </TD> 
     210             :  * <TD> ArrayTime </TD>
     211             :  * <TD>  &nbsp;  </TD> 
     212             :  * <TD> &nbsp;Start time of result validity period </TD>
     213             :  * </TR>
     214             :         
     215             :  * <TR>
     216             :  * <TD> endValidTime </TD> 
     217             :  * <TD> ArrayTime </TD>
     218             :  * <TD>  &nbsp;  </TD> 
     219             :  * <TD> &nbsp;the end time of result validity period. </TD>
     220             :  * </TR>
     221             :         
     222             :  * <TR>
     223             :  * <TD> ambientTemperature </TD> 
     224             :  * <TD> Temperature </TD>
     225             :  * <TD>  &nbsp;  </TD> 
     226             :  * <TD> &nbsp;the ambient temperature. </TD>
     227             :  * </TR>
     228             :         
     229             :  * <TR>
     230             :  * <TD> focusPosition </TD> 
     231             :  * <TD> std::vector<Length > </TD>
     232             :  * <TD>  3 </TD> 
     233             :  * <TD> &nbsp;the focus position. </TD>
     234             :  * </TR>
     235             :         
     236             :  * <TR>
     237             :  * <TD> frequencyRange </TD> 
     238             :  * <TD> std::vector<Frequency > </TD>
     239             :  * <TD>  2 </TD> 
     240             :  * <TD> &nbsp;the range of frequencies for which the measurement is valid. </TD>
     241             :  * </TR>
     242             :         
     243             :  * <TR>
     244             :  * <TD> illuminationTaper </TD> 
     245             :  * <TD> double </TD>
     246             :  * <TD>  &nbsp;  </TD> 
     247             :  * <TD> &nbsp;the amplitude illumination taper. </TD>
     248             :  * </TR>
     249             :         
     250             :  * <TR>
     251             :  * <TD> numReceptor (numReceptor)</TD> 
     252             :  * <TD> int </TD>
     253             :  * <TD>  &nbsp;  </TD> 
     254             :  * <TD> &nbsp;the number of receptors. </TD>
     255             :  * </TR>
     256             :         
     257             :  * <TR>
     258             :  * <TD> polarizationTypes </TD> 
     259             :  * <TD> std::vector<PolarizationTypeMod::PolarizationType > </TD>
     260             :  * <TD>  numReceptor </TD> 
     261             :  * <TD> &nbsp;identifies the polarization types (one value per receptor). </TD>
     262             :  * </TR>
     263             :         
     264             :  * <TR>
     265             :  * <TD> numPanelModes (numPanelModes)</TD> 
     266             :  * <TD> int </TD>
     267             :  * <TD>  &nbsp;  </TD> 
     268             :  * <TD> &nbsp;the number panel modes fitted. </TD>
     269             :  * </TR>
     270             :         
     271             :  * <TR>
     272             :  * <TD> receiverBand </TD> 
     273             :  * <TD> ReceiverBandMod::ReceiverBand </TD>
     274             :  * <TD>  &nbsp;  </TD> 
     275             :  * <TD> &nbsp;identifies the receiver band. </TD>
     276             :  * </TR>
     277             :         
     278             :  * <TR>
     279             :  * <TD> beamMapUID </TD> 
     280             :  * <TD> EntityRef </TD>
     281             :  * <TD>  &nbsp;  </TD> 
     282             :  * <TD> &nbsp;refers to the beam map image. </TD>
     283             :  * </TR>
     284             :         
     285             :  * <TR>
     286             :  * <TD> rawRMS </TD> 
     287             :  * <TD> Length </TD>
     288             :  * <TD>  &nbsp;  </TD> 
     289             :  * <TD> &nbsp;the RMS of the pathlength residuals. </TD>
     290             :  * </TR>
     291             :         
     292             :  * <TR>
     293             :  * <TD> weightedRMS </TD> 
     294             :  * <TD> Length </TD>
     295             :  * <TD>  &nbsp;  </TD> 
     296             :  * <TD> &nbsp;the weigthted RMS of the pathlength residuals. </TD>
     297             :  * </TR>
     298             :         
     299             :  * <TR>
     300             :  * <TD> surfaceMapUID </TD> 
     301             :  * <TD> EntityRef </TD>
     302             :  * <TD>  &nbsp;  </TD> 
     303             :  * <TD> &nbsp;refers to the resulting antenna surface map image. </TD>
     304             :  * </TR>
     305             :         
     306             :  * <TR>
     307             :  * <TD> direction </TD> 
     308             :  * <TD> std::vector<Angle > </TD>
     309             :  * <TD>  2 </TD> 
     310             :  * <TD> &nbsp;the direction of the source. </TD>
     311             :  * </TR>
     312             :         
     313             : 
     314             : 
     315             :  * <TR> <TH BGCOLOR="#CCCCCC"  colspan="4" valign="center"> Value <br> (Optional) </TH></TR>
     316             :         
     317             :  * <TR>
     318             :  * <TD> numScrew(numScrew)</TD> 
     319             :  * <TD> int </TD>
     320             :  * <TD>  &nbsp; </TD>
     321             :  * <TD>&nbsp; the number of screws. </TD>
     322             :  * </TR>
     323             :         
     324             :  * <TR>
     325             :  * <TD> screwName</TD> 
     326             :  * <TD> std::vector<std::string > </TD>
     327             :  * <TD>  numScrew  </TD>
     328             :  * <TD>&nbsp; the names of the screws (one value per screw). </TD>
     329             :  * </TR>
     330             :         
     331             :  * <TR>
     332             :  * <TD> screwMotion</TD> 
     333             :  * <TD> std::vector<Length > </TD>
     334             :  * <TD>  numScrew  </TD>
     335             :  * <TD>&nbsp; the prescribed screw motions (one value per screw). </TD>
     336             :  * </TR>
     337             :         
     338             :  * <TR>
     339             :  * <TD> screwMotionError</TD> 
     340             :  * <TD> std::vector<Length > </TD>
     341             :  * <TD>  numScrew  </TD>
     342             :  * <TD>&nbsp; the uncertainties on the prescribed screw  motions (one value per screw). </TD>
     343             :  * </TR>
     344             :         
     345             :  * <TR>
     346             :  * <TD> gravCorrection</TD> 
     347             :  * <TD> bool </TD>
     348             :  * <TD>  &nbsp; </TD>
     349             :  * <TD>&nbsp; indicates if a gravitational correction was applied (true) or not (false). </TD>
     350             :  * </TR>
     351             :         
     352             :  * <TR>
     353             :  * <TD> gravOptRange</TD> 
     354             :  * <TD> std::vector<Angle > </TD>
     355             :  * <TD>  2  </TD>
     356             :  * <TD>&nbsp; the range of gravitational optimization. </TD>
     357             :  * </TR>
     358             :         
     359             :  * <TR>
     360             :  * <TD> tempCorrection</TD> 
     361             :  * <TD> bool </TD>
     362             :  * <TD>  &nbsp; </TD>
     363             :  * <TD>&nbsp; indicates if a temperature correction was applied (true) or not (false). </TD>
     364             :  * </TR>
     365             :         
     366             :  * <TR>
     367             :  * <TD> tempOptRange</TD> 
     368             :  * <TD> std::vector<Temperature > </TD>
     369             :  * <TD>  2  </TD>
     370             :  * <TD>&nbsp; the range of temperature optimization. </TD>
     371             :  * </TR>
     372             :         
     373             : 
     374             :  * </TABLE>
     375             :  */
     376             : class CalHolographyTable : public Representable {
     377             :         friend class ASDM;
     378             : 
     379             : public:
     380             : 
     381             : 
     382             :         /**
     383             :          * Return the list of field names that make up key key
     384             :          * as an array of strings.
     385             :          * @return a vector of string.
     386             :          */     
     387             :         static const std::vector<std::string>& getKeyName();
     388             : 
     389             : 
     390             :         virtual ~CalHolographyTable();
     391             :         
     392             :         /**
     393             :          * Return the container to which this table belongs.
     394             :          *
     395             :          * @return the ASDM containing this table.
     396             :          */
     397             :         ASDM &getContainer() const;
     398             :         
     399             :         /**
     400             :          * Return the number of rows in the table.
     401             :          *
     402             :          * @return the number of rows in an unsigned int.
     403             :          */
     404             :         unsigned int size() const;
     405             :         
     406             :         /**
     407             :          * Return the name of this table.
     408             :          *
     409             :          * This is a instance method of the class.
     410             :          *
     411             :          * @return the name of this table in a string.
     412             :          */
     413             :         std::string getName() const;
     414             :         
     415             :         /**
     416             :          * Return the name of this table.
     417             :          *
     418             :          * This is a static method of the class.
     419             :          *
     420             :          * @return the name of this table in a string.
     421             :          */
     422             :         static std::string name() ;     
     423             :         
     424             :         /**
     425             :          * Return the version information about this table.
     426             :          *
     427             :          */
     428             :          std::string getVersion() const ;
     429             :         
     430             :         /**
     431             :          * Return the names of the attributes of this table.
     432             :          *
     433             :          * @return a vector of string
     434             :          */
     435             :          static const std::vector<std::string>& getAttributesNames();
     436             : 
     437             :         /**
     438             :          * Return the default sorted list of attributes names in the binary representation of the table.
     439             :          *
     440             :          * @return a const reference to a vector of string
     441             :          */
     442             :          static const std::vector<std::string>& defaultAttributesNamesInBin();
     443             :          
     444             :         /**
     445             :          * Return this table's Entity.
     446             :          */
     447             :         Entity getEntity() const;
     448             : 
     449             :         /**
     450             :          * Set this table's Entity.
     451             :          * @param e An entity. 
     452             :          */
     453             :         void setEntity(Entity e);
     454             :                 
     455             :         /**
     456             :          * Produces an XML representation conform
     457             :          * to the schema defined for CalHolography (CalHolographyTable.xsd).
     458             :          *
     459             :          * @returns a string containing the XML representation.
     460             :          * @throws ConversionException
     461             :          */
     462             :         std::string toXML()  ;
     463             : 
     464             : #ifndef WITHOUT_ACS
     465             :         // Conversion Methods
     466             :         /**
     467             :          * Convert this table into a CalHolographyTableIDL CORBA structure.
     468             :          *
     469             :          * @return a pointer to a CalHolographyTableIDL
     470             :          */
     471             :         asdmIDL::CalHolographyTableIDL *toIDL() ;
     472             :         
     473             :         /**
     474             :          * Fills the CORBA data structure passed in parameter
     475             :          * with the content of this table.
     476             :          *
     477             :          * @param x a reference to the asdmIDL::CalHolographyTableIDL to be populated
     478             :          * with the content of this.
     479             :          */
     480             :          void toIDL(asdmIDL::CalHolographyTableIDL& x) const;
     481             :          
     482             : #endif
     483             : 
     484             : #ifndef WITHOUT_ACS
     485             :         /**
     486             :          * Populate this table from the content of a CalHolographyTableIDL Corba structure.
     487             :          *
     488             :          * @throws DuplicateKey Thrown if the method tries to add a row having a key that is already in the table.
     489             :          * @throws ConversionException
     490             :          */     
     491             :         void fromIDL(asdmIDL::CalHolographyTableIDL x) ;
     492             : #endif
     493             :         
     494             :         //
     495             :         // ====> Row creation.
     496             :         //
     497             :         
     498             :         /**
     499             :          * Create a new row with default values.
     500             :          * @return a pointer on a CalHolographyRow
     501             :          */
     502             :         CalHolographyRow *newRow();
     503             :         
     504             :         
     505             :         /**
     506             :          * Create a new row initialized to the specified values.
     507             :          * @return a pointer on the created and initialized row.
     508             :         
     509             :          * @param antennaName
     510             :         
     511             :          * @param calDataId
     512             :         
     513             :          * @param calReductionId
     514             :         
     515             :          * @param antennaMake
     516             :         
     517             :          * @param startValidTime
     518             :         
     519             :          * @param endValidTime
     520             :         
     521             :          * @param ambientTemperature
     522             :         
     523             :          * @param focusPosition
     524             :         
     525             :          * @param frequencyRange
     526             :         
     527             :          * @param illuminationTaper
     528             :         
     529             :          * @param numReceptor
     530             :         
     531             :          * @param polarizationTypes
     532             :         
     533             :          * @param numPanelModes
     534             :         
     535             :          * @param receiverBand
     536             :         
     537             :          * @param beamMapUID
     538             :         
     539             :          * @param rawRMS
     540             :         
     541             :          * @param weightedRMS
     542             :         
     543             :          * @param surfaceMapUID
     544             :         
     545             :          * @param direction
     546             :         
     547             :      */
     548             :         CalHolographyRow *newRow(std::string antennaName, Tag calDataId, Tag calReductionId, AntennaMakeMod::AntennaMake antennaMake, ArrayTime startValidTime, ArrayTime endValidTime, Temperature ambientTemperature, std::vector<Length > focusPosition, std::vector<Frequency > frequencyRange, double illuminationTaper, int numReceptor, std::vector<PolarizationTypeMod::PolarizationType > polarizationTypes, int numPanelModes, ReceiverBandMod::ReceiverBand receiverBand, EntityRef beamMapUID, Length rawRMS, Length weightedRMS, EntityRef surfaceMapUID, std::vector<Angle > direction);
     549             :         
     550             : 
     551             : 
     552             :         /**
     553             :          * Create a new row using a copy constructor mechanism.
     554             :          * 
     555             :          * The method creates a new CalHolographyRow owned by this. Each attribute of the created row 
     556             :          * is a (deep) copy of the corresponding attribute of row. The method does not add 
     557             :          * the created row to this, its simply parents it to this, a call to the add method
     558             :          * has to be done in order to get the row added (very likely after having modified
     559             :          * some of its attributes).
     560             :          * If row is null then the method returns a new CalHolographyRow with default values for its attributes. 
     561             :          *
     562             :          * @param row the row which is to be copied.
     563             :          */
     564             :          CalHolographyRow *newRow(CalHolographyRow *row); 
     565             : 
     566             :         //
     567             :         // ====> Append a row to its table.
     568             :         //
     569             :  
     570             :         
     571             :         /**
     572             :          * Add a row.
     573             :          * @param x a pointer to the CalHolographyRow to be added.
     574             :          *
     575             :          * @return a pointer to a CalHolographyRow. If the table contains a CalHolographyRow whose attributes (key and mandatory values) are equal to x ones
     576             :          * then returns a pointer on that CalHolographyRow, otherwise returns x.
     577             :          *
     578             :          * @throw DuplicateKey { thrown when the table contains a CalHolographyRow with a key equal to the x one but having
     579             :          * and a value section different from x one }
     580             :          *
     581             :         
     582             :          */
     583             :         CalHolographyRow* add(CalHolographyRow* x) ; 
     584             : 
     585             :  
     586             : 
     587             : 
     588             : 
     589             :         //
     590             :         // ====> Methods returning rows.
     591             :         //
     592             :                 
     593             :         /**
     594             :          * Get a collection of pointers on the rows of the table.
     595             :          * @return Alls rows in a vector of pointers of CalHolographyRow. The elements of this vector are stored in the order 
     596             :          * in which they have been added to the CalHolographyTable.
     597             :          */
     598             :         std::vector<CalHolographyRow *> get() ;
     599             :         
     600             :         /**
     601             :          * Get a const reference on the collection of rows pointers internally hold by the table.
     602             :          * @return A const reference of a vector of pointers of CalHolographyRow. The elements of this vector are stored in the order 
     603             :          * in which they have been added to the CalHolographyTable.
     604             :          *
     605             :          */
     606             :          const std::vector<CalHolographyRow *>& get() const ;
     607             :         
     608             : 
     609             : 
     610             :  
     611             :         
     612             :         /**
     613             :          * Returns a CalHolographyRow* given a key.
     614             :          * @return a pointer to the row having the key whose values are passed as parameters, or 0 if
     615             :          * no row exists for that key.
     616             :         
     617             :          * @param antennaName
     618             :         
     619             :          * @param calDataId
     620             :         
     621             :          * @param calReductionId
     622             :         
     623             :          *
     624             :          */
     625             :         CalHolographyRow* getRowByKey(std::string antennaName, Tag calDataId, Tag calReductionId);
     626             : 
     627             :                 
     628             : 
     629             : 
     630             : 
     631             :         /**
     632             :          * Look up the table for a row whose all attributes 
     633             :          * are equal to the corresponding parameters of the method.
     634             :          * @return a pointer on this row if any, null otherwise.
     635             :          *
     636             :                         
     637             :          * @param antennaName
     638             :                         
     639             :          * @param calDataId
     640             :                         
     641             :          * @param calReductionId
     642             :                         
     643             :          * @param antennaMake
     644             :                         
     645             :          * @param startValidTime
     646             :                         
     647             :          * @param endValidTime
     648             :                         
     649             :          * @param ambientTemperature
     650             :                         
     651             :          * @param focusPosition
     652             :                         
     653             :          * @param frequencyRange
     654             :                         
     655             :          * @param illuminationTaper
     656             :                         
     657             :          * @param numReceptor
     658             :                         
     659             :          * @param polarizationTypes
     660             :                         
     661             :          * @param numPanelModes
     662             :                         
     663             :          * @param receiverBand
     664             :                         
     665             :          * @param beamMapUID
     666             :                         
     667             :          * @param rawRMS
     668             :                         
     669             :          * @param weightedRMS
     670             :                         
     671             :          * @param surfaceMapUID
     672             :                         
     673             :          * @param direction
     674             :                          
     675             :          */
     676             :         CalHolographyRow* lookup(std::string antennaName, Tag calDataId, Tag calReductionId, AntennaMakeMod::AntennaMake antennaMake, ArrayTime startValidTime, ArrayTime endValidTime, Temperature ambientTemperature, std::vector<Length > focusPosition, std::vector<Frequency > frequencyRange, double illuminationTaper, int numReceptor, std::vector<PolarizationTypeMod::PolarizationType > polarizationTypes, int numPanelModes, ReceiverBandMod::ReceiverBand receiverBand, EntityRef beamMapUID, Length rawRMS, Length weightedRMS, EntityRef surfaceMapUID, std::vector<Angle > direction); 
     677             : 
     678             : 
     679             :         void setUnknownAttributeBinaryReader(const std::string& attributeName, BinaryAttributeReaderFunctor* barFctr);
     680             :         BinaryAttributeReaderFunctor* getUnknownAttributeBinaryReader(const std::string& attributeName) const;
     681             : 
     682             : private:
     683             : 
     684             :         /**
     685             :          * Create a CalHolographyTable.
     686             :          * <p>
     687             :          * This constructor is private because only the
     688             :          * container can create tables.  All tables must know the container
     689             :          * to which they belong.
     690             :          * @param container The container to which this table belongs.
     691             :          */ 
     692             :         CalHolographyTable (ASDM & container);
     693             : 
     694             :         ASDM & container;
     695             :         
     696             :         bool archiveAsBin; // If true archive binary else archive XML
     697             :         bool fileAsBin ; // If true file binary else file XML   
     698             :         
     699             :         std::string version ; 
     700             :         
     701             :         Entity entity;
     702             :         
     703             : 
     704             :         
     705             :         
     706             : 
     707             : 
     708             :         /**
     709             :          * If this table has an autoincrementable attribute then check if *x verifies the rule of uniqueness and throw exception if not.
     710             :          * Check if *x verifies the key uniqueness rule and throw an exception if not.
     711             :          * Append x to its table.
     712             :          * @throws DuplicateKey
     713             :          
     714             :          */
     715             :         CalHolographyRow* checkAndAdd(CalHolographyRow* x, bool skipCheckUniqueness=false) ;
     716             :         
     717             :         /**
     718             :          * Brutally append an CalHolographyRow x to the collection of rows already stored in this table. No uniqueness check is done !
     719             :          *
     720             :          * @param CalHolographyRow* x a pointer onto the CalHolographyRow to be appended.
     721             :          */
     722             :          void append(CalHolographyRow* x) ;
     723             :          
     724             :         /**
     725             :          * Brutally append an CalHolographyRow x to the collection of rows already stored in this table. No uniqueness check is done !
     726             :          *
     727             :          * @param CalHolographyRow* x a pointer onto the CalHolographyRow to be appended.
     728             :          */
     729             :          void addWithoutCheckingUnique(CalHolographyRow* x) ;
     730             :          
     731             :          
     732             : 
     733             : 
     734             : 
     735             : // A data structure to store the pointers on the table's rows.
     736             : 
     737             : // In all cases we maintain a private vector of CalHolographyRow s.
     738             :    std::vector<CalHolographyRow * > privateRows;
     739             :    
     740             : 
     741             :                         
     742             :         std::vector<CalHolographyRow *> row;
     743             : 
     744             :         
     745             :         void error() ; //throw(ConversionException);
     746             : 
     747             :         
     748             :         /**
     749             :          * Populate this table from the content of a XML document that is required to
     750             :          * be conform to the XML schema defined for a CalHolography (CalHolographyTable.xsd).
     751             :          * @throws ConversionException
     752             :          * 
     753             :          */
     754             :         void fromXML(std::string& xmlDoc) ;
     755             :                 
     756             :         std::map<std::string, BinaryAttributeReaderFunctor *> unknownAttributes2Functors;
     757             : 
     758             :         /**
     759             :           * Private methods involved during the build of this table out of the content
     760             :           * of file(s) containing an external representation of a CalHolography table.
     761             :           */
     762             :         void setFromMIMEFile(const std::string& directory);
     763             :         /*
     764             :         void openMIMEFile(const std::string& directory);
     765             :         */
     766             :         void setFromXMLFile(const std::string& directory);
     767             :         
     768             :                  /**
     769             :          * Serialize this into a stream of bytes and encapsulates that stream into a MIME message.
     770             :          * @returns a string containing the MIME message.
     771             :          *
     772             :          * @param byteOrder a const pointer to a static instance of the class ByteOrder.
     773             :          * 
     774             :          */
     775             :         std::string toMIME(const asdm::ByteOrder* byteOrder=asdm::ByteOrder::Machine_Endianity);
     776             :   
     777             :         
     778             :    /** 
     779             :      * Extracts the binary part of a MIME message and deserialize its content
     780             :          * to fill this with the result of the deserialization. 
     781             :          * @param mimeMsg the string containing the MIME message.
     782             :          * @throws ConversionException
     783             :          */
     784             :          void setFromMIME(const std::string & mimeMsg);
     785             :         
     786             :         /**
     787             :           * Private methods involved during the export of this table into disk file(s).
     788             :           */
     789             :         std::string MIMEXMLPart(const asdm::ByteOrder* byteOrder=asdm::ByteOrder::Machine_Endianity);
     790             :         
     791             :         /**
     792             :           * Stores a representation (binary or XML) of this table into a file.
     793             :           *
     794             :           * Depending on the boolean value of its private field fileAsBin a binary serialization  of this (fileAsBin==true)  
     795             :           * will be saved in a file "CalHolography.bin" or an XML representation (fileAsBin==false) will be saved in a file "CalHolography.xml".
     796             :           * The file is always written in a directory whose name is passed as a parameter.
     797             :          * @param directory The name of directory  where the file containing the table's representation will be saved.
     798             :           * 
     799             :           */
     800             :           void toFile(std::string directory);
     801             :           
     802             :           /**
     803             :            * Load the table in memory if necessary.
     804             :            */
     805             :           bool loadInProgress;
     806           0 :           void checkPresenceInMemory() {
     807           0 :                 if (!presentInMemory && !loadInProgress) {
     808           0 :                         loadInProgress = true;
     809           0 :                         setFromFile(getContainer().getDirectory());
     810           0 :                         presentInMemory = true;
     811           0 :                         loadInProgress = false;
     812             :                 }
     813           0 :           }
     814             :         /**
     815             :          * Reads and parses a file containing a representation of a CalHolographyTable as those produced  by the toFile method.
     816             :          * This table is populated with the result of the parsing.
     817             :          * @param directory The name of the directory containing the file te be read and parsed.
     818             :          * @throws ConversionException If any error occurs while reading the 
     819             :          * files in the directory or parsing them.
     820             :          *
     821             :          */
     822             :          void setFromFile(const std::string& directory);    
     823             :  
     824             : };
     825             : 
     826             : } // End namespace asdm
     827             : 
     828             : #endif /* CalHolographyTable_CLASS */

Generated by: LCOV version 1.16