ucommon  7.0.0
About: GNU uCommon C++ is a portable and optimized class framework for writing C++ applications that need to use threads and support concurrent synchronization, and that use sockets, XML parsing, object serialization, thread-optimized string and data structure classes, etc..
  Fossies Dox: ucommon-7.0.0.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

Loading...
Searching...
No Matches
ost::Assoc Class Referenceabstract

This class is used to associate (object) pointers with named strings. More...

#include <misc.h>

Collaboration diagram for ost::Assoc:
[legend]

Classes

struct  entry
 

Public Member Functions

void * getPointer (const char *id) const
 
void setPointer (const char *id, void *data)
 

Protected Member Functions

 Assoc ()
 
virtual ~Assoc ()
 
void clear (void)
 
virtual void * getMemory (size_t size)=0
 

Private Member Functions

 __DELETE_COPY (Assoc)
 

Private Attributes

entryentries [97]
 

Detailed Description

This class is used to associate (object) pointers with named strings.

A virtual is used to allocate memory which can be overriden in the derived class.

Author
David Sugar dyfet.nosp@m.@ost.nosp@m.el.co.nosp@m.m

associate names with pointers.

Definition at line 143 of file misc.h.

Constructor & Destructor Documentation

◆ Assoc()

ost::Assoc::Assoc ( )
protected

Definition at line 68 of file misc.cpp.

References clear().

Here is the call graph for this function:

◆ ~Assoc()

ost::Assoc::~Assoc ( )
protectedvirtual

Definition at line 73 of file misc.cpp.

Member Function Documentation

◆ __DELETE_COPY()

ost::Assoc::__DELETE_COPY ( Assoc  )
private

References ucommon::clear().

Here is the call graph for this function:

◆ clear()

void ost::Assoc::clear ( void  )
protected

Definition at line 77 of file misc.cpp.

References entries.

Referenced by Assoc().

◆ getMemory()

virtual void * ost::Assoc::getMemory ( size_t  size)
protectedpure virtual

Referenced by setPointer().

◆ getPointer()

void * ost::Assoc::getPointer ( const char *  id) const

Definition at line 94 of file misc.cpp.

References ost::Assoc::entry::data, entries, ost::getIndex(), ost::Assoc::entry::id, ost::Assoc::entry::next, and stricmp().

Here is the call graph for this function:

◆ setPointer()

void ost::Assoc::setPointer ( const char *  id,
void *  data 
)

Definition at line 82 of file misc.cpp.

References ost::Assoc::entry::data, entries, ost::getIndex(), getMemory(), ost::Assoc::entry::id, ost::Assoc::entry::next, and ucommon::String::set().

Here is the call graph for this function:

Member Data Documentation

◆ entries

entry* ost::Assoc::entries[97]
private

Definition at line 152 of file misc.h.

Referenced by clear(), getPointer(), and setPointer().


The documentation for this class was generated from the following files: