librcsb-core-wrapper 1.005
DictObjContInfo.h
Go to the documentation of this file.
1//$$FILE$$
2//$$VERSION$$
3//$$DATE$$
4//$$LICENSE$$
5
6
15#ifndef DICTOBJCONTINFO_H
16#define DICTOBJCONTINFO_H
17
18
19#include <string>
20#include <map>
21
22#include <rcsb/Serializer.h>
23#include <rcsb/rcsb_types.h>
24#include <rcsb/CifString.h>
25
26
40{
41 public:
47 class Item
48 {
49 public:
50 std::string descr;
51 std::string itemName;
52 };
53
59 class Cat
60 {
61 public:
62 std::string catName;
63 std::string col1;
66 std::vector<Item> items;
67 };
68
69 std::string _objContInfoDescr;
70
71 std::vector<Cat> _cats;
72
73 std::map<std::pair<std::string, std::string>, std::pair<unsigned int,
74 unsigned int> > _catMap;
75
80 void AddCat(const std::string& catName);
81
86 void AddCat(const std::string& catName, const std::string& col1,
87 const bool nonDefaultValue = false, const bool inheritance = false);
88
93 void AddItem(const std::string& descr, const std::string& itemName);
94
99 unsigned int GetItemIndex(const std::string& catName,
100 const std::string& itemName) const;
101
106 std::pair<unsigned int, unsigned int> GetItemIndices(
107 const std::string& catName, const std::string& itemName) const;
108
109#ifndef VLAD_PYTHON_GLUE
114 virtual ~ObjContInfo();
115#endif
116
117 protected:
123
124 private:
125 std::vector<Cat>::iterator currCat;
126};
127
128
136{
137 public:
139
140 private:
143
145
146 DictObjContInfo& operator=(const DictObjContInfo& in);
147};
148
149
157{
158 public:
160
161 private:
164
166
167 CatObjContInfo& operator=(const CatObjContInfo& in);
168};
169
170
178{
179 public:
181
182 private:
185
187
188 SubcatObjContInfo& operator=(const SubcatObjContInfo& in);
189};
190
191
199{
200 public:
202
203 private:
206
208
209 ItemObjContInfo& operator=(const ItemObjContInfo& in);
210};
211
212
213#endif // DICTOBJCONTINFO_H
Private class that represents an information class for the category object container.
Definition: DictObjContInfo.h:157
static CatObjContInfo & GetInstance()
Private class that represents an information class for the dictionary object container.
Definition: DictObjContInfo.h:136
static DictObjContInfo & GetInstance()
Private class that represents an information class for the item object container.
Definition: DictObjContInfo.h:199
static ItemObjContInfo & GetInstance()
Private class that represents a category.
Definition: DictObjContInfo.h:60
bool inheritance
Definition: DictObjContInfo.h:65
std::string col1
Definition: DictObjContInfo.h:63
std::vector< Item > items
Definition: DictObjContInfo.h:66
std::string catName
Definition: DictObjContInfo.h:62
bool nonDefaultValue
Definition: DictObjContInfo.h:64
Private class that represents an item.
Definition: DictObjContInfo.h:48
std::string itemName
Definition: DictObjContInfo.h:51
std::string descr
Definition: DictObjContInfo.h:50
Public class that represents a generic information class for the generic object container.
Definition: DictObjContInfo.h:40
unsigned int GetItemIndex(const std::string &catName, const std::string &itemName) const
std::vector< Cat > _cats
Definition: DictObjContInfo.h:71
void AddCat(const std::string &catName)
std::pair< unsigned int, unsigned int > GetItemIndices(const std::string &catName, const std::string &itemName) const
std::string _objContInfoDescr
Definition: DictObjContInfo.h:69
void AddItem(const std::string &descr, const std::string &itemName)
void AddCat(const std::string &catName, const std::string &col1, const bool nonDefaultValue=false, const bool inheritance=false)
std::map< std::pair< std::string, std::string >, std::pair< unsigned int, unsigned int > > _catMap
Definition: DictObjContInfo.h:74
virtual ~ObjContInfo()
Private class that represents an information class for the sub-category object container.
Definition: DictObjContInfo.h:178
static SubcatObjContInfo & GetInstance()