Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

internal.h File Reference


Detailed Description

Internal declarations.

#include <iostream>
#include <iomanip>
#include <string>
#include <sstream>
#include <cstdio>
#include <typeinfo>
#include <map>
#include <vector>
#include <cxxabi.h>

Go to the source code of this file.

Defines

#define NMSTL_NAMESPACE_BEGIN   namespace std {}; namespace NMSTL { using namespace ::std;
#define NMSTL_NAMESPACE_END   };
#define NMSTL_ARITH_OPS(T, m)
#define NMSTL_ARITH_OPS_T1(T, U, m)
#define NMSTL_TO_STRING_INTL(T)
#define NMSTL_TO_STRING(T)   NMSTL_TO_STRING_INTL(T) using ::NMSTL::to_string; using ::NMSTL::operator +;
#define NMSTL_TO_STRING_APPEND(A)   inline string operator + (const string& t, const A& u) { return t + to_string(u); }
#define NMSTL_TO_STRING_APPEND_T1(A)   template<typename T> inline string operator + (const string& t, const A& u) { return t + to_string(u); }
#define NMSTL_TO_STRING_APPEND_T2(A, B)   template<typename T, typename U> inline string operator + (const string& t, const A,B& u) { return t + to_string(u); }
#define NMSTL_TO_STRING_STREAM(A)
#define NMSTL_TO_STRING_STREAM_T1(A)
#define NMSTL_TO_STRING_STREAM_T2(A, B)
#define NMSTL_SCALAR_TO_STRING(T)   inline string to_string(const T& t) { ostringstream o; o << t; return o.str(); } NMSTL_TO_STRING_APPEND(T)

Functions

template<class T> string to_string (const T *t)
string to_string (const char *ch)
string to_string (const string &s)
string to_string (const void *t)
 NMSTL_TO_STRING_APPEND (void *)
string to_string (const bool &i)
 NMSTL_TO_STRING_APPEND (bool)
template<typename T, typename U> string to_string (const map< T, U > &m)
 NMSTL_TO_STRING_STREAM_T2 (map< T, U >)
template<typename T> string to_string (const vector< T > &m)
 NMSTL_TO_STRING_STREAM_T2 (vector< T, U >)
string to_string (const type_info &i)
 NMSTL_SCALAR_TO_STRING (char)
 NMSTL_SCALAR_TO_STRING (unsigned char)
 NMSTL_SCALAR_TO_STRING (short)
 NMSTL_SCALAR_TO_STRING (int)
 NMSTL_SCALAR_TO_STRING (long)
string to_string (const float &t)
 NMSTL_TO_STRING_APPEND (float)
string to_string (const double &t)
 NMSTL_TO_STRING_APPEND (double)
string to_human_readable (const void *data, int length)
string to_human_readable (const string &s)
string to_hex_string (const void *data, int length)
string to_hex_string (const string &s)
template<typename Int> string to_hex_string (Int l)
string to_escaped_string (const void *data, int length)
string to_escaped_string (const string &s)

Variables

 NMSTL_NAMESPACE_BEGIN
 NMSTL_NAMESPACE_END


Define Documentation

#define NMSTL_ARITH_OPS T,
 
 

Value:

bool operator == (const T& x) const { return m == x.m; } \
bool operator != (const T& x) const { return m != x.m; } \
bool operator < (const T& x) const { return m < x.m; } \
bool operator > (const T& x) const { return m > x.m; } \
bool operator <= (const T& x) const { return m <= x.m; } \
bool operator >= (const T& x) const { return m >= x.m; }

#define NMSTL_ARITH_OPS_T1 T,
U,
 
 

Value:

template<typename T> bool operator == (const U& x) const { return m == x.m; } \
template<typename T> bool operator != (const U& x) const { return m != x.m; } \
template<typename T> bool operator < (const U& x) const { return m < x.m; } \
template<typename T> bool operator > (const U& x) const { return m > x.m; } \
template<typename T> bool operator <= (const U& x) const { return m <= x.m; } \
template<typename T> bool operator >= (const U& x) const { return m >= x.m; }

