H Namespace Reference

H namespace. More...


Classes

class  Average
 Class for averaging things out over a number of iterations. More...
class  Debug
 Debug stream class. More...
class  DynamicBuffer
 Implementation of a simple, highly efficient, dynamic buffer. More...
class  DynamicBufferConverter
 Convert a Dynamic buffer to an array of structures or classes. More...
class  Exception
 Generic Exception class. More...
class  DeviceInfo
 Structure to hold information about devices. More...
class  FileWatchee
 Structure to hold information about file watchees. More...
class  FileEventWatcher
 Class to efficiently watch for changes in files. More...
class  DeviceDisconnectException
 Exception that indicates a device has disconnected. More...
class  WatcheeNotFoundException
 Exception that indicates a watchee was not found while iterating. More...
class  SignalHandler
 Main SignalHandler class. More...
class  Socket
 Main Socket class. More...
class  SocketClient
 Main SocketClient class. More...
class  SocketEventWatcher
 Main SocketEventWatcher class. More...
class  SocketException
 Main SocketException class. More...
class  SocketInterface
 Main SocketInterface class. More...
class  SocketServer
 Main SocketServer class. More...
class  stringconverter
 Generic stringconverter class. More...
class  Util
 Main Util class. More...
class  UtilFile
 Main UtilFile class. More...
class  UtilMath
 Main UtilMath class. More...
class  UtilTime
 Main UtilTime class. More...

Enumerations

enum  ExceptionType { EXCEPTION_INFO, EXCEPTION_WARNING, EXCEPTION_NORMAL, EXCEPTION_FATAL }
enum  FileWatchType { WATCH_INVALID = -1, WATCH_IN, WATCH_OUT, WATCH_INOUT }
 Specifies the type of file watching to be done. More...
enum  FileDeviceType { WATCH_POLL, WATCH_INOTIFY }
 Specifies the type of device watching interface (poll / inotify). More...
enum  SocketDomain { SOCKET_INTERNET = PF_INET, SOCKET_UNIX = PF_UNIX, SOCKET_INTERNET2 = PF_INET6 }
 Domain of the socket. More...
enum  SocketType {
  SOCKET_STREAM = SOCK_STREAM, SOCKET_DGRAM = SOCK_DGRAM, SOCKET_RAW = SOCK_RAW, SOCKET_SEQPACKET = SOCK_SEQPACKET,
  SOCKET_RDM = SOCK_RDM
}
 Type of the socket. More...
enum  SocketProtocol { SOCKET_PROTO_TCP = IPPROTO_TCP, SOCKET_PROTO_UDP = IPPROTO_UDP }
 Protocol of the socket. More...

Functions

const Debugoperator<< (const Debug &dbg, const std::string &out)
 Debug insertion operator for string.
const Debugoperator<< (const Debug &dbg, const char *out)
 Debug insertion operator for const char *.
const Debugoperator<< (const Debug &dbg, const char out)
 Debug insertion operator for char.
const Debugoperator<< (const Debug &dbg, const int out)
 Debug insertion operator for int.
const Debugoperator<< (const Debug &dbg, const unsigned int out)
 Debug insertion operator for uint.
const Debugoperator<< (const Debug &dbg, const long out)
 Debug insertion operator for long.
const Debugoperator<< (const Debug &dbg, const long long out)
 Debug insertion operator for long.
const Debugoperator<< (const Debug &dbg, const bool out)
 Debug insertion operator for bool.
const Debugoperator<< (const Debug &dbg, const unsigned long out)
 Debug insertion operator for ulong.
const Debugoperator<< (const Debug &dbg, const unsigned long long out)
 Debug insertion operator for ulong.
const Debugoperator<< (const Debug &dbg, const double out)
 Debug insertion operator for double.
const Debugoperator<< (const Debug &dbg, std::ostream &(*out)(std::ostream &))
 Debug insertion operator for endl et al.
template<class T>
bool from_string (T &t, const std::string &s, std::ios_base &(*f)(std::ios_base &))
 Cast a string into another type.
template<class Object, class Functor>
Functor for_all (Object &object, Functor functor)
 Apply function f to all elements in Object o.
void dbg_print_item (std::string &object)
 Functor that prints an item using the H:cdbg class.
void print_item (std::string &object)
 Functor that prints an item.

Variables

static const Debug dbg0 (0)
 Instantiation of cdbg level 0.
static const Debug dbg1 (1)
 Instantiation of cdbg level 1.
static const Debug dbg2 (2)
 Instantiation of cdbg level 2.
static const Debug dbg3 (3)
 Instantiation of cdbg level 3.
static const Debug dbg4 (4)
 Instantiation of cdbg level 4.
static const Debug dbg5 (5)
 Instantiation of cdbg level 5.


Detailed Description

H namespace.

All code in the H namespace gets its inspiration from the best movie ever made: Hackers


Enumeration Type Documentation

enum H::ExceptionType

Enum for the different Exception types

Enumerator:
EXCEPTION_INFO 
EXCEPTION_WARNING 
EXCEPTION_NORMAL 
EXCEPTION_FATAL 

Definition at line 54 of file Exception.hpp.

enum H::FileDeviceType

Specifies the type of device watching interface (poll / inotify).

WATCH_POLL dictates that the file is a poll device WATCH_INOTIFY dictates that the file is an inotify device

Enumerator:
WATCH_POLL 
WATCH_INOTIFY 

Definition at line 79 of file FileEventWatcher.hpp.

enum H::FileWatchType

Specifies the type of file watching to be done.

WATCH_IN dictates that the file should only be watched for reads WATCH_OUT dictates that the file should only be watched for writes WATCH_INOUT dictates that the file should be watched for reads and writes

Enumerator:
WATCH_INVALID 
WATCH_IN 
WATCH_OUT 
WATCH_INOUT 

Definition at line 65 of file FileEventWatcher.hpp.

enum H::SocketDomain

Domain of the socket.

Enumerator:
SOCKET_INTERNET 
SOCKET_UNIX 
SOCKET_INTERNET2 

Definition at line 66 of file Socket.hpp.

enum H::SocketProtocol

Protocol of the socket.

Enumerator:
SOCKET_PROTO_TCP 
SOCKET_PROTO_UDP 

Definition at line 96 of file Socket.hpp.

enum H::SocketType

Type of the socket.

Enumerator:
SOCKET_STREAM 
SOCKET_DGRAM 
SOCKET_RAW 
SOCKET_SEQPACKET 
SOCKET_RDM 

Definition at line 84 of file Socket.hpp.


Function Documentation

void H::dbg_print_item ( std::string &  object  )  [inline]

Functor that prints an item using the H:cdbg class.

Parameters:
object The item to print

Definition at line 125 of file Util.hpp.

References dbg0.

template<class Object, class Functor>
Functor H::for_all ( Object &  object,
Functor  functor 
) [inline]

Apply function f to all elements in Object o.

Parameters:
object The object to apply functor to
functor The function that modifies each object
Returns:
result of std::for_each (unary_function)
This is essentially a short cut for std::for_each

Definition at line 65 of file Util.hpp.

template<class T>
bool H::from_string ( T &  t,
const std::string &  s,
std::ios_base &(*)(std::ios_base &)  f 
) [inline]

Cast a string into another type.

Converts various datatypes from string

Definition at line 56 of file stringconverter.hpp.

void H::print_item ( std::string &  object  )  [inline]

Functor that prints an item.

Parameters:
object The item to print

Definition at line 133 of file Util.hpp.


Generated on Wed Nov 7 10:07:14 2007 for gizmod by  doxygen 1.5.3