Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members

# log4cplus::helpers Namespace Reference

## Compounds
class | AbstractSocket
class | AppenderAttachableImpl
| This Interface is for attaching Appenders to objects. More...
class | LogLog
| This class used to output log statements from within the log4cplus package. More...
class | LogLogUser
| This class used to simplify the use of the LogLog class. More...
class | NullPointerException
class | Properties
class | safe_auto_ptr
class | ServerSocket
| This class implements server sockets. More...
class | SharedObject
class | SharedObjectPtr
class | Socket
| This class implements client sockets (also called just "sockets"). More...
class | SocketBuffer
class | string_append_iterator
| This iterator can be used in place of the back_insert_iterator for compilers that don't have a std::basic_string class that has the `push_back` method. More...
class | Time
| This class represents a Epoch time with microsecond accuracy. More...
## Typedefs
typedef int | SOCKET_TYPE
## Enumerations
enum | SocketState { ok, not_opened, bad_address, connection_failed, broken_pipe, invalid_access_mode, message_truncated }
## Functions
void | throwNullPointerException (const char *file, int line)
LOG4CPLUS_EXPORT void | sleep (unsigned long secs, unsigned long nanosecs=0)
LOG4CPLUS_EXPORT void | sleepmillis (unsigned long millis)
LOG4CPLUS_EXPORT SOCKET_TYPE | openSocket (unsigned short port, SocketState &state)
LOG4CPLUS_EXPORT SOCKET_TYPE | connectSocket (const log4cplus::tstring &hostn, unsigned short port, SocketState &state)
LOG4CPLUS_EXPORT SOCKET_TYPE | acceptSocket (SOCKET_TYPE sock, SocketState &state)
LOG4CPLUS_EXPORT int | closeSocket (SOCKET_TYPE sock)
LOG4CPLUS_EXPORT size_t | read (SOCKET_TYPE sock, SocketBuffer &buffer)
LOG4CPLUS_EXPORT size_t | write (SOCKET_TYPE sock, const SocketBuffer &buffer)
LOG4CPLUS_EXPORT log4cplus::tstring | toUpper (const log4cplus::tstring &s)
| Returns `s` in upper case.
LOG4CPLUS_EXPORT log4cplus::tstring | toLower (const log4cplus::tstring &s)
| Returns `s` in lower case.
template<class _StringType, class _OutputIter> void | tokenize (const _StringType &s, typename _StringType::value_type c, _OutputIter _result, bool collapseTokens=true)
| Tokenize `s` using `c` as the delimiter and put the resulting tokens in `_result`.
template<class intType> tstring | convertIntegerToString (intType value)
LOG4CPLUS_EXPORT SocketBuffer | convertToBuffer (const log4cplus::spi::InternalLoggingEvent &event, const log4cplus::tstring &serverName)
LOG4CPLUS_EXPORT log4cplus::spi::InternalLoggingEvent | readFromBuffer (SocketBuffer &buffer)

## Typedef Documentation

typedef int log4cplus::helpers::SOCKET_TYPE

| Definition at line 39 of file socket.h.

## Enumeration Type Documentation

enum log4cplus::helpers::SocketState

  | Enumeration values:
  ok |
  not_opened |
  bad_address |
  connection_failed |
  broken_pipe |
  invalid_access_mode |
  message_truncated |
Definition at line 29 of file socket.h.

## Function Documentation

LOG4CPLUS_EXPORT SOCKET_TYPE acceptSocket | ( | SOCKET_TYPE | sock,
|  | SocketState & | state
| ) |

LOG4CPLUS_EXPORT int closeSocket | ( | SOCKET_TYPE | sock | ) |

LOG4CPLUS_EXPORT SOCKET_TYPE connectSocket | ( | const log4cplus::tstring & | hostn,
|  | unsigned short | port,
|  | SocketState & | state
| ) |

template<class intType>
tstring convertIntegerToString | ( | intType | value | ) | `[inline]`

| Definition at line 75 of file stringhelper.h. References LOG4CPLUS_C_STR_TO_TSTRING, LOG4CPLUS_TEXT, and log4cplus::tstring.

LOG4CPLUS_EXPORT SocketBuffer convertToBuffer | ( | const log4cplus::spi::InternalLoggingEvent & | event,
|  | const log4cplus::tstring & | serverName
| ) |

LOG4CPLUS_EXPORT SOCKET_TYPE openSocket | ( | unsigned short | port,
|  | SocketState & | state
| ) |

LOG4CPLUS_EXPORT size_t read | ( | SOCKET_TYPE | sock,
|  | SocketBuffer & | buffer
| ) |

LOG4CPLUS_EXPORT log4cplus::spi::InternalLoggingEvent readFromBuffer | ( | SocketBuffer & | buffer | ) |

LOG4CPLUS_EXPORT void sleep | ( | unsigned long | secs,
|  | unsigned long | nanosecs = 0
| ) |

LOG4CPLUS_EXPORT void sleepmillis | ( | unsigned long | millis | ) |

void throwNullPointerException | ( | const char * | file,
|  | int | line
| ) |

| Referenced by log4cplus::helpers::safe_auto_ptr< T >::validate().

template<class _StringType, class _OutputIter>
void tokenize | ( | const _StringType & | s,
|  | typename _StringType::value_type | c,
|  | _OutputIter | _result,
|  | bool | collapseTokens = true
| ) |

| Tokenize `s` using `c` as the delimiter and put the resulting tokens in `_result`. If `collapseTokens` is false, multiple adjacent delimiters will result in zero length tokens. Example:
       string s = // Set string with '.' as delimiters
       list<log4cplus::tstring> tokens;
       tokenize(s, '.', back_insert_iterator<list<string> >(tokens));
Definition at line 54 of file stringhelper.h.

LOG4CPLUS_EXPORT log4cplus::tstring toLower | ( | const log4cplus::tstring & | s | ) |

| Returns `s` in lower case.

LOG4CPLUS_EXPORT log4cplus::tstring toUpper | ( | const log4cplus::tstring & | s | ) |

| Returns `s` in upper case.

LOG4CPLUS_EXPORT size_t write | ( | SOCKET_TYPE | sock,
|  | const SocketBuffer & | buffer
| ) |