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

Converts from std::string_view to an integer. More...

#include <CesiumGltf/MetadataConversions.h>

Static Public Member Functions

static std::optional< TTo > convert (const std::string_view &from)
 Converts the contents of a std::string_view to an integer. This assumes that the entire std::string_view represents the number, not just a part of it.
 
static std::optional< TTo > convert (std::string_view)
 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_view, std::enable_if_t< CesiumGltf::IsMetadataInteger< TTo >::value > >

Converts from std::string_view to an integer.

Definition at line 303 of file MetadataConversions.h.

Member Function Documentation

◆ convert() [1/2]

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

Converts the contents of a std::string_view to an integer. This assumes that the entire std::string_view 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_view to parse from.

Definition at line 316 of file MetadataConversions.h.

◆ convert() [2/2]

static std::optional< TTo > CesiumGltf::MetadataConversions< TTo, std::string_view, std::enable_if_t< CesiumGltf::IsMetadataInteger< TTo >::value > >::convert ( std::string_view )
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: