TypeSystemProxy Class Template Reference

A class for representing TypeSystem objects by reference. More...

#include <type_system_proxy.hpp>

List of all members.

Public Types

typedef TS type_system
typedef TypeSystemProxy< type_systemself_type
TypeSystem type definitions.
typedef type_system::element_dictionary element_dictionary
typedef type_system::atom_dictionary atom_dictionary
typedef type_system::monomer_dictionary monomer_dictionary
typedef type_system::structure_dictionary structure_dictionary
typedef element_dictionary::id_type element_id_type
typedef atom_dictionary::id_type atom_id_type
typedef monomer_dictionary::id_type monomer_id_type
typedef structure_dictionary::id_type structure_id_type

Public Member Functions

 TypeSystemProxy ()
 Default constructor.
 TypeSystemProxy (self_type const &src)
 Copy constructor.
 TypeSystemProxy (type_system const &ts)
 Construct from a TypeSystem instance.
self_type clone () const
 Deep-copy the proxied TypeSystem object.
bool operator== (self_type const &rhs) const
bool operator!= (self_type const &rhs) const
TypeSystem interface methods.
element_dictionaryget_element_dictionary ()
atom_dictionaryget_atom_dictionary ()
monomer_dictionaryget_monomer_dictionary ()
structure_dictionaryget_structure_dictionary ()
element_dictionary const & get_element_dictionary () const
atom_dictionary const & get_atom_dictionary () const
monomer_dictionary const & get_monomer_dictionary () const
structure_dictionary const & get_structure_dictionary () const


Detailed Description

template<typename TS>
class BTK::IO::TypeSystemProxy< TS >

A class for representing TypeSystem objects by reference.

This class differs from a simple reference in two ways:

These properties allow it to be used in objects that must be default constructible (e.g. BTK::ATOMS::Atom), while still appearing as a normal TypeSystem object. Any object compliant with the TypeSystemConcept can be proxied by this class.

Internally, the proxied TypeSystem is stored via a reference-counted pointer. You are therefore guaranteed that a proxied TypeSystem will not be deallocated until the last proxy referring to the TypeSystem is destroyed.


Member Typedef Documentation

typedef TS type_system

typedef TypeSystemProxy<type_system> self_type

typedef type_system::element_dictionary element_dictionary

typedef type_system::atom_dictionary atom_dictionary

typedef type_system::monomer_dictionary monomer_dictionary

typedef type_system::structure_dictionary structure_dictionary

typedef element_dictionary::id_type element_id_type

typedef atom_dictionary::id_type atom_id_type

typedef monomer_dictionary::id_type monomer_id_type

typedef structure_dictionary::id_type structure_id_type


Constructor & Destructor Documentation

TypeSystemProxy (  ) 

Default constructor.

A new TypeSystem is created.

TypeSystemProxy ( self_type const &  src  ) 

Copy constructor.

A new proxy is created, referring to the same TypeSystem held in the src proxy.

TypeSystemProxy ( type_system const &  ts  ) 

Construct from a TypeSystem instance.

The source TypeSystem is copied, and this copy is used to create a new TypeSystemProxy. Thus, changes to the original TypeSystem will not be reflected in the proxy object.


Member Function Documentation

element_dictionary& get_element_dictionary (  ) 

atom_dictionary& get_atom_dictionary (  ) 

monomer_dictionary& get_monomer_dictionary (  ) 

structure_dictionary& get_structure_dictionary (  ) 

element_dictionary const& get_element_dictionary (  )  const

atom_dictionary const& get_atom_dictionary (  )  const

monomer_dictionary const& get_monomer_dictionary (  )  const

structure_dictionary const& get_structure_dictionary (  )  const

self_type clone (  )  const

Deep-copy the proxied TypeSystem object.

bool operator== ( self_type const &  rhs  )  const

bool operator!= ( self_type const &  rhs  )  const


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