Data Structures | Typedefs | Functions

ucc Namespace Reference

Common namespace for all ucommon objects. More...

Data Structures

class  array_reuse
 An array of reusable types. More...
class  ArrayReuse
 An array of reusable objects. More...
class  assoc_pointer
 A typed template for using a key association with typed objects. More...
class  atomic
 Generic atomic class for referencing atomic objects and static functions. More...
class  audio
 Common audio class for GNU telephonic audio. More...
class  audiobuffer
 Generic audio buffering and transcoding for audio sources and sinks. More...
class  audiocodec
 Convert audio media. More...
class  audiofile
 Basic audio file access class. More...
class  auto_delete
 A helper class for the temporary object template. More...
class  auto_pointer
 A general purpose smart pointer helper class. More...
class  auto_protect
 A mutex locked object smart pointer helper class. More...
class  autorelease
 Create a linked list of auto-releasable objects. More...
class  barrier
 A portable implimentation of "barrier" thread sychronization. More...
class  bitmap
 A class to access bit fields in external bitmaps. More...
class  Buffer
 A thread-safe buffer for serializing and streaming class data. More...
class  bufferof
 A templated typed class for buffering of objects. More...
class  charbuf
 A template to create a character array that can be manipulated as a string. More...
class  cidr
 A class to hold internet segment routing rules. More...
class  Cipher
 A generic data ciphering class. 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  ConditionalLock
 An optimized and convertable shared lock. More...
class  CountedObject
 A base class for reference counted objects. More...
class  counter
 Automatic integer counting class. More...
class  Date
 The Date class uses a julian date representation of the current year, month, and day. More...
class  DateNumber
 A number class that manipulates a string buffer that is also a date. More...
class  DateTime
 The Datetime class uses a julian date representation of the current year, month, and day and a integer representation of the current time. More...
class  DateTimeString
 A DateTime string class. More...
class  DetachedThread
 A detached thread object that is stand-alone. More...
class  Digest
 A crytographic digest class. More...
class  DLinkedObject
 A double-linked Object, used for certain kinds of lists. More...
class  Exclusive
 An exclusive locking protocol interface base. More...
class  exclusive_lock
 A kind of smart pointer object to support exclusive locking protocol. More...
class  fbuf
 A generic file streaming class built from the I/O buffer. More...
class  filestream
 Streamable tcp connection between client and server. More...
class  fsys
 A container for generic and o/s portable threadsafe file system functions. More...
class  IOBuffer
 Common buffered I/O class. More...
class  JoinableThread
 A child thread object that may be joined by parent. More...
class  keyassoc
 A class to hold memory pointers referenced by string names. More...
class  keydata
 Data keys parsed from a keyfile. More...
class  keyfile
 Traditional keypair config file parsing class. More...
class  keylist
 A template for ordered index of typed name key mapped objects. More...
class  keymap
 A templated class for a hash map. More...
class  keypager
 A templated class for a hash pager. More...
class  linked_pointer
 A templated smart pointer for iterating linked lists. More...
class  linked_value
 Templated value class to embed data structure into a linked list. More...
class  LinkedList
 A double linked list object. More...
class  LinkedObject
 Common base class for all objects that can be formed into a linked list. More...
class  ListenSocket
 A bound socket used to listen for inbound socket connections. More...
class  locked_instance
 A templated smart pointer instance for lock protected objects. More...
class  locked_pointer
 Templated locked pointer for referencing locked objects of specific type. More...
class  locked_release
 Auto-pointer support class for locked objects. More...
class  LockedPointer
 An object pointer that uses mutex to assure thread-safe singleton use. More...
class  mapped_array
 Template class to map typed vector into shared memory. More...
class  mapped_reuse
 Template class to map typed resusble objects into shared memory heap. More...
class  mapped_view
 Class to access a named mapped segment published from another process. More...
class  MappedMemory
 Construct or access a named section of memory. More...
class  MappedReuse
 Map a reusable allocator over a named shared memory segment. More...
class  memalloc
 An alternate memory pager private heap manager. More...
class  mempager
 A managed private heap for small allocations. More...
class  memstring
 A string class that uses a cstring buffer that is fixed in memory. More...
class  MemVector
 Vector with fixed size member list. More...
class  multimap
 Embed data objects into a multipap structured memory database. More...
class  MultiMap
 A multipath linked list where membership is managed in multiple lists. More...
class  mutex
 Generic non-recursive exclusive lock class. More...
class  mutex_pointer
 Typed smart locked pointer class. More...
class  named_value
 Templated value class to embed data structure into a named list. More...
class  NamedObject
 A linked object base class with members found by name. More...
class  NamedTree
 The named tree class is used to form a tree oriented list of associated objects. More...
class  Number
 A number manipulation class. More...
class  Object
 A common base class for all managed objects. More...
class  object_value
 Template for embedding a data structure into a reference counted object. More...
class  ObjectQueue
 A queue of double linked object. More...
class  objfifo
 Template for typesafe basic object fifo container. More...
class  objqueue
 Template for typesafe basic object queue container. More...
class  objstack
 Template for typesafe basic object stack container. More...
class  OrderedIndex
 An index container for maintaining an ordered list of objects. More...
class  OrderedObject
 A linked object base class for ordered objects. More...
class  paged_reuse
 A reusable private pool of reusable types. More...
class  pager
 Mempager managed type factory for pager pool objects. More...
class  PagerObject
 This is a base class for objects that may be created in pager pools. More...
class  PagerPool
 Pager pool base class for managed memory pools. More...
class  PagerReuse
 A mempager source of reusable objects. More...
class  PersistEngine
 Stream serialization of persistent classes. More...
class  PersistObject
 PersistObject. More...
class  pipestream
 Streamable tcp connection between client and server. More...
class  pointer
 Typed smart pointer class. More...
class  queue
 Manage a thread-safe queue of objects through reference pointers. More...
class  queueof
 A templated typed class for thread-safe queue of object pointers. More...
class  Random
 Crytographically relevant random numbers. More...
class  ReusableAllocator
 Class for resource bound memory pools between threads. More...
class  ReusableObject
 Reusable objects for forming private heaps. More...
class  rexlock
 Portable recursive exclusive lock. More...
class  rwlock
 A generic and portable implimentation of Read/Write locking. More...
class  sarray
 Generate a typed sparse managed object array. More...
class  script
 Compiled script container. More...
class  secure
 Common secure socket support. More...
class  semaphore
 A portable counting semaphore class. More...
class  SeqCounter
 Automatically return a sequence of untyped objects. More...
class  sequence
 A template to return a sequence of objects of a specified type. More...
class  Shared
 An exclusive locking protocol interface base. More...
class  shared_instance
 A templated smart pointer instance for shared singleton typed objects. More...
class  shared_lock
 A kind of smart pointer object to support shared locking protocol. More...
class  shared_pointer
 Templated shared pointer for singleton shared objects of specific type. More...
class  shared_release
 Auto-pointer support class for shared singleton objects. More...
class  SharedObject
 Shared singleton object. More...
class  SharedPointer
 The shared pointer is used to manage a singleton instance of shared object. More...
class  shell
 A utility class for generic shell operations. More...
class  Socket
 A generic socket base class. More...
class  sparse_array
 A sparse array of managed objects. More...
class  SSocket
 Secure socket class. More...
class  stack
 Manage a thread-safe stack of objects through reference pointers. More...
class  stackof
 A templated typed class for thread-safe stack of object pointers. More...
class  string
 A copy-on-write string class that operates by reference count. More...
class  stringbuf
 A string class that has a predefined string buffer. More...
class  StringFormat
 A string conversion class for use as a base class in objects which can transform themselves into string representations. More...
class  TCPServer
 A generic tcp server class for TCPSocket. More...
class  TCPSocket
 A generic tcp socket class that offers i/o buffering. More...
class  tcpstream
 Streamable tcp connection between client and server. More...
class  temporary
 Manage temporary object stored on the heap. More...
class  Temporary
 Used as base class for temporary objects. More...
class  Thread
 An abstract class for defining classes that operate as a thread. More...
class  Time
 The Time class uses a integer representation of the current time. More...
class  TimedEvent
 Event notification to manage scheduled realtime threads. More...
class  Timer
 Timer class to use when scheduling realtime events. More...
class  TimerQueue
 A timer queue for timer events. More...
class  toggle
 Automatically toggle a bool on each reference. More...
class  tonegen
 Tone generator class for producing convertable tones. More...
class  treemap
 Embed data objects into a tree structured memory database. More...
class  TypeManager
 Type manager for persistance engine. More...
class  UString
 A copy-on-write utf8 string class that operates by reference count. More...
class  utf8
 A core class of ut8 encoded string functions. More...
class  utf8_pointer
 Pointer to utf8 encoded character data. More...
class  Vector
 A managed vector for generic object pointers. More...
class  vectorbuf
 Allocated vector list of a specified type. More...
class  vectorof
 A templated vector for a list of a specific Object subtype. More...
class  XMLParser
 XML streaming parser. More...
class  ZNumber
 A number manipulation class that maintains a zero lead filled string. More...

Typedefs

typedef ConditionalAccess accesslock_t
 Convenience type for scheduling access.
typedef barrier barrier_t
 Convenience type for using thread barriers.
typedef Cipher cipher_t
 Convenience type for generic ciphers.
typedef ConditionalLock condlock_t
 Convenience type for using conditional locks.
typedef counter counter_t
 A convenience typecast for integer counters.
typedef Date date_t
 Convenience type for using Date object.
typedef DateTime datetime_t
 Convenience type for using DateTime object.
typedef DateTimeString datetimestring_t
 Convenience type for using DateTimeString object.
typedef Digest digest_t
 Convenience type for generic digests.
typedef void * dir_t
 Convenience type for directory scan operations.
typedef exclusive_lock exlock_t
 Convenience type to use for object referencing an exclusive object.
typedef queue fifo_t
 Convenience type for using thread-safe object fifo (queue).
typedef fbuf file_t
 Convenience type for buffered file operations.
typedef fsys fsys_t
 Convience type for fsys.
typedef LinkedObjectLinkedIndex
 Convenience typedef for root pointers of single linked lists.
typedef void * mem_t
 Convenience type for loader operations.
typedef mutex Mutex
 Convenience type for using exclusive mutex on systems which define "mutex" (solaris) already to avoid type confusion.
typedef mutex mutex_t
 Convenience type for using exclusive mutex locks.
typedef class PersistObject *(* NewPersistObjectFunction )(void)
typedef Number number_t
 A convenience type for number.
typedef OrderedIndex objfifo_t
 Convenience type for a fifo of linked objects.
typedef ObjectQueue objqueue_t
 Convenience type for a queue of linked objects.
typedef ObjectStack objstack_t
 Convenience type for a stack of linked objects.
typedef rexlock rexlock_t
 Convenience type for using recursive exclusive locks.
typedef rwlock rwlock_t
 Convenience type for using read/write locks.
typedef semaphore semaphore_t
 Convenience type for using counting semaphores.
typedef shared_lock shlock_t
 Convenience type to use for object referencing a shared object.
typedef Cipher::Key skey_t
 Convenience type for generic cipher key.
typedef Socket socket
 A convenience class for socket.
typedef SSocket ssl_t
 Convenience type for secure socket.
typedef stack stack_t
 Convenience type for using thread-safe object stacks.
typedef string String
 A convenience type when mixing std::string in old compilers that are bad with namespaces...
typedef string string_t
 A convenience type for string.
typedef unsigned short strsize_t
 A convenience class for size of strings.
typedef TCPSocket tcp_t
 Convenience type for pure tcp sockets.
typedef TimedEvent timedevent_t
 Convenience type for using timed events.
typedef Timer timer_t
 A convenience type for timers.
typedef struct tm tm_t
 Convenience type for struct tm.
