The Sparta Modeling Framework
Loading...
Searching...
No Matches
LexicalCast.hpp File Reference

String-to-value helpers and string formatting helpers. More...

#include <cstdlib>
#include <iostream>
#include <math.h>
#include <typeinfo>
#include <bitset>
#include <string>
#include "sparta/utils/SpartaException.hpp"
#include "sparta/utils/SpartaAssert.hpp"
#include "sparta/utils/MetaStructs.hpp"
#include <yaml-cpp/node/node.h>
#include <yaml-cpp/node/convert.h>

Go to the source code of this file.

Classes

struct  sparta::bit_reference_to_bool< T >
 Helper type for converting _Bit_reference types into bool types for the purpose of determining how to lexically cast a string into that type. More...
 
struct  sparta::bit_reference_to_bool< typename std::_Bit_reference >
 

Namespaces

namespace  sparta
 Macros for handling exponential backoff.
 

Functions

template<class T >
sparta::lexicalCast (const std::string &str, uint32_t base=10)
 
template<class T >
MetaStruct::enable_if_t< MetaStruct::is_stl< T >::value and std::is_same< typename T::value_type, bool >::value, T > sparta::lexicalCast (const std::string &str, uint32_t base=10)=delete
 
template<>
std::string sparta::lexicalCast (const std::string &str, uint32_t base)
 
template<>
bool sparta::lexicalCast (const std::string &str, uint32_t base)
 
template<>
uint64_t sparta::lexicalCast (const std::string &str, uint32_t base)
 
template<>
int64_t sparta::lexicalCast (const std::string &str, uint32_t base)
 
template<>
uint32_t sparta::lexicalCast (const std::string &str, uint32_t base)
 
template<>
int32_t sparta::lexicalCast (const std::string &str, uint32_t base)
 
uint32_t sparta::numDecDigits (uint32_t val)
 Gets number of decimal digits in a uint32_t.
 

Detailed Description

String-to-value helpers and string formatting helpers.

Definition in file LexicalCast.hpp.