ClearSilver::HDFAttributes Class Reference

Encapsulation of HDF node attributes. More...

#include <HDFAttributes.h>

List of all members.

Public Types

STL type definitions
typedef size_t size_type
typedef char * key_type
typedef std::pair< const key_type,
mapped_type
value_type
typedef value_typereference
typedef const value_typeconst_reference

Public Member Functions

mapped_type operator[] (const key_type &)
 Direct element access.
Constructors and assignment operators
 HDFAttributes ()
 Default constructor.
 HDFAttributes (const Nodes &path, _attr *head)
 Construct container from head element.
 HDFAttributes (const HDFAttributes &)
 Copy constructor.
 ~HDFAttributes () throw ()
 Destructor.
HDFAttributesoperator= (const HDFAttributes &)
 Assignment operator.
void swap (HDFAttributes &) throw ()
 Swap contents with another object.
STL nonmodifying operations
size_type size () const
 Number of attributes in container.
bool empty () const
 Is the container empty?
size_type count (const key_type &key)
 How many elements equal key?
iterator find (const key_type &key)
 Find the first element equal to key?
const_iterator find (const key_type &key) const
 Find the first element equal to key?
STL iterator constructors
iterator begin ()
iterator end ()
const_iterator begin () const
const_iterator end () const
STL element insertion and removal
std::pair< iterator, bool > insert (const value_type &)
 Insert an element.
iterator insert (iterator, const value_type &)
 Insert an element using a hint.
size_type erase (const key_type &) throw ()
 Remove elements.
void erase (iterator)
 Remove element pointed to by iterator.
void erase (iterator begin, iterator end)
 Remove elements in a range.
void clear () throw ()
 Remove all elements.

Static Public Member Functions

static bool & debug ()
 Access the debug flag.

Friends

bool operator== (const HDFAttributes &, const HDFAttributes &)
 Equality comparison operator.

Classes

class  const_iterator
class  iterator
class  mapped_type


Detailed Description

Encapsulation of HDF node attributes.

This class provides an interface to the attributes associated with an HDF dataset node. This interface attempts to present the attributes as an STL container. However, because of the memory management characteristics of the underlying C API, proxy classes must be defined for the mapped and iterator types. Nevertheless, the attributes may be manipulated using standard STL algorithms.

Definition at line 65 of file HDFAttributes.h.


Member Function Documentation

HDFAttributes::size_type ClearSilver::HDFAttributes::count const key_type key  ) 
 

How many elements equal key?

Bug:
The STL suggests that the corresponding function for associative containers may provide better performance than linear complexity, because the STL containers are always sorted. In this case, however, the underlying container maintained by the ClearSilver C API is unordered. Consequently, this performance guarrantee cannot be provided. Nevertheless, this function provides conformance to the associated container interface, even though it cannot provide enhanced performance guarrantees.

Definition at line 104 of file HDFAttributes.cc.

bool & ClearSilver::HDFAttributes::debug  )  [static]
 

Access the debug flag.

If the debug flag is true, syslog(3) messages with priority LOG_DEBUG will be logged.

Definition at line 281 of file HDFAttributes.cc.

HDFAttributes::const_iterator ClearSilver::HDFAttributes::find const key_type key  )  const
 

Find the first element equal to key?

Bug:
The STL suggests that the corresponding function for associative containers may provide better performance than linear complexity, because the STL containers are always sorted. In this case, however, the underlying container maintained by the ClearSilver C API is unordered. Consequently, this performance guarrantee cannot be provided. Nevertheless, this function provides conformance to the associated container interface, even though it cannot provide enhanced performance guarrantees.

Definition at line 131 of file HDFAttributes.cc.

HDFAttributes::iterator ClearSilver::HDFAttributes::find const key_type key  ) 
 

Find the first element equal to key?

Bug:
The STL suggests that the corresponding function for associative containers may provide better performance than linear complexity, because the STL containers are always sorted. In this case, however, the underlying container maintained by the ClearSilver C API is unordered. Consequently, this performance guarrantee cannot be provided. Nevertheless, this function provides conformance to the associated container interface, even though it cannot provide enhanced performance guarrantees.

Definition at line 118 of file HDFAttributes.cc.

Referenced by insert(), and operator[]().


The documentation for this class was generated from the following files:
Generated on Tue May 16 14:50:54 2006 for ClearSilver C++ Library by  doxygen 1.4.5