Base library classes (Files&Directories/Networking/Threading/Exception handling/...). More...
Classes | |
class | AutoPtr |
Pointer that deletes the owned object when going out of scope. More... | |
class | ByteStream |
Stream of bytes from one thread to another. More... | |
struct | CharTraits |
character traits More... | |
struct | CharTraits< void > |
character traits for data type char More... | |
struct | CharTraits< char > |
character traits for data type char More... | |
struct | CharTraits< wchar_t > |
character traits for data type wchar_t More... | |
class | CommandLine |
For parsing command line options, equivalent to UNIX getopt() function. More... | |
class | Condition |
A condition variable. More... | |
class | Config |
Configuration class. More... | |
class | ConfigException |
Configuration exception. More... | |
class | CPU |
Test for CPU features. More... | |
class | Daemon |
Generic Daemon class. More... | |
class | DateTime |
A class that holds a date and time. More... | |
class | Dir |
Directory functions (create, delete, read). More... | |
class | DNS |
DNS resolver library. More... | |
class | DynamicArray |
A dynamic array especially for simple types and pointers. More... | |
class | DynamicLibrary |
Working with dynamic libraries, mostly resolving symbols. More... | |
class | Environment |
Getting and setting environment variables. More... | |
class | Exception |
Base exception. More... | |
class | FileBase |
Base File I/O (open, close, read, write chown, chmod, unlink ...). More... | |
class | FileT |
Template File functions. More... | |
class | Global |
Global definitions. More... | |
struct | IntTraits |
integer traits More... | |
struct | IntTraits< char > |
integer traits for data type char More... | |
struct | IntTraits< unsigned char > |
integer traits for data type unsigned char More... | |
struct | IntTraits< short > |
integer traits for data type short More... | |
struct | IntTraits< unsigned short > |
integer traits for data type unsigned short More... | |
struct | IntTraits< int > |
integer traits for data type int More... | |
struct | IntTraits< unsigned int > |
integer traits for data type unsigned int More... | |
struct | IntTraits< long > |
integer traits for data type long More... | |
struct | IntTraits< unsigned long > |
integer traits for data type unsigned long More... | |
struct | IntTraits< longlong_t > |
integer traits for data type longlong_t More... | |
struct | IntTraits< u_longlong_t > |
integer traits for data type u_longlong_t More... | |
class | IOException |
Input/Output exception. More... | |
class | Log |
Log class. More... | |
class | MD5 |
Contains methods for MD5-hashing from given input data. More... | |
class | MemFile |
A data store that keeps data in memory up to a certain limit, and switches to a temporary file if the limit is exceeded. More... | |
class | MemoryMappedFile |
Memory-mapping files. More... | |
class | MIME |
MIME encoding and decoding functions. More... | |
class | MTSocketDaemon |
Multi-threaded socket daemon class. More... | |
class | Mutex |
A mutex variable. More... | |
class | Pipe |
Anonymous pipe for inter-process communication. More... | |
class | Process |
Creating processes and executing programs. More... | |
class | Profiling |
A profiling class that lets you save execution count and times for several tasks. More... | |
class | Random |
A class that generates random numbers. More... | |
class | Regex |
Regular expressions. More... | |
class | SharedLock |
Shared lock, allows multiple readers but only one writer at a time. More... | |
class | SharedMemory |
A class for operation on a (one) shared memory segment. More... | |
class | Signal |
Global signal handling. More... | |
struct | SizeTraits |
size traits More... | |
struct | SizeTraits< size_t > |
size traits for datatype size_t More... | |
struct | SizeTraits< u_longlong_t > |
size traits for datatype unsigned long long More... | |
class | Socket |
A socket class for TCP/IP sockets. More... | |
class | StatBase |
Provides information about a directory entry. More... | |
class | StatT |
stat template for files (up to 4 GB) and large files (larger than 4 GB) More... | |
class | STEventDaemon |
Single-threaded event driven daemon class. More... | |
class | StringT |
A thread-safe string class. More... | |
class | SynchronizedSharedMemory |
A class for synchronized operation on a (one) shared memory segment. More... | |
class | Thread |
A thread class. More... | |
class | ThreadList |
A list of threads. More... | |
class | Timer |
A timer class that can be used to get high resolution time values and measure execution times. More... | |
class | Unicode |
Unicode conversion functions. More... | |
class | URI |
URI helper functions. More... | |
class | UTF8String |
helper functions for utf8-encoded strings More... | |
class | WildcardT |
File name matching by wildcard. More... | |
class | WorkerThread |
Worker thread for multi-threaded socket daemons. More... | |
class | WorkPile |
An FIFO workpile queue. More... | |
class | XML |
XML helper functions. More... | |
Typedefs | |
typedef FileT< size_t > | File |
file up to 4 GB | |
typedef FileT< u_longlong_t > | LFile |
file that can be larger than 4 GB | |
typedef long long | longlong_t |
data type for 64 bit signed integers | |
typedef unsigned long long | u_longlong_t |
data type for 64 bit unsigned integers | |
typedef StatT< size_t > | Stat |
stat for files up to 4 GB | |
typedef StatT< u_longlong_t > | LStat |
stat for files that can be larger than 4 GB | |
typedef StringT< char > | String |
char string | |
typedef StringT< wchar_t > | WString |
wchar_t string | |
typedef WildcardT< char > | Wildcard |
char wildcard | |
typedef WildcardT< wchar_t > | WWildcard |
wchar_t wildcard | |
Functions | |
PPBASE_EXPORT std::ostream & | operator<< (std::ostream &out, const Exception &ex) |
Writes an exception to an output stream. | |
template<class charT , class traits , class T > | |
StringT< charT, traits > | operator+ (const StringT< charT, traits > &s, T t) |
concatenation operator | |
template<class streamT , class charT , class traits > | |
streamT & | operator<< (streamT &out, const StringT< charT, traits > &s) |
stream input operator | |
template<class streamT , class charT , class traits > | |
streamT & | operator>> (streamT &in, StringT< charT, traits > &s) |
stream output operator | |
template<class charT , class intT > | |
size_t | uinttostr (intT i, charT *str, size_t size, unsigned char nbase=10, charT ca=CharTraits< charT >::chA) |
Convert an unsigned integer type to string. | |
template<class charT , class intT > | |
StringT< charT > | uinttostr (intT i, unsigned char nbase=10, charT ca=CharTraits< charT >::chA) |
convert an unsigned integer type to string | |
template<class charT , class intT > | |
size_t | inttostr (intT i, charT *str, size_t size, unsigned char nbase=10, charT ca=CharTraits< charT >::chA) |
Convert a signed integer type to string. | |
template<class charT , class intT > | |
StringT< charT > | inttostr (intT i, unsigned char nbase=10, charT ca=CharTraits< charT >::chA) |
convert a signed integer type to string | |
template<class charT , class intT > | |
bool | strtoint (const charT *str, intT *rint, int nbase=0, const charT **rpos=NULL) |
convert string to integer type | |
template<class charT , class intT > | |
bool | strtoint (const StringT< charT > &str, intT *rint, int nbase=0, const charT **rpos=NULL) |
convert string to integer type |
Base library classes (Files&Directories/Networking/Threading/Exception handling/...).
size_t base::inttostr | ( | intT | i, | |
charT * | str, | |||
size_t | size, | |||
unsigned char | nbase = 10 , |
|||
charT | ca = CharTraits<charT>::chA | |||
) |
Convert a signed integer type to string.
References uinttostr().
Referenced by inttostr().
PPBASE_EXPORT std::ostream& base::operator<< | ( | std::ostream & | out, | |
const Exception & | ex | |||
) |
Writes an exception to an output stream.
out | the output stream | |
ex | the exception |
size_t base::uinttostr | ( | intT | i, | |
charT * | str, | |||
size_t | size, | |||
unsigned char | nbase = 10 , |
|||
charT | ca = CharTraits<charT>::chA | |||
) |
Convert an unsigned integer type to string.
This function tries to add a terminating null character (if the size allows). If this function returns size, the buffer was too small. In this chase a null character has not been added and the resulting number is invalid.
i | the unsigned integer type to convert | |
str | string to write to | |
size | capacity of string in characters | |
nbase | numeric base (2 to 36: 2=binary, 8=octal, 10=decimal, 16=hexadecimal, ...) | |
ca | alphabetic start character for digit values greater than 9 |
Referenced by inttostr(), and uinttostr().