#include <type_system_proxy.hpp>
Public Types | |
| typedef TS | type_system |
| typedef TypeSystemProxy< type_system > | self_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_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 |
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.
| 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 |
| 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.
| 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.
1.5.1