VPTissue Reference Manual
SimPT_Sim::Util Namespace Reference

Namespace for miscellaneous utilities. More...

Classes

class  Exception
 Extremely simple Exception root class. More...
 
class  FunctionMap
 A map to hold std::functions. More...
 
class  PTreeFile
 Utility interface for dealing with ptree xml or xml.gz files. More...
 
class  PTreeUtils
 A collection of functions for manipulating the structure of ptrees. More...
 
class  RevisionInfo
 Info on revision id and commit date. More...
 
class  Subject
 Subject in Observer pattern. More...
 
class  Subject< E, std::weak_ptr< const void > >
 Partial specialization for weak_ptr<void> key type. More...
 
class  XmlWriterSettings
 Settings for xml output of Property Trees (ptree). More...
 

Functions

template<typename T >
static T FromString (const std::string &s)
 Builds a value of type T representation from a string.
 
constexpr double pi ()
 Math constant pi.
 
void printArgv (int argc, char *argv[], std::ostream &os)
 
template<typename T >
constexpr int signum (T x, std::false_type)
 Overload for unsigned types. More...
 
template<typename T >
constexpr int signum (T x, std::true_type)
 Overload for signed types. More...
 
template<typename T >
constexpr int signum (T x)
 Select particular overload via tag dispatch. More...
 
constexpr double small_real ()
 Small real number.
 
static std::vector< std::string > Tokenize (const std::string &str, const std::string &delimiters)
 Tokenize a string (in order of occurence) by splitting it on the given delimiters.
 
template<typename T >
static std::string ToString (const T &value)
 Builds a string representation of a value of type T.
 
template<typename T >
static std::string ToString (const T &value, int width, char fill= ' ')
 Builds a string representation with minimum width of a value of type T.
 
static std::string ToUpper (const std::string &source)
 Builds a string with upper case characters only.
 
static std::string Trim (const std::string &source, const std::string &t=" ")
 Trim characters at both ends of string.
 
static std::string TrimLeft (std::string const &source, const std::string &t=" ")
 Trim characters at left end of string.
 
static std::string TrimRight (const std::string &source, const std::string &t=" ")
 Trim characters at right end of string.
 
constexpr double two_pi ()
 Math constant 2*pi.
 

Detailed Description

Namespace for miscellaneous utilities.

Function Documentation

template<typename T >
constexpr int SimPT_Sim::Util::signum ( x,
std::false_type   
)
inline

Overload for unsigned types.

Posted on stackoverflow, March 28, 2012, by Joe Wreschnig

Definition at line 32 of file signum.h.

Referenced by signum().

Here is the caller graph for this function:

template<typename T >
constexpr int SimPT_Sim::Util::signum ( x,
std::true_type   
)
inline

Overload for signed types.

Posted on stackoverflow, March 28, 2012, by Joe Wreschnig

Definition at line 42 of file signum.h.

template<typename T >
constexpr int SimPT_Sim::Util::signum ( x)
inline

Select particular overload via tag dispatch.

Posted on stackoverflow, March 28, 2012, by Joe Wreschnig

Definition at line 52 of file signum.h.

References signum().

Here is the call graph for this function: