cesium-native 0.62.0
Loading...
Searching...
No Matches
CesiumGltf::MetadataConversions< float, std::string_view > Struct Reference

Converts from a std::string_view to a float. More...

#include <CesiumGltf/MetadataConversions.h>

Static Public Member Functions

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

Detailed Description

Converts from a std::string_view to a float.

Definition at line 439 of file MetadataConversions.h.

Member Function Documentation

◆ convert() [1/2]

static std::optional< float > CesiumGltf::MetadataConversions< float, std::string_view >::convert ( const std::string_view & from)
inlinestatic

Converts a std::string_view to a float. 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 448 of file MetadataConversions.h.

◆ convert() [2/2]

static std::optional< float > CesiumGltf::MetadataConversions< float, std::string_view, void >::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: