plll  1.0
plll::arithmetic::StringContext Class Reference

An "arithmetic" context for conversions to std::strings. More...

#include <arithmetic.hpp>

Inheritance diagram for plll::arithmetic::StringContext:
plll::arithmetic::HexStringContext plll::arithmetic::OctalStringContext

Public Types

enum  
 The properties of strings.
 
typedef std::string Type
 The type.
 

Public Member Functions

unsigned base () const
 Queries the base of this context. More...
 
 StringContext ()
 Creates a string context for base 10 (decimal).
 
 StringContext (unsigned base)
 Creates a string context for an arbitrary base. More...
 

Detailed Description

An "arithmetic" context for conversions to std::strings.

Note that most integer types only support bases 8, 10 and 16, and most floating point types only base 10. The exception is plll::arithmetic::Integer, which should support at least bases 2, 3, 4, ..., up to 36. The digits used should be '0' up to '9' followed by 'a' up to 'z' (lower case!).

Definition at line 1130 of file arithmetic.hpp.

Constructor & Destructor Documentation

plll::arithmetic::StringContext::StringContext ( unsigned  base)
inline

Creates a string context for an arbitrary base.

Parameters
baseThe base. Must be at least 2.

Definition at line 1167 of file arithmetic.hpp.

Member Function Documentation

unsigned plll::arithmetic::StringContext::base ( ) const
inline

Queries the base of this context.

Returns
The base.

Definition at line 1178 of file arithmetic.hpp.


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