Dictionary Class Template Reference

#include <dictionary.hpp>

Inheritance diagram for Dictionary:

DefaultElementDictionary List of all members.

Public Types

typedef Dictionary< IDType > self_type
typedef IDType id_type
typedef data_map::value_type value_type
typedef data_map::const_iterator const_iterator
typedef data_map::const_reverse_iterator const_reverse_iterator

Public Member Functions

 Dictionary (bool case_sensitive=true)
 Dictionary (self_type const &d)
virtual ~Dictionary ()
const_iterator begin () const
const_iterator end () const
const_reverse_iterator rbegin () const
const_reverse_iterator rend () const
virtual const_iterator find (id_type id) const
virtual const_iterator find (std::string const &sym) const
id_type get_type (std::string const &name)
 Get the type ID for a name, creating a new ID if necessary.
virtual bool insert (value_type const &vt)
virtual bool add_alternate_symbol (id_type id, std::string const &symbol)
virtual void clear ()

Protected Member Functions

bool update_index (std::string const &s, typename data_map::iterator i)
std::string make_upper_case (std::string const &s) const

template<typename IDType>
class BTK::IO::Dictionary< IDType >


Member Typedef Documentation

typedef Dictionary<IDType> self_type

typedef IDType id_type

Reimplemented in DefaultElementDictionary.

typedef data_map::value_type value_type

Reimplemented in DefaultElementDictionary.

typedef data_map::const_iterator const_iterator

Reimplemented in DefaultElementDictionary.

typedef data_map::const_reverse_iterator const_reverse_iterator


Constructor & Destructor Documentation

Dictionary ( bool  case_sensitive = true  ) 

Dictionary ( self_type const &  d  ) 

virtual ~Dictionary (  )  [virtual]


Member Function Documentation

const_iterator begin (  )  const

const_iterator end (  )  const

const_reverse_iterator rbegin (  )  const

const_reverse_iterator rend (  )  const

virtual const_iterator find ( id_type  id  )  const [virtual]

virtual const_iterator find ( std::string const &  sym  )  const [virtual]

id_type get_type ( std::string const &  name  ) 

Get the type ID for a name, creating a new ID if necessary.

Like find(), this method will attempt to find the type ID corresponding to a name. Unlike find(), it will also attempt to add a new type ID to the dictionary, if the initial search fails.

Type IDs are added iff the type is dynamic (i.e., new type ID values can be created), and the dictionary is mutable. Otherwise the unknown type ID value (determined using BTK::UTILITY::TypeIDTraits) is returned.

virtual bool insert ( value_type const &  vt  )  [virtual]

virtual bool add_alternate_symbol ( id_type  id,
std::string const &  symbol 
) [virtual]

virtual void clear (  )  [virtual]

bool update_index ( std::string const &  s,
typename data_map::iterator  i 
) [protected]

std::string make_upper_case ( std::string const &  s  )  const [protected]


The documentation for this class was generated from the following file:
Generated on Sun Jul 15 20:46:35 2007 for BTK Core by  doxygen 1.5.1