#define NMSTL_NAMESPACE_BEGIN   namespace std {}; namespace NMSTL { using namespace ::std;
 

#define NMSTL_NAMESPACE_END   };
 

#define NMSTL_SCALAR_TO_STRING      inline string to_string(const T& t) { ostringstream o; o << t; return o.str(); } NMSTL_TO_STRING_APPEND(T)
 

#define NMSTL_TO_STRING      NMSTL_TO_STRING_INTL(T) using ::NMSTL::to_string; using ::NMSTL::operator +;
 

#define NMSTL_TO_STRING_APPEND      inline string operator + (const string& t, const A& u) { return t + to_string(u); }
 

#define NMSTL_TO_STRING_APPEND_T1      template<typename T> inline string operator + (const string& t, const A& u) { return t + to_string(u); }
 

#define NMSTL_TO_STRING_APPEND_T2 A,
     template<typename T, typename U> inline string operator + (const string& t, const A,B& u) { return t + to_string(u); }
 

#define NMSTL_TO_STRING_INTL  
 

Value:

inline string to_string(const T& t) { return t.as_string(); } \
    inline ostream& operator << (ostream& out, const T& t) { return out << t.as_string(); } \
    inline string operator + (const char * in, const T& t) { return string(in) + to_string(t); } \
    inline string operator + (const string& in, const T& t) { return in + to_string(t); } \
    inline string& operator += (string& in, const T& t) { return in += to_string(t); }

#define NMSTL_TO_STRING_STREAM  
 

Value:

NMSTL_TO_STRING_APPEND(A) \
inline ostream& operator << (ostream& out, const A& u) { return out << to_string(u); }

#define NMSTL_TO_STRING_STREAM_T1  
 

Value:

NMSTL_TO_STRING_APPEND_T1(A) \
template<typename T> inline ostream& operator << (ostream& out, const A& u) { return out << to_string(u); }

#define NMSTL_TO_STRING_STREAM_T2 A,
 
 

Value:

NMSTL_TO_STRING_APPEND_T2(A,B) \
template<typename T, typename U> inline ostream& operator << (ostream& out, const A,B& u) { return out << to_string(u); }


Function Documentation

NMSTL_SCALAR_TO_STRING long   
 

NMSTL_SCALAR_TO_STRING int   
 

NMSTL_SCALAR_TO_STRING short   
 

NMSTL_SCALAR_TO_STRING unsigned    char
 

NMSTL_SCALAR_TO_STRING char   
 

NMSTL_TO_STRING_APPEND double   
 

NMSTL_TO_STRING_APPEND float   
 

NMSTL_TO_STRING_APPEND bool   
 

NMSTL_TO_STRING_APPEND void *   
 

NMSTL_TO_STRING_STREAM_T2 vector< T, U >   
 

NMSTL_TO_STRING_STREAM_T2 map< T, U >   
 

string to_escaped_string const string &    s
 

string to_escaped_string const void *    data,
int    length
 

template<typename Int>
string to_hex_string Int    l
 

string to_hex_string const string &    s
 

string to_hex_string const void *    data,
int    length
 

string to_human_readable const string &    s
 

string to_human_readable const void *    data,
int    length
 

string to_string const double &    t
 

string to_string const float &    t
 

string to_string const type_info &    i
 

template<typename T>
string to_string const vector< T > &    m
 

template<typename T, typename U>
string to_string const map< T, U > &    m
 

string to_string const bool &    i
 

string to_string const void *    t
 

string to_string const string &    s
 

string to_string const char *    ch
 

template<class T>
string to_string const T *    t
 


Variable Documentation

NMSTL_NAMESPACE_BEGIN
 

NMSTL_NAMESPACE_END
 


Generated on Fri Dec 20 13:35:11 2002 for NMSTL