typedef toggle toggle_t
 A convenience typecast for auto-toggled bools.
typedef TimerQueue::event TQEvent
 A convenience type for timer queue timer events.
typedef int16_t ucs2_t
 16 bit unicode character code.
typedef int32_t ucs4_t
 32 bit unicode character code.
typedef void * unicode_t
 Resolves issues where wchar_t is not defined.
typedef UString ustring_t
 Convenience type for utf8 encoded strings.
typedef utf8_pointer utf8_t
 Convience type for utf8_pointer strings.
typedef ZNumber znumber_t
 A convenience type for znumber.

Functions

template<typename T >
const T abs (const T &value)
 Template for absolute value of a type.
void access (Shared *object)
 Convenience function to access (lock) shared object through it's protocol.
void access (accesslock_t &lock)
 Convenience function to shared read schedule conditional access.
void access (condlock_t &lock)
 Convenience function for shared access to a conditional lock.
void acquire (mutex_t &mutex)
 Convenience function to acquire a mutex.
void add (ObjectQueue &queue, DLinkedObject *object)
 Add a linked object to end of queue of objects.
void add (ObjectStack &stack, LinkedObject *object)
 Add a linked object onto a stack of linked objects.
void add (OrderedIndex &fifo, LinkedObject *object)
 Add a linked object onto a fifo of linked objects.
struct sockaddr * addr (socket::address &address)
 A convenience function to convert a socket address list into a socket address.
struct addrinfo * addrinfo (socket::address &address)
 A convenience function to convert a socket address list into an addrinfo.
void commit (accesslock_t &lock)
 Convenience function to commit an exclusive access lock.
void commit (condlock_t &lock)
 Convenience function to commit and release an exclusively locked conditional lock.
Objectcopy (Object *object)
 Convenence function to access object copy.
bool eq (struct sockaddr *s1, struct sockaddr *s2)
 Compare two socket addresses to see if equal.
bool eq (struct sockaddr_storage *s1, struct sockaddr_storage *s2)
 Compare two stored socket addresses to see if equal.
bool eq (char const *s1, char const *s2)
 Compare two null terminated strings if equal.
bool eq (char const *s1, char const *s2, size_t size)
 Compare two null terminated strings if equal up to specified size.
bool eq (String &s1, String &s2)
 Compare two string objects if equal.
bool exclusive (rwlock_t &lock, timeout_t timeout=Timer::inf)
 Convenience function for exclusive write access to a read/write lock.
void exclusive (Shared *object)
 Convenience function to exclusive lock shared object through it's protocol.
void exclusive (condlock_t &lock)
 Convenience function to exclusively lock shared conditional lock.
bool ieq (struct sockaddr *s1, struct sockaddr *s2)
 Compare two host addresses to see if equal.
bool ieq (char const *s1, char const *s2)
 Compare two null terminated strings if equal ignoring case.
bool ieq (char const *s1, char const *s2, size_t size)
 Compare two null terminated strings if equal for a specified size ignoring case.
bool ieq (String &s1, String &s2)
 Compare two string objects if equal ignoring case.
template<class T >
bool is (T &object)
 Convenience function to validate object assuming it is castable to bool.
template<class T >
bool isnull (T &object)
 Convenience function to test pointer object.
template<class T >
bool isnullp (T *object)
 Convenience function to test pointer-pointer object.
void lock (rexlock_t &lock)
 Convenience function to lock a shared recursive mutex lock.
void lock (Exclusive *object)
 Convenience function to exclusively lock an object through it's protocol.
template<typename T >
const T() max (const T &v1, const T &v2)
 Template for max value of a type.
template<class T >
T &() max (T &o1, T &o2)
 Convenience function to return max of two objects.
template<class T >
T &() min (T &o1, T &o2)
 Convenience function to return min of two objects.
template<typename T >
const T() min (const T &v1, const T &v2)
 Template for min value of a type.
void modify (accesslock_t &lock)
 Convenience function to exclusively schedule conditional access.
