cesium-native 0.62.0
Loading...
Searching...
No Matches
CesiumGltf::MetadataConversions< TTo, std::string, std::enable_if_t< CesiumGltf::IsMetadataInteger< TTo >::value &&std::is_signed_v< TTo > > > Struct Template Reference

Converts from std::string to a signed integer. More...

#include <CesiumGltf/MetadataConversions.h>

Static Public Member Functions

static std::optional< TTo > convert (const std::string &from)
 Converts the contents of a std::string to a signed integer. This assumes that the entire std::string represents the number, not just a part of it.
 
static std::optional< TTo > convert (std::string)
 Converts between TFrom and TTo where no actual conversion is defined, returning std::nullopt.
 

Detailed Description

template<typename TTo>
struct CesiumGltf::MetadataConversions< TTo, std::string, std::enable_if_t< CesiumGltf::IsMetadataInteger< TTo >::value &&std::is_signed_v< TTo > > >

Converts from std::string to a signed integer.

Definition at line 186 of file MetadataConversions.h.

Member Function Documentation

◆ convert() [1/2]

template<typename TTo>
static std::optional< TTo > CesiumGltf::MetadataConversions< TTo, std::string, std::enable_if_t< CesiumGltf::IsMetadataInteger< TTo >::value &&std::is_signed_v< TTo > > >::convert ( const std::string & from)
inlinestatic

Converts the contents of a std::string to a signed integer. This assumes that the entire std::string represents the number, not just a part of it.

This returns std::nullopt if no number is parsed from the string.

Parameters
fromThe std::string to parse from.

Definition at line 200 of file MetadataConversions.h.

◆ convert() [2/2]

static std::optional< TTo > CesiumGltf::MetadataConversions< TTo, std::string, std::enable_if_t< CesiumGltf::IsMetadataInteger< TTo >::value &&std::is_signed_v< TTo > > >::convert ( std::string )
inlinestatic

Converts between TFrom and TTo where no actual conversion is defined, returning std::nullopt.

Definition at line 26 of file MetadataConversions.h.


The documentation for this struct was generated from the following file: