ucc Namespace Reference

Common namespace for all ucommon objects. More...

Data Structures

class  cidr
 A class to hold internet segment routing rules. More...
class  Socket
 A generic socket base class. More...
class  ListenSocket
 A bound socket used to listen for inbound socket connections. More...
class  string
 A copy-on-write string class that operates by reference count. More...
class  memstring
 A string class that uses a cstring buffer that is fixed in memory. More...
class  StringFormat
 A string conversion class for use as a base class in objects which can transform themselves into string representations. More...
class  charbuf
 A template to create a character array that can be manipulated as a string. More...
class  stringbuf
 A string class that has a predefined string buffer. More...
class  Conditional
 The conditional is a common base for other thread synchronizing classes. More...
class  ConditionalAccess
 The conditional rw seperates scheduling for optizming behavior or rw locks. More...
class  TimedEvent
 Event notification to manage scheduled realtime threads. More...
class  rexlock
 Portable recursive exclusive lock. More...
class  rwlock
 A generic and portable implimentation of Read/Write locking. More...
class  ReusableAllocator
 Class for resource bound memory pools between threads. More...
class  ConditionalLock
 An optimized and convertable shared lock. More...
class  barrier
 A portable implimentation of "barrier" thread sychronization. More...
class  semaphore
 A portable counting semaphore class. More...
class  mutex
 Generic non-recursive exclusive lock class. More...
class  auto_protect
 A mutex locked object smart pointer helper class. More...
class  LockedPointer
 An object pointer that uses mutex to assure thread-safe singleton use. More...
class  SharedObject
 Shared singleton object. More...
class  SharedPointer
 The shared pointer is used to manage a singleton instance of shared object. More...
class  Thread
 An abstract class for defining classes that operate as a thread. More...
class  JoinableThread
 A child thread object that may be joined by parent. More...
class  DetachedThread
 A detached thread object that is stand-alone. More...
class  queue
 Manage a thread-safe queue of objects through reference pointers. More...
class  stack
 Manage a thread-safe stack of objects through reference pointers. More...
class  Buffer
 A thread-safe buffer for serializing and streaming class data. More...
class  locked_release
 Auto-pointer support class for locked objects. More...
class  shared_release
 Auto-pointer support class for shared singleton objects. More...
class  queueof
 A templated typed class for thread-safe queue of object pointers. More...
class  stackof
 A templated typed class for thread-safe stack of object pointers. More...
class  bufferof
 A templated typed class for buffering of objects. More...
class  shared_pointer
 Templated shared pointer for singleton shared objects of specific type. More...
class  locked_pointer
 Templated locked pointer for referencing locked objects of specific type. More...
class  locked_instance
 A templated smart pointer instance for lock protected objects. More...
class  shared_instance
 A templated smart pointer instance for shared singleton typed objects. More...
class  mutex_pointer
 Typed smart locked pointer class. More...
class  Timer
 Timer class to use when scheduling realtime events. More...
class  TimerQueue
 A timer queue for timer events. More...
class  ArrayReuse
 An array of reusable objects. More...
class  PagerReuse
 A mempager source of reusable objects. More...
class  Vector
 A managed vector for generic object pointers. More...
class  MemVector
 Vector with fixed size member list. More...
class  vectorof
 A templated vector for a list of a specific Object subtype. More...
class  array_reuse
 An array of reusable types. More...
class  paged_reuse
 A reusable private pool of reusable types. More...
class  vectorbuf
 Allocated vector list of a specified type. More...
class  XMLParser
 XML streaming parser. More...

Typedefs

typedef Socket socket
 A convenience class for socket.
typedef unsigned short strsize_t
 A convenience class for size of strings.
typedef string string_t
 A convenience type for string.
typedef string String
 A convenience type when mixing std::string in old compilers that are bad with namespaces.
typedef ConditionalLock condlock_t
 Convenience type for using conditional locks.
typedef ConditionalAccess accesslock_t
 Convenience type for scheduling access.
typedef TimedEvent timedevent_t
 Convenience type for using timed events.
typedef mutex mutex_t
 Convenience type for using exclusive mutex locks.
typedef mutex Mutex
 Convenience type for using exclusive mutex on systems which define "mutex" (solaris) already to avoid type confusion.
typedef rwlock rwlock_t
 Convenience type for using read/write locks.
typedef rexlock rexlock_t
 Convenience type for using recursive exclusive locks.
typedef semaphore semaphore_t
 Convenience type for using counting semaphores.
typedef barrier barrier_t
 Convenience type for using thread barriers.
typedef stack stack_t
 Convenience type for using thread-safe object stacks.
typedef queue fifo_t
 Convenience type for using thread-safe object fifo (queue).
typedef TimerQueue::event TQEvent
 A convenience type for timer queue timer events.
typedef Timer timer_t
 A convenience type for timers.

Functions

struct addrinfo * addrinfo (socket::address &address)
 A convenience function to convert a socket address list into an addrinfo.
struct sockaddr * addr (socket::address &address)
 A convenience function to convert a socket address list into a socket address.
int stricmp (const char *string1, const char *string2)
 Convenience function for case insensitive null terminated string compare.
int strnicmp (const char *string1, const char *string2, size_t max)
 Convenience function for case insensitive null terminated string compare.
void start (JoinableThread *thread, int priority=0)
 Convenience function to start a joinable thread.
void start (DetachedThread *thread, int priority=0)
 Convenience function to start a detached thread.
void wait (barrier_t &barrier)
 Convenience function to wait on a barrier.
void wait (semaphore_t &semaphore, timeout_t timeout=Timer::inf)
 Convenience function to wait on a semaphore.
void release (semaphore_t &semaphore)
 Convenience function to release a semaphore.
void acquire (mutex_t &mutex)
 Convenience function to acquire a mutex.
void release (mutex_t &mutex)
 Convenience function to release a mutex.
void modify (accesslock_t &lock)
 Convenience function to exclusively schedule conditional access.
void access (accesslock_t &lock)
 Convenience function to shared read schedule conditional access.
void release (accesslock_t &lock)
 Convenience function to release an access lock.
void commit (accesslock_t &lock)
 Convenience function to commit an exclusive access lock.
void exclusive (condlock_t &lock)
 Convenience function to exclusively lock shared conditional lock.
void share (condlock_t &lock)
 Convenience function to restore shared access on a conditional lock.
void modify (condlock_t &lock)
 Convenience function to exclusively aquire a conditional lock.
void commit (condlock_t &lock)
 Convenience function to commit and release an exclusively locked conditional lock.
void access (condlock_t &lock)
 Convenience function for shared access to a conditional lock.
void release (condlock_t &lock)
 Convenience function to release shared access to a conditional lock.
bool exclusive (rwlock_t &lock, timeout_t timeout=Timer::inf)
 Convenience function for exclusive write access to a read/write lock.
bool share (rwlock_t &lock, timeout_t timeout=Timer::inf)
 Convenience function for shared read access to a read/write lock.
void release (rwlock_t &lock)
 Convenience function to release a shared lock.
void lock (rexlock_t &lock)
 Convenience function to lock a shared recursive mutex lock.
void release (rexlock_t &lock)
 Convenience function to release a shared recursive mutex lock.
void push (stack_t &stack, Object *object)
 Convenience function to push an object onto a stack.
Objectpull (stack_t &stack, timeout_t timeout=Timer::inf)
 Convenience function to pull an object from a stack.
void remove (stack_t &stack, Object *object)
 Convenience function to remove an object from a stack.
void push (fifo_t &fifo, Object *object)
 Convenience function to push an object onto a fifo.
Objectpull (fifo_t &fifo, timeout_t timeout=Timer::inf)
 Convenience function to pull an object from a fifo.
void remove (fifo_t &fifo, Object *object)
 Convenience function to remove an object from a fifo.

Detailed Description

Common namespace for all ucommon objects.

We are using a common namespace to easily seperate ucommon from other libraries. This namespace may be changed from ucc to gnu when we merge code with GNU Common C++. In any case, it is controlled by macros and so any changes will be hidden from user applications so long as the namespace macros (UCOMMON_NAMESPACE, NAMESPACE_UCOMMON, END_NAMESPACE) are used in place of direct namespace declarations.


Typedef Documentation

A convenience type when mixing std::string in old compilers that are bad with namespaces.

..

Definition at line 1680 of file string.h.


Function Documentation

void ucc::access ( condlock_t &  lock  )  [inline]

Convenience function for shared access to a conditional lock.

Parameters:
lock to access.

Definition at line 2681 of file thread.h.

Here is the call graph for this function:

void ucc::access ( accesslock_t &  lock  )  [inline]

Convenience function to shared read schedule conditional access.

Parameters:
lock to access shared.

Definition at line 2630 of file thread.h.

Here is the call graph for this function:

void ucc::acquire ( mutex_t &  mutex  )  [inline]

Convenience function to acquire a mutex.

Parameters:
mutex to acquire.

Definition at line 2609 of file thread.h.

Here is the call graph for this function:

struct sockaddr* ucc::addr ( socket::address &  address  )  [read]

A convenience function to convert a socket address list into a socket address.

Parameters:
address list object.
Returns:
first socket address in list or NULL if empty.

Definition at line 1564 of file socket.h.

Here is the call graph for this function:

struct addrinfo* ucc::addrinfo ( socket::address &  address  )  [read]

A convenience function to convert a socket address list into an addrinfo.

Parameters:
address list object.
Returns:
addrinfo list or NULL if empty.

Definition at line 1555 of file socket.h.

Here is the call graph for this function:

void ucc::commit ( condlock_t &  lock  )  [inline]

Convenience function to commit and release an exclusively locked conditional lock.

Parameters:
lock to commit.

Definition at line 2674 of file thread.h.

Here is the call graph for this function:

void ucc::commit ( accesslock_t &  lock  )  [inline]

Convenience function to commit an exclusive access lock.

lock.

Parameters:
lock to commit.

Definition at line 2645 of file thread.h.

Here is the call graph for this function:

bool ucc::exclusive ( rwlock_t &  lock,
timeout_t  timeout = Timer::inf 
) [inline]

Convenience function for exclusive write access to a read/write lock.

Parameters:
lock to write lock.
timeout to wait for exclusive locking.

Definition at line 2696 of file thread.h.

Here is the call graph for this function:

void ucc::exclusive ( condlock_t &  lock  )  [inline]

Convenience function to exclusively lock shared conditional lock.

Parameters:
lock to make exclusive.

Definition at line 2652 of file thread.h.

Here is the call graph for this function:

void ucc::lock ( rexlock_t &  lock  )  [inline]

Convenience function to lock a shared recursive mutex lock.

Parameters:
lock to acquire.

Definition at line 2718 of file thread.h.

Here is the call graph for this function:

void ucc::modify ( condlock_t &  lock  )  [inline]

Convenience function to exclusively aquire a conditional lock.

Parameters:
lock to acquire for modify.

Definition at line 2666 of file thread.h.

Here is the call graph for this function:

void ucc::modify ( accesslock_t &  lock  )  [inline]

Convenience function to exclusively schedule conditional access.

Parameters:
lock to make exclusive.

Definition at line 2623 of file thread.h.

Here is the call graph for this function:

Object* ucc::pull ( fifo_t &  fifo,
timeout_t  timeout = Timer::inf 
) [inline]

Convenience function to pull an object from a fifo.

Parameters:
fifo to pull from.
timeout to wait to pull.
Returns:
object pulled.

Definition at line 2767 of file thread.h.

Here is the call graph for this function:

Object* ucc::pull ( stack_t &  stack,
timeout_t  timeout = Timer::inf 
) [inline]

Convenience function to pull an object from a stack.

Parameters:
stack to pull from.
timeout to wait to pull.
Returns:
object pulled.

Definition at line 2742 of file thread.h.

Here is the call graph for this function:

void ucc::push ( fifo_t &  fifo,
Object object 
) [inline]

Convenience function to push an object onto a fifo.

Parameters:
fifo to push into.
object to push.

Definition at line 2758 of file thread.h.

Here is the call graph for this function:

void ucc::push ( stack_t &  stack,
Object object 
) [inline]

Convenience function to push an object onto a stack.

Parameters:
stack to push into.
object to push.

Definition at line 2733 of file thread.h.

Here is the call graph for this function:

void ucc::release ( rexlock_t &  lock  )  [inline]

Convenience function to release a shared recursive mutex lock.

Parameters:
lock to release.

Definition at line 2725 of file thread.h.

Here is the call graph for this function:

void ucc::release ( rwlock_t &  lock  )  [inline]

Convenience function to release a shared lock.

Parameters:
lock to release.

Definition at line 2711 of file thread.h.

Here is the call graph for this function:

void ucc::release ( condlock_t &  lock  )  [inline]

Convenience function to release shared access to a conditional lock.

Parameters:
lock to release.

Definition at line 2688 of file thread.h.

Here is the call graph for this function:

void ucc::release ( accesslock_t &  lock  )  [inline]

Convenience function to release an access lock.

Parameters:
lock to release.

Definition at line 2637 of file thread.h.

Here is the call graph for this function:

void ucc::release ( mutex_t &  mutex  )  [inline]

Convenience function to release a mutex.

Parameters:
mutex to release.

Definition at line 2616 of file thread.h.

Here is the call graph for this function:

void ucc::release ( semaphore_t &  semaphore  )  [inline]

Convenience function to release a semaphore.

Parameters:
semaphore to release.

Definition at line 2602 of file thread.h.

Here is the call graph for this function:

void ucc::remove ( fifo_t &  fifo,
Object object 
) [inline]

Convenience function to remove an object from a fifo.

Parameters:
fifo to remove from.
object to remove.

Definition at line 2775 of file thread.h.

void ucc::remove ( stack_t &  stack,
Object object 
) [inline]

Convenience function to remove an object from a stack.

Parameters:
stack to remove from.
object to remove.

Definition at line 2750 of file thread.h.

bool ucc::share ( rwlock_t &  lock,
timeout_t  timeout = Timer::inf 
) [inline]

Convenience function for shared read access to a read/write lock.

Parameters:
lock to share read lock.
timeout to wait for shared access.

Definition at line 2704 of file thread.h.

Here is the call graph for this function:

void ucc::share ( condlock_t &  lock  )  [inline]

Convenience function to restore shared access on a conditional lock.

Parameters:
lock to make shared.

Definition at line 2659 of file thread.h.

Here is the call graph for this function:

void ucc::start ( DetachedThread *  thread,
int  priority = 0 
) [inline]

Convenience function to start a detached thread.

Parameters:
thread to start.
priority of thread.

Definition at line 2524 of file thread.h.

Here is the call graph for this function:

void ucc::start ( JoinableThread *  thread,
int  priority = 0 
) [inline]

Convenience function to start a joinable thread.

Parameters:
thread to start.
priority of thread.

Definition at line 2516 of file thread.h.

Here is the call graph for this function:

int ucc::stricmp ( const char *  string1,
const char *  string2 
) [inline]

Convenience function for case insensitive null terminated string compare.

Parameters:
string1 to compare.
string2 to compare.
Returns:
0 if equal, > 0 if s2 > s1, < 0 if s2 < s1.

Definition at line 1656 of file string.h.

int ucc::strnicmp ( const char *  string1,
const char *  string2,
size_t  max 
) [inline]

Convenience function for case insensitive null terminated string compare.

Parameters:
string1 to compare.
string2 to compare.
max size of string to compare.
Returns:
0 if equal, > 0 if s2 > s1, < 0 if s2 < s1.

Definition at line 1666 of file string.h.

void ucc::wait ( semaphore_t &  semaphore,
timeout_t  timeout = Timer::inf 
) [inline]

Convenience function to wait on a semaphore.

Parameters:
semaphore to wait on.
timeout to wait for.

Definition at line 2595 of file thread.h.

Here is the call graph for this function:

void ucc::wait ( barrier_t &  barrier  )  [inline]

Convenience function to wait on a barrier.

Parameters:
barrier to wait.

Definition at line 2587 of file thread.h.

Here is the call graph for this function:


Generated on 18 Dec 2009 for UCommon by  doxygen 1.6.1