void modify (condlock_t &lock)
 Convenience function to exclusively aquire a conditional lock.
DLinkedObjectpop (ObjectQueue &queue)
 Pop a linked object from end of queue.
LinkedObjectpop (ObjectStack &stack)
 Pop a linked object from a stack of linked objects.
LinkedObjectpop (OrderedIndex &fifo)
 Pop a linked object from a fifo of linked objects.
Objectpull (stack_t &stack, timeout_t timeout=Timer::inf)
 Convenience function to pull an object from a stack.
Objectpull (fifo_t &fifo, timeout_t timeout=Timer::inf)
 Convenience function to pull an object from a fifo.
LinkedObjectpull (OrderedIndex &fifo)
 Pop a linked object from a fifo of linked objects.
DLinkedObjectpull (ObjectQueue &queue)
 Pull a linked object from start of a queue.
LinkedObjectpull (ObjectStack &stack)
 Pop a linked object from a stack of linked objects.
void push (fifo_t &fifo, Object *object)
 Convenience function to push an object onto a fifo.
void push (ObjectStack &stack, LinkedObject *object)
 Push a linked object onto a stack of linked objects.
void push (stack_t &stack, Object *object)
 Convenience function to push an object onto a stack.
void push (ObjectQueue &queue, DLinkedObject *object)
 Push a linked object to start of queue.
void push (OrderedIndex &fifo, LinkedObject *object)
 Push a linked object onto a fifo of linked objects.
void release (accesslock_t &lock)
 Convenience function to release an access lock.
void release (exlock_t &reference)
 Convenience function to release a reference to an exclusive lock.
void release (Shared *object)
 Convenience function to unlock shared object through it's protocol.
void release (rexlock_t &lock)
 Convenience function to release a shared recursive mutex lock.
void release (mutex_t &mutex)
 Convenience function to release a mutex.
void release (shlock_t &reference)
 Convenience function to release a reference to a shared lock.
void release (Object *object)
 Convenence function to access object release.
void release (semaphore_t &semaphore)
 Convenience function to release a semaphore.
void release (rwlock_t &lock)
 Convenience function to release a shared lock.
void release (condlock_t &lock)
 Convenience function to release shared access to a conditional lock.
void remove (stack_t &stack, Object *object)
 Convenience function to remove an object from a stack.
void remove (fifo_t &fifo, Object *object)
 Convenience function to remove an object from a fifo.
void retain (Object *object)
 Convenence function to access object retention.
bool share (rwlock_t &lock, timeout_t timeout=Timer::inf)
 Convenience function for shared read access to a read/write lock.
void share (Shared *object)
 Convenience function to restore shared locking for object through it's protocol.
void share (condlock_t &lock)
 Convenience function to restore shared access on a conditional lock.
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.
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.
template<class T >
void swap (T &o1, T &o2)
 Convenience function to swap objects.
void unlock (Exclusive *object)
 Convenience function to unlock an exclusive object through it's protocol.
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 zerofill (void *addr, size_t size)

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

typedef int16_t ucc::ucs2_t

16 bit unicode character code.

Java and some api's like these.

Definition at line 50 of file unicode.h.

typedef int32_t ucc::ucs4_t

32 bit unicode character code.

We may extract this from a ucs2 or utf8 string.

Definition at line 45 of file unicode.h.


Function Documentation

template<typename T >
const T ucc::abs ( const T &  value  )  [inline]

Template for absolute value of a type.

Parameters:
value to check
Returns:
absolute value

Definition at line 188 of file numbers.h.

void ucc::access ( Shared *  object  )  [inline]

Convenience function to access (lock) shared object through it's protocol.

Parameters:
object to share lock.

Definition at line 241 of file access.h.

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

Convenience function to shared read schedule conditional access.

Parameters:
lock to access shared.

Definition at line 2659 of file thread.h.

Here is the call graph for this function:

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

Convenience function for shared access to a conditional lock.

Parameters:
lock to access.

Definition at line 2710 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 2638 of file thread.h.

Here is the call graph for this function:

