/* * ALMA - Atacama Large Millimeter Array * (c) European Southern Observatory, 2002 * (c) Associated Universities Inc., 2002 * Copyright by ESO (in the framework of the ALMA collaboration), * Copyright by AUI (in the framework of the ALMA collaboration), * All rights reserved. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY, without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * MA 02111-1307 USA * * Warning! * -------------------------------------------------------------------- * | This is generated code! Do not modify this file. | * | If you do, all changes will be lost when the file is re-generated. | * -------------------------------------------------------------------- * * File FocusModelRow.h */ #ifndef FocusModelRow_CLASS #define FocusModelRow_CLASS #include #include #include #ifndef WITHOUT_ACS #include #endif #include #include #include #include #include #include #include //#include /*\file FocusModel.h \brief Generated from model's revision "-1", branch "" */ namespace asdm { //class asdm::FocusModelTable; // class asdm::AntennaRow; class AntennaRow; // class asdm::FocusModelRow; class FocusModelRow; class FocusModelRow; typedef void (FocusModelRow::*FocusModelAttributeFromBin) (EndianIStream& eis); typedef void (FocusModelRow::*FocusModelAttributeFromText) (const std::string& s); /** * The FocusModelRow class is a row of a FocusModelTable. * * Generated from model's revision "-1", branch "" * */ class FocusModelRow { friend class asdm::FocusModelTable; friend class asdm::RowTransformer; //friend class asdm::TableStreamReader; public: virtual ~FocusModelRow(); /** * Return the table to which this row belongs. */ FocusModelTable &getTable() const; /** * Has this row been added to its table ? * @return true if and only if it has been added. */ bool isAdded() const; //////////////////////////////// // Intrinsic Table Attributes // //////////////////////////////// // ===> Attribute focusModelId /** * Get focusModelId. * @return focusModelId as int */ int getFocusModelId() const; // ===> Attribute polarizationType /** * Get polarizationType. * @return polarizationType as PolarizationTypeMod::PolarizationType */ PolarizationTypeMod::PolarizationType getPolarizationType() const; /** * Set polarizationType with the specified PolarizationTypeMod::PolarizationType. * @param polarizationType The PolarizationTypeMod::PolarizationType value to which polarizationType is to be set. */ void setPolarizationType (PolarizationTypeMod::PolarizationType polarizationType); // ===> Attribute receiverBand /** * Get receiverBand. * @return receiverBand as ReceiverBandMod::ReceiverBand */ ReceiverBandMod::ReceiverBand getReceiverBand() const; /** * Set receiverBand with the specified ReceiverBandMod::ReceiverBand. * @param receiverBand The ReceiverBandMod::ReceiverBand value to which receiverBand is to be set. */ void setReceiverBand (ReceiverBandMod::ReceiverBand receiverBand); // ===> Attribute numCoeff /** * Get numCoeff. * @return numCoeff as int */ int getNumCoeff() const; /** * Set numCoeff with the specified int. * @param numCoeff The int value to which numCoeff is to be set. */ void setNumCoeff (int numCoeff); // ===> Attribute coeffName /** * Get coeffName. * @return coeffName as std::vector */ std::vector getCoeffName() const; /** * Set coeffName with the specified std::vector. * @param coeffName The std::vector value to which coeffName is to be set. */ void setCoeffName (std::vector coeffName); // ===> Attribute coeffFormula /** * Get coeffFormula. * @return coeffFormula as std::vector */ std::vector getCoeffFormula() const; /** * Set coeffFormula with the specified std::vector. * @param coeffFormula The std::vector value to which coeffFormula is to be set. */ void setCoeffFormula (std::vector coeffFormula); // ===> Attribute coeffVal /** * Get coeffVal. * @return coeffVal as std::vector */ std::vector getCoeffVal() const; /** * Set coeffVal with the specified std::vector. * @param coeffVal The std::vector value to which coeffVal is to be set. */ void setCoeffVal (std::vector coeffVal); // ===> Attribute assocNature /** * Get assocNature. * @return assocNature as std::string */ std::string getAssocNature() const; /** * Set assocNature with the specified std::string. * @param assocNature The std::string value to which assocNature is to be set. */ void setAssocNature (std::string assocNature); //////////////////////////////// // Extrinsic Table Attributes // //////////////////////////////// // ===> Attribute antennaId /** * Get antennaId. * @return antennaId as Tag */ Tag getAntennaId() const; /** * Set antennaId with the specified Tag. * @param antennaId The Tag value to which antennaId is to be set. * @throw IllegalAccessException If an attempt is made to change this field after is has been added to the table. */ void setAntennaId (Tag antennaId); // ===> Attribute assocFocusModelId /** * Get assocFocusModelId. * @return assocFocusModelId as int */ int getAssocFocusModelId() const; /** * Set assocFocusModelId with the specified int. * @param assocFocusModelId The int value to which assocFocusModelId is to be set. */ void setAssocFocusModelId (int assocFocusModelId); /////////// // Links // /////////// /** * antennaId pointer to the row in the Antenna table having Antenna.antennaId == antennaId * @return a AntennaRow* * */ AntennaRow* getAntennaUsingAntennaId(); // ===> Slice link from a row of FocusModel table to a collection of row of FocusModel table. /** * Get the collection of row in the FocusModel table having focusModelId == this.focusModelId * * @return a vector of FocusModelRow * */ std::vector getFocusModels(); /** * Compare each mandatory attribute except the autoincrementable one of this FocusModelRow with * the corresponding parameters and return true if there is a match and false otherwise. * @param antennaId * @param polarizationType * @param receiverBand * @param numCoeff * @param coeffName * @param coeffFormula * @param coeffVal * @param assocNature * @param assocFocusModelId */ bool compareNoAutoInc(Tag antennaId, PolarizationTypeMod::PolarizationType polarizationType, ReceiverBandMod::ReceiverBand receiverBand, int numCoeff, std::vector coeffName, std::vector coeffFormula, std::vector coeffVal, std::string assocNature, int assocFocusModelId); /** * Compare each mandatory value (i.e. not in the key) attribute with * the corresponding parameters and return true if there is a match and false otherwise. * @param polarizationType * @param receiverBand * @param numCoeff * @param coeffName * @param coeffFormula * @param coeffVal * @param assocNature * @param assocFocusModelId */ bool compareRequiredValue(PolarizationTypeMod::PolarizationType polarizationType, ReceiverBandMod::ReceiverBand receiverBand, int numCoeff, std::vector coeffName, std::vector coeffFormula, std::vector coeffVal, std::string assocNature, int assocFocusModelId); /** * Return true if all required attributes of the value part are equal to their homologues * in x and false otherwise. * * @param x a pointer on the FocusModelRow whose required attributes of the value part * will be compared with those of this. * @return a boolean. */ bool equalByRequiredValue(FocusModelRow* x) ; #ifndef WITHOUT_ACS /** * Return this row in the form of an IDL struct. * @return The values of this row as a FocusModelRowIDL struct. */ asdmIDL::FocusModelRowIDL *toIDL() const; /** * Define the content of a FocusModelRowIDL struct from the values * found in this row. * * @param x a reference to the FocusModelRowIDL struct to be set. * */ void toIDL(asdmIDL::FocusModelRowIDL& x) const; #endif #ifndef WITHOUT_ACS /** * Fill the values of this row from the IDL struct FocusModelRowIDL. * @param x The IDL struct containing the values used to fill this row. * @throws ConversionException */ void setFromIDL (asdmIDL::FocusModelRowIDL x) ; #endif /** * Return this row in the form of an XML string. * @return The values of this row as an XML string. */ std::string toXML() const; /** * Fill the values of this row from an XML string * that was produced by the toXML() method. * @param rowDoc the XML string being used to set the values of this row. * @throws ConversionException */ void setFromXML (std::string rowDoc) ; /// @cond DISPLAY_PRIVATE //////////////////////////////////////////////////////////// // binary-deserialization material from an EndianIStream // //////////////////////////////////////////////////////////// std::map fromBinMethods; void antennaIdFromBin( EndianIStream& eis); void focusModelIdFromBin( EndianIStream& eis); void polarizationTypeFromBin( EndianIStream& eis); void receiverBandFromBin( EndianIStream& eis); void numCoeffFromBin( EndianIStream& eis); void coeffNameFromBin( EndianIStream& eis); void coeffFormulaFromBin( EndianIStream& eis); void coeffValFromBin( EndianIStream& eis); void assocNatureFromBin( EndianIStream& eis); void assocFocusModelIdFromBin( EndianIStream& eis); /** * Deserialize a stream of bytes read from an EndianIStream to build a PointingRow. * @param eiss the EndianIStream to be read. * @param table the FocusModelTable to which the row built by deserialization will be parented. * @param attributesSeq a vector containing the names of the attributes . The elements order defines the order * in which the attributes are written in the binary serialization. */ static FocusModelRow* fromBin(EndianIStream& eis, FocusModelTable& table, const std::vector& attributesSeq); /** * Parses a string t and assign the result of the parsing to the attribute of name attributeName. * * @param attributeName the name of the attribute whose value is going to be defined. * @param t the string to be parsed into a value given to the attribute of name attributeName. */ void fromText(const std::string& attributeName, const std::string& t); /// @endcond private: /** * The table to which this row belongs. */ FocusModelTable &table; /** * Whether this row has been added to the table or not. */ bool hasBeenAdded; // This method is used by the Table class when this row is added to the table. void isAdded(bool added); /** * Create a FocusModelRow. *

* This constructor is private because only the * table can create rows. All rows know the table * to which they belong. * @param table The table to which this row belongs. */ FocusModelRow (FocusModelTable &table); /** * Create a FocusModelRow using a copy constructor mechanism. *

* Given a FocusModelRow row and a FocusModelTable table, the method creates a new * FocusModelRow owned by table. Each attribute of the created row is a copy (deep) * of the corresponding attribute of row. The method does not add the created * row to its table, its simply parents it to table, a call to the add method * has to be done in order to get the row added (very likely after having modified * some of its attributes). * If row is null then the method returns a row with default values for its attributes. * * This constructor is private because only the * table can create rows. All rows know the table * to which they belong. * @param table The table to which this row belongs. * @param row The row which is to be copied. */ FocusModelRow (FocusModelTable &table, FocusModelRow *row); //////////////////////////////// // Intrinsic Table Attributes // //////////////////////////////// // ===> Attribute focusModelId int focusModelId; /** * Set focusModelId with the specified int value. * @param focusModelId The int value to which focusModelId is to be set. * @throw IllegalAccessException If an attempt is made to change this field after is has been added to the table. */ void setFocusModelId (int focusModelId); // ===> Attribute polarizationType PolarizationTypeMod::PolarizationType polarizationType; // ===> Attribute receiverBand ReceiverBandMod::ReceiverBand receiverBand; // ===> Attribute numCoeff int numCoeff; // ===> Attribute coeffName std::vector coeffName; // ===> Attribute coeffFormula std::vector coeffFormula; // ===> Attribute coeffVal std::vector coeffVal; // ===> Attribute assocNature std::string assocNature; //////////////////////////////// // Extrinsic Table Attributes // //////////////////////////////// // ===> Attribute antennaId Tag antennaId; // ===> Attribute assocFocusModelId int assocFocusModelId; /////////// // Links // /////////// /* //////////////////////////////////////////////////////////// // binary-deserialization material from an EndianIStream // //////////////////////////////////////////////////////////// std::map fromBinMethods; void antennaIdFromBin( EndianIStream& eis); void focusModelIdFromBin( EndianIStream& eis); void polarizationTypeFromBin( EndianIStream& eis); void receiverBandFromBin( EndianIStream& eis); void numCoeffFromBin( EndianIStream& eis); void coeffNameFromBin( EndianIStream& eis); void coeffFormulaFromBin( EndianIStream& eis); void coeffValFromBin( EndianIStream& eis); void assocNatureFromBin( EndianIStream& eis); void assocFocusModelIdFromBin( EndianIStream& eis); */ /////////////////////////////////// // text-deserialization material // /////////////////////////////////// std::map fromTextMethods; void antennaIdFromText (const std::string & s); void focusModelIdFromText (const std::string & s); void polarizationTypeFromText (const std::string & s); void receiverBandFromText (const std::string & s); void numCoeffFromText (const std::string & s); void coeffNameFromText (const std::string & s); void coeffFormulaFromText (const std::string & s); void coeffValFromText (const std::string & s); void assocNatureFromText (const std::string & s); void assocFocusModelIdFromText (const std::string & s); /** * Serialize this into a stream of bytes written to an EndianOSStream. * @param eoss the EndianOSStream to be written to */ void toBin(EndianOSStream& eoss); /** * Deserialize a stream of bytes read from an EndianIStream to build a PointingRow. * @param eiss the EndianIStream to be read. * @param table the FocusModelTable to which the row built by deserialization will be parented. * @param attributesSeq a vector containing the names of the attributes . The elements order defines the order * in which the attributes are written in the binary serialization. static FocusModelRow* fromBin(EndianIStream& eis, FocusModelTable& table, const std::vector& attributesSeq); */ }; } // End namespace asdm #endif /* FocusModel_CLASS */