1 /** @warning This code is automatically generated.
2  *
3  *  DO NOT EDIT THIS CODE BY HAND.
4  *
5  *  Refer to the documenation in the toolkit_docs gitlab project.
6  */
7 
8 //==============================================================================
9 //
10 //  This file is part of GPSTk, the GPS Toolkit.
11 //
12 //  The GPSTk is free software; you can redistribute it and/or modify
13 //  it under the terms of the GNU Lesser General Public License as published
14 //  by the Free Software Foundation; either version 3.0 of the License, or
15 //  any later version.
16 //
17 //  The GPSTk is distributed in the hope that it will be useful,
18 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
19 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
20 //  GNU Lesser General Public License for more details.
21 //
22 //  You should have received a copy of the GNU Lesser General Public
23 //  License along with GPSTk; if not, write to the Free Software Foundation,
24 //  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
25 //
26 //  This software was developed by Applied Research Laboratories at the
27 //  University of Texas at Austin.
28 //  Copyright 2004-2020, The Board of Regents of The University of Texas System
29 //
30 //==============================================================================
31 
32 //==============================================================================
33 //
34 //  This software was developed by Applied Research Laboratories at the
35 //  University of Texas at Austin, under contract to an agency or agencies
36 //  within the U.S. Department of Defense. The U.S. Government retains all
37 //  rights to use, duplicate, distribute, disclose, or release this software.
38 //
39 //  Pursuant to DoD Directive 523024
40 //
41 //  DISTRIBUTION STATEMENT A: This software has been approved for public
42 //                            release, distribution is unlimited.
43 //
44 //==============================================================================
45 
46 #ifndef GPSTK_NAVTYPE_HPP
47 #define GPSTK_NAVTYPE_HPP
48 
49 #include <string>
50 #include "EnumIterator.hpp"
51 
52 namespace gpstk
53 {
54       /// @ingroup GNSSEph
55       //@{
56 
57       /// Supported navigation types
58    enum class NavType
59    {
60       GPSLNAV,
61       GPSCNAVL2,
62       GPSCNAVL5,
63       GPSCNAV2,
64       GPSMNAV,
65       BeiDou_D1,
66       BeiDou_D2,
67       GloCivilF,
68       GloCivilC,
69       GalFNAV,
70       GalINAV,
71       IRNSS_SPS,
72       Unknown,   ///< Uninitialized value
73       Last,      ///< Used to verify that all items are described at compile time
74    }; // enum class NavType
75 
76       /** Define an iterator so C++11 can do things like
77        * for (NavType i : NavTypeIterator()) */
78    typedef EnumIterator<NavType, NavType::Unknown, NavType::Last> NavTypeIterator;
79 
80    namespace StringUtils
81    {
82          /// Convert a NavType to a whitespace-free string name.
83       std::string asString(NavType e) throw();
84          /// Convert a string name to an NavType
85       NavType asNavType(const std::string& s) throw();
86    }
87       /** Translate nav type enumeration to its string representation.
88        * @note The string representation is being used in file
89        *   formats, e.g. RawNavCSVHeader.  The string values should
90        *   not be changed if at all possible, as that would break
91        *   the ability to read older files.
92        * @note Any new nav codes should not contain spaces in the
93        *   string values.
94        * @param[in] s The nav type to get the string name of.
95        * @return A space-free string containing the name of the nav code.
96        */
convertNavTypeToString(NavType e)97    inline std::string convertNavTypeToString(NavType e)
98    { return StringUtils::asString(e); }
99 
100       /** Translate nav type names as strings into enumeration
101        * equivalents.
102        * @see convertNavTypeToString
103        * @param[in] s The nav type name to convert to enumeration.
104        * @return An enumeration equivalent of the given string.
105        *   Unknown is returned for any names that do not
106        *   exactly match known values.
107        */
convertStringToNavType(const std::string & s)108    inline NavType convertStringToNavType(const std::string& s)
109    { return StringUtils::asNavType(s); }
110 
111 } // namespace gpstk
112 
113 #endif // GPSTK_NAVTYPE_HPP
114