void ucc::add ( ObjectQueue &  queue,
DLinkedObject *  object 
) [inline]

Add a linked object to end of queue of objects.

Parameters:
queue to add object onto.
object to add onto queue.

Definition at line 1981 of file linked.h.

Here is the call graph for this function:

void ucc::add ( ObjectStack &  stack,
LinkedObject *  object 
) [inline]

Add a linked object onto a stack of linked objects.

Parameters:
stack to push object onto.
object to push onto stack.

Definition at line 1917 of file linked.h.

void ucc::add ( OrderedIndex &  fifo,
LinkedObject *  object 
) [inline]

Add a linked object onto a fifo of linked objects.

Parameters:
fifo to push object onto.
object to push onto fifo.

Definition at line 1949 of file linked.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 1738 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 1729 of file socket.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 2674 of file thread.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 2703 of file thread.h.

Here is the call graph for this function:

Object* ucc::copy ( Object *  object  )  [inline]

Convenence function to access object copy.

Parameters:
object we are copying.

Definition at line 564 of file object.h.

Here is the call graph for this function:

bool ucc::eq ( struct sockaddr *  s1,
struct sockaddr *  s2 
) [inline]

Compare two socket addresses to see if equal.

If the port is zero then this is the same as comparing host address alone.

Parameters:
s1 socket address to compare.
s2 socket address to compare.
Returns:
true if addresses same.
Examples:
cipher.cpp, datetime.cpp, digest.cpp, shell.cpp, and string.cpp.

Definition at line 1748 of file socket.h.

bool ucc::eq ( struct sockaddr_storage *  s1,
struct sockaddr_storage *  s2 
) [inline]

Compare two stored socket addresses to see if equal.

If the port is zero then this is the same as comparing host address alone.

Parameters:
s1 stored socket address to compare.
s2 stored socket address to compare.
Returns:
true if addresses same.

Definition at line 1758 of file socket.h.

bool ucc::eq ( char const *  s1,
char const *  s2 
) [inline]

Compare two null terminated strings if equal.

Parameters:
s1 string to compare.
s2 string to compare.
Returns:
true if equal.

Definition at line 1713 of file string.h.

bool ucc::eq ( char const *  s1,
char const *  s2,
size_t  size 
) [inline]

Compare two null terminated strings if equal up to specified size.

Parameters:
s1 string to compare.
s2 string to compare.
size of string to compare.
Returns:
true if equal.

Definition at line 1723 of file string.h.

bool ucc::eq ( String &  s1,
String &  s2 
) [inline]

Compare two string objects if equal.

Parameters:
s1 string to compare.
s2 string to compare.
Returns:
true if equal.

Definition at line 1732 of file string.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 2725 of file thread.h.

Here is the call graph for this function:

void ucc::exclusive ( Shared *  object  )  [inline]

Convenience function to exclusive lock shared object through it's protocol.

Parameters:
object to exclusive lock.

Definition at line 255 of file access.h.

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

Convenience function to exclusively lock shared conditional lock.

Parameters:
lock to make exclusive.

Definition at line 2681 of file thread.h.

Here is the call graph for this function:

bool ucc::ieq ( struct sockaddr *  s1,
struct sockaddr *  s2 
) [inline]

Compare two host addresses to see if equal.

The port numbers are ignored.

Parameters:
s1 socket address to compare.
s2 socket address to compare.
Returns:
true if addresses same.
Examples:
keydata.cpp, and string.cpp.

Definition at line 1768 of file socket.h.

bool ucc::ieq ( char const *  s1,
char const *  s2 
) [inline]

Compare two null terminated strings if equal ignoring case.

This is related to stricmp or gcc strcasecmp.

Parameters:
s1 string to compare.
s2 string to compare.
Returns:
true if equal.

Definition at line 1742 of file string.h.

bool ucc::ieq ( char const *  s1,
char const *  s2,
size_t  size 
) [inline]

Compare two null terminated strings if equal for a specified size ignoring case.

This is related to stricmp or gcc strcasecmp.

Parameters:
s1 string to compare.
s2 string to compare.
size of string to compare.
Returns:
true if equal.

Definition at line 1753 of file string.h.

bool ucc::ieq ( String &  s1,
String &  s2 
) [inline]

Compare two string objects if equal ignoring case.

This is related to stricmp or gcc strcasecmp.

Parameters:
s1 string to compare.
s2 string to compare.
Returns:
true if equal.

Definition at line 1763 of file string.h.

Here is the call graph for this function:

template<class T >
bool ucc::is ( T &  object  )  [inline]

Convenience function to validate object assuming it is castable to bool.

Parameters:
object we are testing.
Returns:
true if object valid.
Examples:
datetime.cpp, script.cpp, and shell.cpp.

Definition at line 573 of file object.h.

template<class T >
bool ucc::isnull ( T &  object  )  [inline]

Convenience function to test pointer object.

This solves issues where some compilers get confused between bool and pointer operators.

Parameters:
object we are testing.
Returns:
true if object points to NULL.

Definition at line 584 of file object.h.

template<class T >
bool ucc::isnullp ( T *  object  )  [inline]

Convenience function to test pointer-pointer object.

This solves issues where some compilers get confused between bool and pointer operators.

Parameters:
object we are testing.
Returns:
true if object points to NULL.

Definition at line 594 of file object.h.

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

Convenience function to lock a shared recursive mutex lock.

Parameters:
lock to acquire.

Definition at line 2747 of file thread.h.

Here is the call graph for this function:

void ucc::lock ( Exclusive *  object  )  [inline]

Convenience function to exclusively lock an object through it's protocol.

Parameters:
object to lock.

Definition at line 227 of file access.h.

template<typename T >
const T() ucc::max ( const T &  v1,
const T &  v2 
) [inline]

Template for max value of a type.

Parameters:
v1 value to check
v2 value to check
Returns:
v1 if > v2, else v2

Definition at line 215 of file numbers.h.

template<class T >
T&() ucc::max ( T &  o1,
T &  o2 
) [inline]

Convenience function to return max of two objects.

Parameters:
o1 to check.
o2 to check.
Returns:
max object.

Definition at line 613 of file object.h.

template<class T >
T&() ucc::min ( T &  o1,
T &  o2 
) [inline]

Convenience function to return min of two objects.

Parameters:
o1 to check.
o2 to check.
Returns:
min object.

Definition at line 625 of file object.h.

template<typename T >
const T() ucc::min ( const T &  v1,
const T &  v2 
) [inline]

Template for min value of a type.

Parameters:
v1 value to check
v2 value to check
Returns:
v1 if < v2, else v2

Definition at line 203 of file numbers.h.

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

Convenience function to exclusively schedule conditional access.

Parameters:
lock to make exclusive.

Definition at line 2652 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 2695 of file thread.h.

Here is the call graph for this function:

DLinkedObject* ucc::pop ( ObjectQueue &  queue  )  [inline]

Pop a linked object from end of queue.

Parameters:
queue to pop object from.
Returns:
object popped from queue or NULL if none.

Definition at line 1989 of file linked.h.

Here is the call graph for this function:

LinkedObject* ucc::pop ( ObjectStack &  stack  )  [inline]

Pop a linked object from a stack of linked objects.

Parameters:
stack to pull object from.
Returns:
object pulled from stack or NULL if none.
Examples:
linked.cpp.

Definition at line 1925 of file linked.h.

LinkedObject* ucc::pop ( OrderedIndex &  fifo  )  [inline]

Pop a linked object from a fifo of linked objects.

Parameters:
fifo to pull object from.
Returns:
object pulled from stack or NULL if none.

Definition at line 1957 of file linked.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 2771 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 2796 of file thread.h.

Here is the call graph for this function:

LinkedObject* ucc::pull ( OrderedIndex &  fifo  )  [inline]

Pop a linked object from a fifo of linked objects.

Parameters:
fifo to pull object from.
Returns:
object pulled from stack or NULL if none.

Definition at line 1965 of file linked.h.

Here is the call graph for this function:

DLinkedObject* ucc::pull ( ObjectQueue &  queue  )  [inline]

Pull a linked object from start of a queue.

Parameters:
queue to pull object from.
Returns:
object pulled from queue or NULL if none.

Definition at line 1997 of file linked.h.

Here is the call graph for this function:

LinkedObject* ucc::pull ( ObjectStack &  stack  )  [inline]

Pop a linked object from a stack of linked objects.

Parameters:
stack to pull object from.
Returns:
object pulled from stack or NULL if none.

Definition at line 1933 of file linked.h.

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 2787 of file thread.h.

Here is the call graph for this function:

void ucc::push ( ObjectStack &  stack,
LinkedObject *  object 
) [inline]

Push a linked object onto a stack of linked objects.

Parameters:
stack to push object onto.
object to push onto stack.
Examples:
linked.cpp.

Definition at line 1909 of file linked.h.

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 2762 of file thread.h.

Here is the call graph for this function:

void ucc::push ( ObjectQueue &  queue,
DLinkedObject *  object 
) [inline]

Push a linked object to start of queue.

Parameters:
queue to push object into.
object to push onto fifo.

Definition at line 1973 of file linked.h.

Here is the call graph for this function:

void ucc::push ( OrderedIndex &  fifo,
LinkedObject *  object 
) [inline]

Push a linked object onto a fifo of linked objects.

Parameters:
fifo to push object onto.
object to push onto fifo.

Definition at line 1941 of file linked.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 2666 of file thread.h.

Here is the call graph for this function:

void ucc::release ( exlock_t &  reference  )  [inline]

Convenience function to release a reference to an exclusive lock.

Parameters:
reference to object referencing exclusive locked object.

Definition at line 279 of file access.h.

Here is the call graph for this function:

void ucc::release ( Shared *  object  )  [inline]

Convenience function to unlock shared object through it's protocol.

Parameters:
object to unlock.
Examples:
audio.cpp.

Definition at line 248 of file access.h.

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

Convenience function to release a shared recursive mutex lock.

Parameters:
lock to release.

Definition at line 2754 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 2645 of file thread.h.

Here is the call graph for this function:

void ucc::release ( shlock_t &  reference  )  [inline]

Convenience function to release a reference to a shared lock.

Parameters:
reference to object referencing shared locked object.

Definition at line 286 of file access.h.

Here is the call graph for this function:

void ucc::release ( Object *  object  )  [inline]

Convenence function to access object release.

Parameters:
object we are releasing.

Definition at line 557 of file object.h.

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

Convenience function to release a semaphore.

Parameters:
semaphore to release.

Definition at line 2631 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 2740 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 2717 of file thread.h.

Here is the call graph for this function:

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 2779 of file thread.h.

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 2804 of file thread.h.

void ucc::retain ( Object *  object  )  [inline]

Convenence function to access object retention.

Parameters:
object we are retaining.

Definition at line 550 of file object.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 2733 of file thread.h.

Here is the call graph for this function:

void ucc::share ( Shared *  object  )  [inline]

Convenience function to restore shared locking for object through it's protocol.

Parameters:
object to restore shared locking.

Definition at line 262 of file access.h.

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 2688 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.
Examples:
thread.cpp.

Definition at line 2545 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 2553 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 1681 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 1691 of file string.h.

template<class T >
void ucc::swap ( T &  o1,
T &  o2 
) [inline]

Convenience function to swap objects.

Parameters:
o1 to swap.
o2 to swap.

Definition at line 603 of file object.h.

Here is the call graph for this function:

void ucc::unlock ( Exclusive *  object  )  [inline]

Convenience function to unlock an exclusive object through it's protocol.

Parameters:
object to unlock.

Definition at line 234 of file access.h.

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

Convenience function to wait on a barrier.

Parameters:
barrier to wait.

Definition at line 2616 of file thread.h.

Here is the call graph for this function:

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 2624 of file thread.h.

Here is the call graph for this function: