Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

atoms Namespace Reference


Classes

class  AttachError
 Unable to attach to the given descriptor. More...

class  Backtrace
 A backtrace. More...

class  Barrier
 A single-use synchronization barrier. More...

class  Benchmarkable
 A function object for benchmarking. More...

struct  BenchmarkResults
 The results of a benchmark run. More...

class  Buffer
 I/O buffer. More...

class  BufferedStream
 Buffered I/O stream. More...

class  BufferedStream::AtomicReadMon
 Guarantees that a string of read operations will be atomic. More...

class  BufferedStreamFilter
 Buffered stream based on a raw stream instance. More...

struct  BufferedStreamFilter::ReadRequest
 An in-progress asynchronous read request. More...

class  CancelDisabledMon
 Surrounds a region in which deferred thread cancellation is not safe. More...

class  Condition
 A pthread condition variable. More...

class  ConnectionError
 Connection error. More...

class  ConnectionRefusedError
 Connection refused. More...

class  ConnectionResetError
 Connection reset by peer. More...

class  ConnectionTimedOutError
 Connection timed out. More...

class  DatagramSocket
 Datagram socket (UDP). More...

class  DebugLogger
 A configurable logger. More...

class  DebugLogger::Mon
 Debugging monitor. More...

class  DefaultBenchmarkable
class  EpollPoller
 epoll-based IO poller. More...

class  Error
 Basic error class. More...

class  FatalError
 Fatal error (for unit testing only; aborts otherwise). More...

class  HostUnreachableError
 Host unreachable. More...

class  InvalidThreadError
 Invalid thread for join operation. More...

class  IOBlockError
 I/O would block. More...

class  IOError
 I/O Error. More...

class  IOHandle
 Base class for an IO handle. More...

class  IOPoller
 Polls for I/O events. More...

struct  IOPoller::DescriptorInfo
class  IPv4Address
 Internet Protocol version 4 address. More...

class  KqueuePoller
 Kqueue-based poller (preferred IO poller on modern BSD systems). More...

class  MemoryError
 Out of memory (kernel or heap). More...

class  Monitor
 Monitors make events happen when entering/exiting blocks of code. More...

class  Mutex
 Mutual-exclusion lock for threading. More...

class  Mutex::Attr
 Attributes of a mutex specified at creation time. More...

class  Mutex::Mon
 Monitor to lock/unlock mutex. More...

class  NetworkDownError
 The local network interface used to reach the destination is down. More...

class  NetworkUnreachableError
 Network unreachable. More...

class  NoSuchThreadError
 The thread specified in a join operation does not exist. More...

class  Once
 Performs an action exactly once despite invocations in multiple threads. More...

class  PermissionDeniedError
class  PreparedSQLStatement
 A prepared SQL statement (query, DML, or DDL). More...

class  Process
 Represents a UNIX process on the local machine. More...

class  ProcessDescriptorLimitError
 Too many descriptors used by the current process. More...

class  ResolverError
 Error resolving an address. More...

class  RWMutex
 Read-write mutual-exclusion lock for threading. More...

class  RWMutex::ReadMon
class  RWMutex::WriteMon
class  Seekable
 Mix-in to make a Stream or BufferedStream seekable. More...

class  SeekableUNIXStream
 A seekable Unix stream, like a regular file or block device. More...

class  SelectPoller
 A concrete implementation of the IOPoller interface around select(2). More...

class  Semaphore
 A process-local semaphore. More...

class  Semaphore::Mon
class  SignalPoller
 Polls for signals. More...

class  SignalPollerAdapter
 Polls for signals through signal handlers, pipes, and an IO poller. More...

class  Socket
 Abstract socket class. More...

class  SocketAddress
 Address of a socket. More...

class  SQLConnection
 A connection to a SQL database. More...

class  SQLConnection::TransactionMon
 Initiates a SQL transaction which will be rolled back unless manually committed. More...

class  SQLResultSet
 The results of a SQL query. More...

class  StackOnly
 StackOnly classes should only occur on the stack. More...

class  Stream
 Abstract unbuffered stream. More...

class  StreamEndError
 End of stream error. More...

class  StreamSocket
 Stream socket (TCP, UNIX). More...

class  SynchronizationValue
 A variable for synchronization with primitives for setting it and for waiting for it to assume a value. More...

class  SystemDescriptorLimitError
 Too many descriptors used by the system. More...

class  Thread
class  Thread::Attr
 Thread attributes. More...

class  ThreadPool
 A pool of threads that will keep at most N processors busy. More...

class  ThreadPool::BlockingMon
 Wrapper around potentially-blocking operations. More...

class  ThreadSpecific
class  Time
 A high-precision absolute time suitable for POSIX realtime functions. More...

class  TimeoutDispatcher
 Manages timeouts of long-lived operations for many threads. More...

struct  TimeoutDispatcher::CompareMinExpirations
 Strict Weak Ordering of OperationMons based on expiration. More...

class  TimeoutDispatcher::OperationMon
class  Timespan
 A high-precision, unbounded, unsigned interval of time suitable for POSIX realtime functions. More...

class  UChar
 Unicode character. More...

class  UNIXDescriptor
 UNIX descriptor. More...

class  UNIXSignal
 A UNIX signal. More...

class  UNIXSignal::Init
class  UNIXStream
 UNIX stream. More...

struct  UNIXStream::Pipe
class  UnsupportedError
 A runtime check determined this feature is unsupported. More...

class  UString
 Unicode string in UTF-8 encoding. More...

class  UString::ByteIterator
class  UString::Rep
class  UString::UCharIterator

Endianness conversion.

These convert a value to or from the given endianness.

uint8_t doEndian (uint8_t val, Endian e)
int8_t doEndian (int8_t val, Endian e)
uint16_t doEndian (uint16_t val, Endian e)
int16_t doEndian (int16_t val, Endian e)
uint32_t doEndian (uint32_t val, Endian e)
int32_t doEndian (int32_t val, Endian e)
uint64_t doEndian (uint64_t val, Endian e)
int64_t doEndian (int64_t val, Endian e)

Typedefs

typedef SynchronizationValue<
bool > 
Predicate

Enumerations

enum  Endian {
  eHost = 0x00 | 0, eNetwork = 0x10 | 0, eLittle = 0x20 | 1, eBig = 0x30 | 0,
  eSwitch = 0x40 | 1
}
 Endianness. More...


Functions

template<typename InputIterator> std::iterator_traits< InputIterator
>::value_type 
computeMean (InputIterator begin, InputIterator end)
 Returns the mean of a series using Knuth's algorithm.

template<typename InputIterator> std::iterator_traits< InputIterator
>::value_type 
computeStddev (InputIterator begin, InputIterator end)
 Returns the standard deviation of a series using Knuth's algorithm.

double doublify (const struct timeval &tv)
void compute (const vector< double > &v, double &themean, double &delta)
shared_ptr< BenchmarkResultsbenchmark (const function< shared_ptr< Benchmarkable >()> &factory)
boost::shared_ptr< BenchmarkResultsbenchmark (const boost::function< boost::shared_ptr< Benchmarkable >()> &factory)
 Benchmarks a function.

boost::shared_ptr< BenchmarkResultsbenchmarkSimple (const boost::function< void()> &toBenchmark)
 Benchmarks a simple function.

 NonseekableBufferedStreamFilter (const boost::shared_ptr< Stream > &s)
 ~NonseekableBufferedStreamFilter ()
size_t read (void *buf, size_t min, size_t max=0)
void write (const void *buf, size_t size)
bool flush ()
bool isSeekable () const
virtual BufferedStreamoperator<< (const char *s)
virtual BufferedStreamoperator<< (const std::basic_string< char > &s)
virtual BufferedStreamoperator<< (const std::basic_string< wchar_t > &s)
bool operator< (const Time &a, const Time &b)
bool operator== (const Time &a, const Time &b)
const Timeoperator+= (Time &t, const Timespan &toadd)
 Adds an interval to a time.

bool operator< (const Timespan &a, const Timespan &b)
bool operator!= (const Timespan &a, const Timespan &b)
 BOOST_STATIC_ASSERT (sizeof(UChar)==4)
UCharIterator cbegin () const
UCharIterator cend () const
size_t getByteLength () const
 Returns the length of this string in bytes.

size_t reserveByteLength (size_t) const
bool isEmpty () const

Variables

const unsigned int N = 5
const double ALPHA = 0.05
const double T_ALPHADIV2_NMINUS1 = 2.776
Buffer inputBuffer
Buffer outputBuffer
DebugLogger LOGGER
UNIXStream::Pipe signalPipe
Rep * rep


Typedef Documentation

typedef SynchronizationValue<bool> atoms::Predicate
 

Definition at line 53 of file synchronization_value.hh.


Enumeration Type Documentation

enum atoms::Endian
 

Endianness.

(First bit contains whether or not to switch. Other bits are only used to keep values unique so compiler doesn't complain.)

Enumeration values:
eHost 
eNetwork 
eLittle 
eBig 
eSwitch 

Definition at line 82 of file gen.hh.


Function Documentation

shared_ptr<BenchmarkResults> benchmark const function< shared_ptr< Benchmarkable >()> &  factory  ) 
 

Definition at line 37 of file benchmark.cc.

References compute(), doublify(), N, NULL, and std::vector< Type, Alloc >::push_back().

Referenced by benchmarkSimple().

Here is the call graph for this function:

void compute const vector< double > &  v,
double &  themean,
double &  delta
[inline, static]
 

Definition at line 30 of file benchmark.cc.

References std::vector< Type, Alloc >::begin(), computeMean(), computeStddev(), std::vector< Type, Alloc >::end(), N, and T_ALPHADIV2_NMINUS1.

Referenced by benchmark().

Here is the call graph for this function:

int64_t doEndian int64_t  val,
Endian  e
[inline]
 

Definition at line 139 of file gen.hh.

References doEndian().

Here is the call graph for this function:

uint64_t doEndian uint64_t  val,
Endian  e
[inline]
 

Definition at line 125 of file gen.hh.

int32_t doEndian int32_t  val,
Endian  e
[inline]
 

Definition at line 121 of file gen.hh.

References doEndian().

Here is the call graph for this function:

uint32_t doEndian uint32_t  val,
Endian  e
[inline]
 

Definition at line 111 of file gen.hh.

int16_t doEndian int16_t  val,
Endian  e
[inline]
 

Definition at line 107 of file gen.hh.

References doEndian().

Here is the call graph for this function:

uint16_t doEndian uint16_t  val,
Endian  e
[inline]
 

Definition at line 99 of file gen.hh.

int8_t doEndian int8_t  val,
Endian  e
[inline]
 

Definition at line 97 of file gen.hh.

uint8_t doEndian uint8_t  val,
Endian  e
[inline]
 

Definition at line 96 of file gen.hh.

Referenced by doEndian(), atoms::SocketAddress::getPort(), atoms::IPv4Address::IPv4Address(), atoms::BufferedStream::readIntegralType(), atoms::SocketAddress::SocketAddress(), and atoms::BufferedStream::writeIntegralType().

double doublify const struct timeval &  tv  )  [inline, static]
 

Definition at line 26 of file benchmark.cc.

Referenced by benchmark().

bool flush  ) 
 

bool isSeekable  )  const
 

Definition at line 433 of file buffered_stream.hh.

NonseekableBufferedStreamFilter const boost::shared_ptr< Stream > &  s  )  [protected]
 

Definition at line 414 of file buffered_stream.hh.

Referenced by atoms::BufferedStreamFilter::create().

bool operator!= const Timespan &  a,
const Timespan &  b
[inline]
 

Definition at line 174 of file time.hh.

References atoms::Timespan::ts.

const Time& operator+= Time &  t,
const Timespan &  toadd
[inline]
 

Adds an interval to a time.

If the time is infinity, it will remain so; timespans are always non-negative, so they can not change its value.

Definition at line 152 of file time.hh.

References atoms::Timespan::ts, and atoms::Time::ts.

bool operator< const Timespan &  a,
const Timespan &  b
[inline]
 

Definition at line 169 of file time.hh.

References atoms::Timespan::ts.

bool operator< const Time &  a,
const Time &  b
[inline]
 

Definition at line 87 of file time.hh.

References atoms::Time::ts.

virtual BufferedStream& operator<< const std::basic_string< wchar_t > &  s  )  [virtual]
 

Definition at line 450 of file buffered_stream.hh.

References outputBuffer.

virtual BufferedStream& operator<< const std::basic_string< char > &  s  )  [virtual]
 

Definition at line 443 of file buffered_stream.hh.

References outputBuffer.

virtual BufferedStream& operator<< const char *  s  )  [virtual]
 

Definition at line 435 of file buffered_stream.hh.

References outputBuffer.

bool operator== const Time &  a,
const Time &  b
[inline]
 

Definition at line 92 of file time.hh.

References atoms::Time::ts.

size_t read void buf,
size_t  min,
size_t  max = 0
 

Referenced by atoms::Socket::attachInt(), and atoms::BufferedStream::readIntegralType().

void write const void buf,
size_t  size
 

Definition at line 428 of file buffered_stream.hh.

References outputBuffer.

Referenced by atoms::DebugLogger::getMinimumLevel(), atoms::SignalPollerAdapter::handler(), atoms::DebugLogger::logFatal(), atoms::DebugLogger::Mon::Mon(), atoms::DebugLogger::vlog(), and atoms::BufferedStream::writeIntegralType().

~NonseekableBufferedStreamFilter  ) 
 

Definition at line 418 of file buffered_stream.hh.

References atoms::DebugLogger::log(), LOGGER, and outputBuffer.

Here is the call graph for this function:


Variable Documentation

const double atoms::ALPHA = 0.05 [static]
 

Definition at line 23 of file benchmark.cc.

Buffer atoms::inputBuffer
 

Definition at line 458 of file buffered_stream.hh.

DebugLogger atoms::LOGGER [static]
 

Definition at line 460 of file buffered_stream.hh.

Referenced by ~NonseekableBufferedStreamFilter().

const unsigned int atoms::N = 5 [static]
 

Definition at line 22 of file benchmark.cc.

Referenced by benchmark(), and compute().

Buffer atoms::outputBuffer
 

Definition at line 458 of file buffered_stream.hh.

Referenced by operator<<(), write(), and ~NonseekableBufferedStreamFilter().

UNIXStream::Pipe atoms::signalPipe
 

Definition at line 16 of file signal_poller.cc.

const double atoms::T_ALPHADIV2_NMINUS1 = 2.776 [static]
 

Definition at line 24 of file benchmark.cc.

Referenced by compute().


Generated on Wed Jun 15 01:20:38 2005 for atoms++ by doxygen 1.3.5