0.9.8.10
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Member Functions | Protected Member Functions | Private Types | Private Attributes | List of all members
Hypertable::NumericFormatter< T > Class Template Reference

#include <String.h>

Inheritance diagram for Hypertable::NumericFormatter< T >:
Inheritance graph
[legend]
Collaboration diagram for Hypertable::NumericFormatter< T >:
Collaboration graph
[legend]

Public Member Functions

size_t size () const
 Returns the number of characters written to the output buffer. More...
 
const char * data () const
 Returns a pointer to the output buffer content. More...
 
const char * c_str () const
 Returns a pointer to the output buffer content with terminating null character appended. More...
 
std::string str () const
 Returns the content of the output buffer as an std::string. More...
 
char * append_to (char *p) const
 Appends the converted number to the buffer specified, returns the forwarded pointer. More...
 

Protected Member Functions

 NumericFormatter ()
 
void format_unsigned (T value)
 
void format_signed (T value)
 

Private Types

enum  { BUFFER_SIZE = std::numeric_limits<T>::digits10 + 3 }
 

Private Attributes

char buf [BUFFER_SIZE]
 
char * s
 

Additional Inherited Members

- Static Protected Attributes inherited from Hypertable::NumericFormatterDigits
static const char DIGITS []
 

Detailed Description

template<class T>
class Hypertable::NumericFormatter< T >

Definition at line 150 of file String.h.

Constructor & Destructor Documentation

template<class T >
Hypertable::NumericFormatter< T >::NumericFormatter ( )
inlineprotected

Definition at line 187 of file String.h.

Member Function Documentation

template<class T >
char* Hypertable::NumericFormatter< T >::append_to ( char *  p) const
inline

Appends the converted number to the buffer specified, returns the forwarded pointer.

Definition at line 180 of file String.h.

template<class T >
const char* Hypertable::NumericFormatter< T >::c_str ( ) const
inline

Returns a pointer to the output buffer content with terminating null character appended.

Definition at line 168 of file String.h.

template<class T >
const char* Hypertable::NumericFormatter< T >::data ( ) const
inline

Returns a pointer to the output buffer content.

No terminating null character is appended.

Definition at line 162 of file String.h.

template<class T >
void Hypertable::NumericFormatter< T >::format_signed ( value)
inlineprotected

Definition at line 210 of file String.h.

template<class T >
void Hypertable::NumericFormatter< T >::format_unsigned ( value)
inlineprotected

Definition at line 190 of file String.h.

template<class T >
size_t Hypertable::NumericFormatter< T >::size ( ) const
inline

Returns the number of characters written to the output buffer.

Definition at line 156 of file String.h.

template<class T >
std::string Hypertable::NumericFormatter< T >::str ( ) const
inline

Returns the content of the output buffer as an std::string.

Definition at line 175 of file String.h.

Member Data Documentation

template<class T >
char Hypertable::NumericFormatter< T >::buf[BUFFER_SIZE]
private

Definition at line 221 of file String.h.

template<class T >
char* Hypertable::NumericFormatter< T >::s
private

Definition at line 222 of file String.h.


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