ad_map_access
Namespaces | Macros | Enumerations | Functions
RoadUserType.hpp File Reference
#include <iostream>
#include <memory>
#include <string>
Include dependency graph for RoadUserType.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 ad
 namespace ad
 
 ad::map
 namespace map
 
 ad::map::restriction
 namespace restriction
 

Macros

#define GEN_GUARD_AD_MAP_RESTRICTION_ROADUSERTYPE
 protect the definition of functions from duplicates by typedef usage within other data types
 

Enumerations

enum  ad::map::restriction::RoadUserType : int32_t {
  ad::map::restriction::RoadUserType::INVALID = 0, ad::map::restriction::RoadUserType::UNKNOWN = 1, ad::map::restriction::RoadUserType::CAR = 2, ad::map::restriction::RoadUserType::BUS = 3,
  ad::map::restriction::RoadUserType::TRUCK = 4, ad::map::restriction::RoadUserType::PEDESTRIAN = 5, ad::map::restriction::RoadUserType::MOTORBIKE = 6, ad::map::restriction::RoadUserType::BICYCLE = 7,
  ad::map::restriction::RoadUserType::CAR_ELECTRIC = 8, ad::map::restriction::RoadUserType::CAR_HYBRID = 9, ad::map::restriction::RoadUserType::CAR_PETROL = 10, ad::map::restriction::RoadUserType::CAR_DIESEL = 11
}
 DataType RoadUserType. More...
 

Functions

std::string toString (::ad::map::restriction::RoadUserType const e)
 Conversion of ad::map::restriction::RoadUserType to std::string helper.
 
template<typename EnumType >
EnumType fromString (std::string const &str)
 Conversion from std::string to enum type T helper. More...
 
template<>
::ad::map::restriction::RoadUserType fromString (std::string const &str)
 Conversion from std::string to enum type T helper. More...
 
std::ostream & ad::map::restriction::operator<< (std::ostream &os, RoadUserType const &value)
 standard ostream operator More...
 
std::string std::to_string (::ad::map::restriction::RoadUserType const &value)
 overload of the std::to_string for RoadUserType
 

Detailed Description

Generated file

Generator Version : 11.0.0-1997

Function Documentation

◆ fromString() [1/2]

template<typename EnumType >
EnumType fromString ( std::string const &  str)

Conversion from std::string to enum type T helper.

Parameters
[in]str- a fully qualified string name of enum class type
Returns
T enum value
Exceptions
std::out_of_rangeexception if the given string does not match any enum type

Example usage:

auto value = fromString<SomeEnumType>("SomeEnumType::eValue");
assert(value == SomeEnumType::eValue);
// Or:
auto value = fromString<SomeEnumType>("eValue");
assert(value == SomeEnumType::eValue);

◆ fromString() [2/2]

template<>
::ad::map::restriction::RoadUserType fromString ( std::string const &  str)

Conversion from std::string to enum type T helper.

Parameters
[in]str- a fully qualified string name of enum class type
Returns
T enum value
Exceptions
std::out_of_rangeexception if the given string does not match any enum type

Example usage:

auto value = fromString<SomeEnumType>("SomeEnumType::eValue");
assert(value == SomeEnumType::eValue);
// Or:
auto value = fromString<SomeEnumType>("eValue");
assert(value == SomeEnumType::eValue);