00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00023
00024 #ifndef BTK_IO_TYPE_SYSTEM_HPP
00025 #define BTK_IO_TYPE_SYSTEM_HPP
00026
00027 namespace BTK {
00028 namespace IO {
00029
00046 template <typename ElementDictionaryType,
00047 typename AtomDictionaryType,
00048 typename MonomerDictionaryType,
00049 typename StructureDictionaryType>
00050 class TypeSystem
00051 {
00052 public:
00053 typedef ElementDictionaryType element_dictionary;
00054 typedef AtomDictionaryType atom_dictionary;
00055 typedef MonomerDictionaryType monomer_dictionary;
00056 typedef StructureDictionaryType structure_dictionary;
00057
00058 typedef typename element_dictionary::id_type element_id_type;
00059 typedef typename atom_dictionary::id_type atom_id_type;
00060 typedef typename monomer_dictionary::id_type monomer_id_type;
00061 typedef typename structure_dictionary::id_type structure_id_type;
00062
00063 typedef TypeSystem<element_dictionary,
00064 atom_dictionary,
00065 monomer_dictionary,
00066 structure_dictionary> self_type;
00067
00068 TypeSystem() {}
00069 TypeSystem(element_dictionary const & ed,
00070 atom_dictionary const & ad,
00071 monomer_dictionary const & md,
00072 structure_dictionary const & sd) :
00073 _ed(ed), _ad(ad), _md(md), _sd(sd) {}
00074
00075 virtual ~TypeSystem() {}
00076
00077 element_dictionary & get_element_dictionary() { return _ed; }
00078 atom_dictionary & get_atom_dictionary() { return _ad; }
00079 monomer_dictionary & get_monomer_dictionary() { return _md; }
00080 structure_dictionary & get_structure_dictionary() { return _sd; }
00081
00082 element_dictionary const & get_element_dictionary() const { return _ed; }
00083 atom_dictionary const & get_atom_dictionary() const { return _ad; }
00084 monomer_dictionary const & get_monomer_dictionary() const { return _md; }
00085 structure_dictionary const & get_structure_dictionary() const { return _sd; }
00086
00087 private:
00088 element_dictionary _ed;
00089 atom_dictionary _ad;
00090 monomer_dictionary _md;
00091 structure_dictionary _sd;
00092 };
00093
00094 }
00095 }
00096
00097 #endif