LCOV - code coverage report
Current view: top level - alma/Enumerations - CDirectionReferenceCode.cc (source / functions) Hit Total Coverage
Test: ctest_coverage.info Lines: 70 261 26.8 %
Date: 2023-11-06 10:06:49 Functions: 4 12 33.3 %

          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             :  * /////////////////////////////////////////////////////////////////
      26             :  * // WARNING!  DO NOT MODIFY THIS FILE!                          //
      27             :  * //  ---------------------------------------------------------  //
      28             :  * // | This is generated code!  Do not modify this file.       | //
      29             :  * // | Any changes will be lost when the file is re-generated. | //
      30             :  * //  ---------------------------------------------------------  //
      31             :  * /////////////////////////////////////////////////////////////////
      32             :  *
      33             :  * File CDirectionReferenceCode.cpp
      34             :  */
      35             : #include <sstream>
      36             : #include <alma/Enumerations/CDirectionReferenceCode.h>
      37             : #include <string>
      38             : using namespace std;
      39             : 
      40           0 : int CDirectionReferenceCode::version() {
      41           0 :         return DirectionReferenceCodeMod::version;
      42             :         }
      43             :         
      44           0 : string CDirectionReferenceCode::revision () {
      45           0 :         return DirectionReferenceCodeMod::revision;
      46             : }
      47             : 
      48           0 : unsigned int CDirectionReferenceCode::size() {
      49           0 :         return 32;
      50             :         }
      51             :         
      52             :         
      53             : const std::string& CDirectionReferenceCode::sJ2000 = "J2000";
      54             :         
      55             : const std::string& CDirectionReferenceCode::sJMEAN = "JMEAN";
      56             :         
      57             : const std::string& CDirectionReferenceCode::sJTRUE = "JTRUE";
      58             :         
      59             : const std::string& CDirectionReferenceCode::sAPP = "APP";
      60             :         
      61             : const std::string& CDirectionReferenceCode::sB1950 = "B1950";
      62             :         
      63             : const std::string& CDirectionReferenceCode::sB1950_VLA = "B1950_VLA";
      64             :         
      65             : const std::string& CDirectionReferenceCode::sBMEAN = "BMEAN";
      66             :         
      67             : const std::string& CDirectionReferenceCode::sBTRUE = "BTRUE";
      68             :         
      69             : const std::string& CDirectionReferenceCode::sGALACTIC = "GALACTIC";
      70             :         
      71             : const std::string& CDirectionReferenceCode::sHADEC = "HADEC";
      72             :         
      73             : const std::string& CDirectionReferenceCode::sAZELSW = "AZELSW";
      74             :         
      75             : const std::string& CDirectionReferenceCode::sAZELSWGEO = "AZELSWGEO";
      76             :         
      77             : const std::string& CDirectionReferenceCode::sAZELNE = "AZELNE";
      78             :         
      79             : const std::string& CDirectionReferenceCode::sAZELNEGEO = "AZELNEGEO";
      80             :         
      81             : const std::string& CDirectionReferenceCode::sJNAT = "JNAT";
      82             :         
      83             : const std::string& CDirectionReferenceCode::sECLIPTIC = "ECLIPTIC";
      84             :         
      85             : const std::string& CDirectionReferenceCode::sMECLIPTIC = "MECLIPTIC";
      86             :         
      87             : const std::string& CDirectionReferenceCode::sTECLIPTIC = "TECLIPTIC";
      88             :         
      89             : const std::string& CDirectionReferenceCode::sSUPERGAL = "SUPERGAL";
      90             :         
      91             : const std::string& CDirectionReferenceCode::sITRF = "ITRF";
      92             :         
      93             : const std::string& CDirectionReferenceCode::sTOPO = "TOPO";
      94             :         
      95             : const std::string& CDirectionReferenceCode::sICRS = "ICRS";
      96             :         
      97             : const std::string& CDirectionReferenceCode::sMERCURY = "MERCURY";
      98             :         
      99             : const std::string& CDirectionReferenceCode::sVENUS = "VENUS";
     100             :         
     101             : const std::string& CDirectionReferenceCode::sMARS = "MARS";
     102             :         
     103             : const std::string& CDirectionReferenceCode::sJUPITER = "JUPITER";
     104             :         
     105             : const std::string& CDirectionReferenceCode::sSATURN = "SATURN";
     106             :         
     107             : const std::string& CDirectionReferenceCode::sURANUS = "URANUS";
     108             :         
     109             : const std::string& CDirectionReferenceCode::sNEPTUNE = "NEPTUNE";
     110             :         
     111             : const std::string& CDirectionReferenceCode::sPLUTO = "PLUTO";
     112             :         
     113             : const std::string& CDirectionReferenceCode::sSUN = "SUN";
     114             :         
     115             : const std::string& CDirectionReferenceCode::sMOON = "MOON";
     116             :         
     117       90805 : const std::vector<std::string> CDirectionReferenceCode::names() {
     118       90805 :     std::vector<std::string> enumSet;
     119             :     
     120       90805 :     enumSet.insert(enumSet.end(), CDirectionReferenceCode::sJ2000);
     121             :     
     122       90805 :     enumSet.insert(enumSet.end(), CDirectionReferenceCode::sJMEAN);
     123             :     
     124       90805 :     enumSet.insert(enumSet.end(), CDirectionReferenceCode::sJTRUE);
     125             :     
     126       90805 :     enumSet.insert(enumSet.end(), CDirectionReferenceCode::sAPP);
     127             :     
     128       90805 :     enumSet.insert(enumSet.end(), CDirectionReferenceCode::sB1950);
     129             :     
     130       90805 :     enumSet.insert(enumSet.end(), CDirectionReferenceCode::sB1950_VLA);
     131             :     
     132       90805 :     enumSet.insert(enumSet.end(), CDirectionReferenceCode::sBMEAN);
     133             :     
     134       90805 :     enumSet.insert(enumSet.end(), CDirectionReferenceCode::sBTRUE);
     135             :     
     136       90805 :     enumSet.insert(enumSet.end(), CDirectionReferenceCode::sGALACTIC);
     137             :     
     138       90805 :     enumSet.insert(enumSet.end(), CDirectionReferenceCode::sHADEC);
     139             :     
     140       90805 :     enumSet.insert(enumSet.end(), CDirectionReferenceCode::sAZELSW);
     141             :     
     142       90805 :     enumSet.insert(enumSet.end(), CDirectionReferenceCode::sAZELSWGEO);
     143             :     
     144       90805 :     enumSet.insert(enumSet.end(), CDirectionReferenceCode::sAZELNE);
     145             :     
     146       90805 :     enumSet.insert(enumSet.end(), CDirectionReferenceCode::sAZELNEGEO);
     147             :     
     148       90805 :     enumSet.insert(enumSet.end(), CDirectionReferenceCode::sJNAT);
     149             :     
     150       90805 :     enumSet.insert(enumSet.end(), CDirectionReferenceCode::sECLIPTIC);
     151             :     
     152       90805 :     enumSet.insert(enumSet.end(), CDirectionReferenceCode::sMECLIPTIC);
     153             :     
     154       90805 :     enumSet.insert(enumSet.end(), CDirectionReferenceCode::sTECLIPTIC);
     155             :     
     156       90805 :     enumSet.insert(enumSet.end(), CDirectionReferenceCode::sSUPERGAL);
     157             :     
     158       90805 :     enumSet.insert(enumSet.end(), CDirectionReferenceCode::sITRF);
     159             :     
     160       90805 :     enumSet.insert(enumSet.end(), CDirectionReferenceCode::sTOPO);
     161             :     
     162       90805 :     enumSet.insert(enumSet.end(), CDirectionReferenceCode::sICRS);
     163             :     
     164       90805 :     enumSet.insert(enumSet.end(), CDirectionReferenceCode::sMERCURY);
     165             :     
     166       90805 :     enumSet.insert(enumSet.end(), CDirectionReferenceCode::sVENUS);
     167             :     
     168       90805 :     enumSet.insert(enumSet.end(), CDirectionReferenceCode::sMARS);
     169             :     
     170       90805 :     enumSet.insert(enumSet.end(), CDirectionReferenceCode::sJUPITER);
     171             :     
     172       90805 :     enumSet.insert(enumSet.end(), CDirectionReferenceCode::sSATURN);
     173             :     
     174       90805 :     enumSet.insert(enumSet.end(), CDirectionReferenceCode::sURANUS);
     175             :     
     176       90805 :     enumSet.insert(enumSet.end(), CDirectionReferenceCode::sNEPTUNE);
     177             :     
     178       90805 :     enumSet.insert(enumSet.end(), CDirectionReferenceCode::sPLUTO);
     179             :     
     180       90805 :     enumSet.insert(enumSet.end(), CDirectionReferenceCode::sSUN);
     181             :     
     182       90805 :     enumSet.insert(enumSet.end(), CDirectionReferenceCode::sMOON);
     183             :         
     184       90805 :     return enumSet;
     185             : }
     186             : 
     187        9192 : std::string CDirectionReferenceCode::name(const DirectionReferenceCodeMod::DirectionReferenceCode& f) {
     188        9192 :     switch (f) {
     189             :     
     190        8352 :     case DirectionReferenceCodeMod::J2000:
     191        8352 :       return CDirectionReferenceCode::sJ2000;
     192             :     
     193           0 :     case DirectionReferenceCodeMod::JMEAN:
     194           0 :       return CDirectionReferenceCode::sJMEAN;
     195             :     
     196           0 :     case DirectionReferenceCodeMod::JTRUE:
     197           0 :       return CDirectionReferenceCode::sJTRUE;
     198             :     
     199           0 :     case DirectionReferenceCodeMod::APP:
     200           0 :       return CDirectionReferenceCode::sAPP;
     201             :     
     202           0 :     case DirectionReferenceCodeMod::B1950:
     203           0 :       return CDirectionReferenceCode::sB1950;
     204             :     
     205           0 :     case DirectionReferenceCodeMod::B1950_VLA:
     206           0 :       return CDirectionReferenceCode::sB1950_VLA;
     207             :     
     208           0 :     case DirectionReferenceCodeMod::BMEAN:
     209           0 :       return CDirectionReferenceCode::sBMEAN;
     210             :     
     211           0 :     case DirectionReferenceCodeMod::BTRUE:
     212           0 :       return CDirectionReferenceCode::sBTRUE;
     213             :     
     214           0 :     case DirectionReferenceCodeMod::GALACTIC:
     215           0 :       return CDirectionReferenceCode::sGALACTIC;
     216             :     
     217           0 :     case DirectionReferenceCodeMod::HADEC:
     218           0 :       return CDirectionReferenceCode::sHADEC;
     219             :     
     220           0 :     case DirectionReferenceCodeMod::AZELSW:
     221           0 :       return CDirectionReferenceCode::sAZELSW;
     222             :     
     223           0 :     case DirectionReferenceCodeMod::AZELSWGEO:
     224           0 :       return CDirectionReferenceCode::sAZELSWGEO;
     225             :     
     226           0 :     case DirectionReferenceCodeMod::AZELNE:
     227           0 :       return CDirectionReferenceCode::sAZELNE;
     228             :     
     229           0 :     case DirectionReferenceCodeMod::AZELNEGEO:
     230           0 :       return CDirectionReferenceCode::sAZELNEGEO;
     231             :     
     232           0 :     case DirectionReferenceCodeMod::JNAT:
     233           0 :       return CDirectionReferenceCode::sJNAT;
     234             :     
     235           0 :     case DirectionReferenceCodeMod::ECLIPTIC:
     236           0 :       return CDirectionReferenceCode::sECLIPTIC;
     237             :     
     238           0 :     case DirectionReferenceCodeMod::MECLIPTIC:
     239           0 :       return CDirectionReferenceCode::sMECLIPTIC;
     240             :     
     241           0 :     case DirectionReferenceCodeMod::TECLIPTIC:
     242           0 :       return CDirectionReferenceCode::sTECLIPTIC;
     243             :     
     244           0 :     case DirectionReferenceCodeMod::SUPERGAL:
     245           0 :       return CDirectionReferenceCode::sSUPERGAL;
     246             :     
     247           0 :     case DirectionReferenceCodeMod::ITRF:
     248           0 :       return CDirectionReferenceCode::sITRF;
     249             :     
     250           0 :     case DirectionReferenceCodeMod::TOPO:
     251           0 :       return CDirectionReferenceCode::sTOPO;
     252             :     
     253         840 :     case DirectionReferenceCodeMod::ICRS:
     254         840 :       return CDirectionReferenceCode::sICRS;
     255             :     
     256           0 :     case DirectionReferenceCodeMod::MERCURY:
     257           0 :       return CDirectionReferenceCode::sMERCURY;
     258             :     
     259           0 :     case DirectionReferenceCodeMod::VENUS:
     260           0 :       return CDirectionReferenceCode::sVENUS;
     261             :     
     262           0 :     case DirectionReferenceCodeMod::MARS:
     263           0 :       return CDirectionReferenceCode::sMARS;
     264             :     
     265           0 :     case DirectionReferenceCodeMod::JUPITER:
     266           0 :       return CDirectionReferenceCode::sJUPITER;
     267             :     
     268           0 :     case DirectionReferenceCodeMod::SATURN:
     269           0 :       return CDirectionReferenceCode::sSATURN;
     270             :     
     271           0 :     case DirectionReferenceCodeMod::URANUS:
     272           0 :       return CDirectionReferenceCode::sURANUS;
     273             :     
     274           0 :     case DirectionReferenceCodeMod::NEPTUNE:
     275           0 :       return CDirectionReferenceCode::sNEPTUNE;
     276             :     
     277           0 :     case DirectionReferenceCodeMod::PLUTO:
     278           0 :       return CDirectionReferenceCode::sPLUTO;
     279             :     
     280           0 :     case DirectionReferenceCodeMod::SUN:
     281           0 :       return CDirectionReferenceCode::sSUN;
     282             :     
     283           0 :     case DirectionReferenceCodeMod::MOON:
     284           0 :       return CDirectionReferenceCode::sMOON;
     285             :         
     286             :     }
     287             :     // Impossible siutation but....who knows with C++ enums
     288           0 :     throw badInt((int) f);
     289             : }
     290             : 
     291       98794 : DirectionReferenceCodeMod::DirectionReferenceCode CDirectionReferenceCode::newDirectionReferenceCode(const std::string& name) {
     292             :                 
     293       98794 :     if (name == CDirectionReferenceCode::sJ2000) {
     294       97954 :         return DirectionReferenceCodeMod::J2000;
     295             :     }
     296             :         
     297         840 :     if (name == CDirectionReferenceCode::sJMEAN) {
     298           0 :         return DirectionReferenceCodeMod::JMEAN;
     299             :     }
     300             :         
     301         840 :     if (name == CDirectionReferenceCode::sJTRUE) {
     302           0 :         return DirectionReferenceCodeMod::JTRUE;
     303             :     }
     304             :         
     305         840 :     if (name == CDirectionReferenceCode::sAPP) {
     306           0 :         return DirectionReferenceCodeMod::APP;
     307             :     }
     308             :         
     309         840 :     if (name == CDirectionReferenceCode::sB1950) {
     310           0 :         return DirectionReferenceCodeMod::B1950;
     311             :     }
     312             :         
     313         840 :     if (name == CDirectionReferenceCode::sB1950_VLA) {
     314           0 :         return DirectionReferenceCodeMod::B1950_VLA;
     315             :     }
     316             :         
     317         840 :     if (name == CDirectionReferenceCode::sBMEAN) {
     318           0 :         return DirectionReferenceCodeMod::BMEAN;
     319             :     }
     320             :         
     321         840 :     if (name == CDirectionReferenceCode::sBTRUE) {
     322           0 :         return DirectionReferenceCodeMod::BTRUE;
     323             :     }
     324             :         
     325         840 :     if (name == CDirectionReferenceCode::sGALACTIC) {
     326           0 :         return DirectionReferenceCodeMod::GALACTIC;
     327             :     }
     328             :         
     329         840 :     if (name == CDirectionReferenceCode::sHADEC) {
     330           0 :         return DirectionReferenceCodeMod::HADEC;
     331             :     }
     332             :         
     333         840 :     if (name == CDirectionReferenceCode::sAZELSW) {
     334           0 :         return DirectionReferenceCodeMod::AZELSW;
     335             :     }
     336             :         
     337         840 :     if (name == CDirectionReferenceCode::sAZELSWGEO) {
     338           0 :         return DirectionReferenceCodeMod::AZELSWGEO;
     339             :     }
     340             :         
     341         840 :     if (name == CDirectionReferenceCode::sAZELNE) {
     342           0 :         return DirectionReferenceCodeMod::AZELNE;
     343             :     }
     344             :         
     345         840 :     if (name == CDirectionReferenceCode::sAZELNEGEO) {
     346           0 :         return DirectionReferenceCodeMod::AZELNEGEO;
     347             :     }
     348             :         
     349         840 :     if (name == CDirectionReferenceCode::sJNAT) {
     350           0 :         return DirectionReferenceCodeMod::JNAT;
     351             :     }
     352             :         
     353         840 :     if (name == CDirectionReferenceCode::sECLIPTIC) {
     354           0 :         return DirectionReferenceCodeMod::ECLIPTIC;
     355             :     }
     356             :         
     357         840 :     if (name == CDirectionReferenceCode::sMECLIPTIC) {
     358           0 :         return DirectionReferenceCodeMod::MECLIPTIC;
     359             :     }
     360             :         
     361         840 :     if (name == CDirectionReferenceCode::sTECLIPTIC) {
     362           0 :         return DirectionReferenceCodeMod::TECLIPTIC;
     363             :     }
     364             :         
     365         840 :     if (name == CDirectionReferenceCode::sSUPERGAL) {
     366           0 :         return DirectionReferenceCodeMod::SUPERGAL;
     367             :     }
     368             :         
     369         840 :     if (name == CDirectionReferenceCode::sITRF) {
     370           0 :         return DirectionReferenceCodeMod::ITRF;
     371             :     }
     372             :         
     373         840 :     if (name == CDirectionReferenceCode::sTOPO) {
     374           0 :         return DirectionReferenceCodeMod::TOPO;
     375             :     }
     376             :         
     377         840 :     if (name == CDirectionReferenceCode::sICRS) {
     378         840 :         return DirectionReferenceCodeMod::ICRS;
     379             :     }
     380             :         
     381           0 :     if (name == CDirectionReferenceCode::sMERCURY) {
     382           0 :         return DirectionReferenceCodeMod::MERCURY;
     383             :     }
     384             :         
     385           0 :     if (name == CDirectionReferenceCode::sVENUS) {
     386           0 :         return DirectionReferenceCodeMod::VENUS;
     387             :     }
     388             :         
     389           0 :     if (name == CDirectionReferenceCode::sMARS) {
     390           0 :         return DirectionReferenceCodeMod::MARS;
     391             :     }
     392             :         
     393           0 :     if (name == CDirectionReferenceCode::sJUPITER) {
     394           0 :         return DirectionReferenceCodeMod::JUPITER;
     395             :     }
     396             :         
     397           0 :     if (name == CDirectionReferenceCode::sSATURN) {
     398           0 :         return DirectionReferenceCodeMod::SATURN;
     399             :     }
     400             :         
     401           0 :     if (name == CDirectionReferenceCode::sURANUS) {
     402           0 :         return DirectionReferenceCodeMod::URANUS;
     403             :     }
     404             :         
     405           0 :     if (name == CDirectionReferenceCode::sNEPTUNE) {
     406           0 :         return DirectionReferenceCodeMod::NEPTUNE;
     407             :     }
     408             :         
     409           0 :     if (name == CDirectionReferenceCode::sPLUTO) {
     410           0 :         return DirectionReferenceCodeMod::PLUTO;
     411             :     }
     412             :         
     413           0 :     if (name == CDirectionReferenceCode::sSUN) {
     414           0 :         return DirectionReferenceCodeMod::SUN;
     415             :     }
     416             :         
     417           0 :     if (name == CDirectionReferenceCode::sMOON) {
     418           0 :         return DirectionReferenceCodeMod::MOON;
     419             :     }
     420             :     
     421           0 :     throw badString(name);
     422             : }
     423             : 
     424           0 : DirectionReferenceCodeMod::DirectionReferenceCode CDirectionReferenceCode::literal(const std::string& name) {
     425             :                 
     426           0 :     if (name == CDirectionReferenceCode::sJ2000) {
     427           0 :         return DirectionReferenceCodeMod::J2000;
     428             :     }
     429             :         
     430           0 :     if (name == CDirectionReferenceCode::sJMEAN) {
     431           0 :         return DirectionReferenceCodeMod::JMEAN;
     432             :     }
     433             :         
     434           0 :     if (name == CDirectionReferenceCode::sJTRUE) {
     435           0 :         return DirectionReferenceCodeMod::JTRUE;
     436             :     }
     437             :         
     438           0 :     if (name == CDirectionReferenceCode::sAPP) {
     439           0 :         return DirectionReferenceCodeMod::APP;
     440             :     }
     441             :         
     442           0 :     if (name == CDirectionReferenceCode::sB1950) {
     443           0 :         return DirectionReferenceCodeMod::B1950;
     444             :     }
     445             :         
     446           0 :     if (name == CDirectionReferenceCode::sB1950_VLA) {
     447           0 :         return DirectionReferenceCodeMod::B1950_VLA;
     448             :     }
     449             :         
     450           0 :     if (name == CDirectionReferenceCode::sBMEAN) {
     451           0 :         return DirectionReferenceCodeMod::BMEAN;
     452             :     }
     453             :         
     454           0 :     if (name == CDirectionReferenceCode::sBTRUE) {
     455           0 :         return DirectionReferenceCodeMod::BTRUE;
     456             :     }
     457             :         
     458           0 :     if (name == CDirectionReferenceCode::sGALACTIC) {
     459           0 :         return DirectionReferenceCodeMod::GALACTIC;
     460             :     }
     461             :         
     462           0 :     if (name == CDirectionReferenceCode::sHADEC) {
     463           0 :         return DirectionReferenceCodeMod::HADEC;
     464             :     }
     465             :         
     466           0 :     if (name == CDirectionReferenceCode::sAZELSW) {
     467           0 :         return DirectionReferenceCodeMod::AZELSW;
     468             :     }
     469             :         
     470           0 :     if (name == CDirectionReferenceCode::sAZELSWGEO) {
     471           0 :         return DirectionReferenceCodeMod::AZELSWGEO;
     472             :     }
     473             :         
     474           0 :     if (name == CDirectionReferenceCode::sAZELNE) {
     475           0 :         return DirectionReferenceCodeMod::AZELNE;
     476             :     }
     477             :         
     478           0 :     if (name == CDirectionReferenceCode::sAZELNEGEO) {
     479           0 :         return DirectionReferenceCodeMod::AZELNEGEO;
     480             :     }
     481             :         
     482           0 :     if (name == CDirectionReferenceCode::sJNAT) {
     483           0 :         return DirectionReferenceCodeMod::JNAT;
     484             :     }
     485             :         
     486           0 :     if (name == CDirectionReferenceCode::sECLIPTIC) {
     487           0 :         return DirectionReferenceCodeMod::ECLIPTIC;
     488             :     }
     489             :         
     490           0 :     if (name == CDirectionReferenceCode::sMECLIPTIC) {
     491           0 :         return DirectionReferenceCodeMod::MECLIPTIC;
     492             :     }
     493             :         
     494           0 :     if (name == CDirectionReferenceCode::sTECLIPTIC) {
     495           0 :         return DirectionReferenceCodeMod::TECLIPTIC;
     496             :     }
     497             :         
     498           0 :     if (name == CDirectionReferenceCode::sSUPERGAL) {
     499           0 :         return DirectionReferenceCodeMod::SUPERGAL;
     500             :     }
     501             :         
     502           0 :     if (name == CDirectionReferenceCode::sITRF) {
     503           0 :         return DirectionReferenceCodeMod::ITRF;
     504             :     }
     505             :         
     506           0 :     if (name == CDirectionReferenceCode::sTOPO) {
     507           0 :         return DirectionReferenceCodeMod::TOPO;
     508             :     }
     509             :         
     510           0 :     if (name == CDirectionReferenceCode::sICRS) {
     511           0 :         return DirectionReferenceCodeMod::ICRS;
     512             :     }
     513             :         
     514           0 :     if (name == CDirectionReferenceCode::sMERCURY) {
     515           0 :         return DirectionReferenceCodeMod::MERCURY;
     516             :     }
     517             :         
     518           0 :     if (name == CDirectionReferenceCode::sVENUS) {
     519           0 :         return DirectionReferenceCodeMod::VENUS;
     520             :     }
     521             :         
     522           0 :     if (name == CDirectionReferenceCode::sMARS) {
     523           0 :         return DirectionReferenceCodeMod::MARS;
     524             :     }
     525             :         
     526           0 :     if (name == CDirectionReferenceCode::sJUPITER) {
     527           0 :         return DirectionReferenceCodeMod::JUPITER;
     528             :     }
     529             :         
     530           0 :     if (name == CDirectionReferenceCode::sSATURN) {
     531           0 :         return DirectionReferenceCodeMod::SATURN;
     532             :     }
     533             :         
     534           0 :     if (name == CDirectionReferenceCode::sURANUS) {
     535           0 :         return DirectionReferenceCodeMod::URANUS;
     536             :     }
     537             :         
     538           0 :     if (name == CDirectionReferenceCode::sNEPTUNE) {
     539           0 :         return DirectionReferenceCodeMod::NEPTUNE;
     540             :     }
     541             :         
     542           0 :     if (name == CDirectionReferenceCode::sPLUTO) {
     543           0 :         return DirectionReferenceCodeMod::PLUTO;
     544             :     }
     545             :         
     546           0 :     if (name == CDirectionReferenceCode::sSUN) {
     547           0 :         return DirectionReferenceCodeMod::SUN;
     548             :     }
     549             :         
     550           0 :     if (name == CDirectionReferenceCode::sMOON) {
     551           0 :         return DirectionReferenceCodeMod::MOON;
     552             :     }
     553             :     
     554           0 :     throw badString(name);
     555             : }
     556             : 
     557       90805 : DirectionReferenceCodeMod::DirectionReferenceCode CDirectionReferenceCode::from_int(unsigned int i) {
     558      181610 :         vector<string> names_ = names();
     559       90805 :         if (i >= names_.size()) throw badInt(i);
     560      181610 :         return newDirectionReferenceCode(names_.at(i));
     561             : }
     562             : 
     563           0 : string CDirectionReferenceCode::badString(const string& name) {
     564           0 :         return "'"+name+"' does not correspond to any literal in the enumeration 'DirectionReferenceCode'.";
     565             : }
     566             : 
     567           0 : string CDirectionReferenceCode::badInt(unsigned int i) {
     568           0 :         ostringstream oss ;
     569           0 :         oss << "'" << i << "' is out of range for the enumeration 'DirectionReferenceCode'.";
     570           0 :         return oss.str();
     571             : }
     572             : 
     573             : namespace DirectionReferenceCodeMod {
     574           0 :         std::ostream & operator << ( std::ostream & out, const DirectionReferenceCode& value) {
     575           0 :                 out << CDirectionReferenceCode::name(value);
     576           0 :                 return out;
     577             :         }
     578             : 
     579           0 :         std::istream & operator >> ( std::istream & in , DirectionReferenceCode& value ) {
     580           0 :                 in.clear();
     581           0 :                 string s ; 
     582           0 :                 in >> s;
     583             :                 try {
     584           0 :                 value = CDirectionReferenceCode::literal(s);
     585             :                 }
     586           0 :                 catch (string & m) {
     587           0 :                 in.setstate(ios::failbit);
     588             :                 }
     589           0 :                 return in;
     590             :         }
     591             : }
     592             : 

Generated by: LCOV version 1.16