GEOS  3.8.0dev
Static Public Member Functions | List of all members
ttmath::Misc Class Reference

#include <ttmathmisc.h>

Static Public Member Functions

static void AssignString (std::string &result, const char *str)
 
static void AssignString (std::wstring &result, const char *str)
 
static void AssignString (std::wstring &result, const std::string &str)
 
static void AssignString (std::string &result, const wchar_t *str)
 
static void AssignString (std::string &result, const std::wstring &str)
 
static void AddString (std::string &result, const char *str)
 
static void AddString (std::wstring &result, const char *str)
 
template<class char_type >
static void SkipWhiteCharacters (const char_type *&c)
 
static uint CharToDigit (uint c)
 
static sint CharToDigit (uint c, uint base)
 
static uint DigitToChar (uint digit)
 

Detailed Description

some helpful functions

Member Function Documentation

static void ttmath::Misc::AddString ( std::string &  result,
const char *  str 
)
inlinestatic

result += str

static void ttmath::Misc::AddString ( std::wstring &  result,
const char *  str 
)
inlinestatic

result += str

static void ttmath::Misc::AssignString ( std::string &  result,
const char *  str 
)
inlinestatic
static void ttmath::Misc::AssignString ( std::wstring &  result,
const char *  str 
)
inlinestatic

result = str

static void ttmath::Misc::AssignString ( std::wstring &  result,
const std::string &  str 
)
inlinestatic

result = str

References AssignString().

static void ttmath::Misc::AssignString ( std::string &  result,
const wchar_t *  str 
)
inlinestatic

result = str

static void ttmath::Misc::AssignString ( std::string &  result,
const std::wstring &  str 
)
inlinestatic

result = str

References AssignString().

static uint ttmath::Misc::CharToDigit ( uint  c)
inlinestatic

this static method converts one character into its value

for example:

  • 1 -> 1
  • 8 -> 8
  • A -> 10
  • f -> 15

this method don't check whether c is correct or not

static sint ttmath::Misc::CharToDigit ( uint  c,
uint  base 
)
inlinestatic

this method changes a character 'c' into its value (if there can't be a correct value it returns -1)

for example:

  • c=2, base=10 -> function returns 2
  • c=A, base=10 -> function returns -1
  • c=A, base=16 -> function returns 10
static uint ttmath::Misc::DigitToChar ( uint  digit)
inlinestatic

this method converts a digit into a char digit should be from <0,F> (we don't have to get a base)

for example:

  • 1 -> 1
  • 8 -> 8
  • 10 -> A
  • 15 -> F

Referenced by ttmath::UInt< man >::ToStringBase().


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