DictObjContInfo.h
Go to the documentation of this file.
//$$FILE$$
//$$VERSION$$
//$$DATE$$
//$$LICENSE$$
#ifndef DICTOBJCONTINFO_H
#define DICTOBJCONTINFO_H
#include <string>
#include <map>
#include <rcsb/Serializer.h>
#include <rcsb/rcsb_types.h>
#include <rcsb/CifString.h>
class ObjContInfo
{
public:
class Item
{
public:
std::string descr;
std::string itemName;
};
class Cat
{
public:
std::string catName;
std::string col1;
bool nonDefaultValue;
bool inheritance;
std::vector<Item> items;
};
std::string _objContInfoDescr;
std::vector<Cat> _cats;
std::map<std::pair<std::string, std::string>, std::pair<unsigned int,
unsigned int> > _catMap;
void AddCat(const std::string& catName);
void AddCat(const std::string& catName, const std::string& col1,
const bool nonDefaultValue = false, const bool inheritance = false);
void AddItem(const std::string& descr, const std::string& itemName);
unsigned int GetItemIndex(const std::string& catName,
const std::string& itemName) const;
std::pair<unsigned int, unsigned int> GetItemIndices(
const std::string& catName, const std::string& itemName) const;
#ifndef VLAD_PYTHON_GLUE
virtual ~ObjContInfo();
#endif
protected:
ObjContInfo();
private:
std::vector<Cat>::iterator currCat;
};
class DictObjContInfo : public ObjContInfo
{
public:
static DictObjContInfo& GetInstance();
private:
DictObjContInfo();
DictObjContInfo(const DictObjContInfo& in);
~DictObjContInfo();
DictObjContInfo& operator=(const DictObjContInfo& in);
};
class CatObjContInfo : public ObjContInfo
{
public:
static CatObjContInfo& GetInstance();
private:
CatObjContInfo();
CatObjContInfo(const CatObjContInfo& in);
~CatObjContInfo();
CatObjContInfo& operator=(const CatObjContInfo& in);
};
class SubcatObjContInfo : public ObjContInfo
{
public:
static SubcatObjContInfo& GetInstance();
private:
SubcatObjContInfo();
SubcatObjContInfo(const SubcatObjContInfo& in);
~SubcatObjContInfo();
SubcatObjContInfo& operator=(const SubcatObjContInfo& in);
};
class ItemObjContInfo : public ObjContInfo
{
public:
static ItemObjContInfo& GetInstance();
private:
ItemObjContInfo();
ItemObjContInfo(const ItemObjContInfo& in);
~ItemObjContInfo();
ItemObjContInfo& operator=(const ItemObjContInfo& in);
};
#endif // DICTOBJCONTINFO_H
CifString.h
Serializer.h
CatObjContInfo
Private class that represents an information class for the category object container.
Definition: DictObjContInfo.h:157
CatObjContInfo::GetInstance
static CatObjContInfo & GetInstance()
DictObjContInfo
Private class that represents an information class for the dictionary object container.
Definition: DictObjContInfo.h:136
DictObjContInfo::GetInstance
static DictObjContInfo & GetInstance()
ItemObjContInfo
Private class that represents an information class for the item object container.
Definition: DictObjContInfo.h:199
ItemObjContInfo::GetInstance
static ItemObjContInfo & GetInstance()
ObjContInfo::Cat
Private class that represents a category.
Definition: DictObjContInfo.h:60
ObjContInfo::Cat::inheritance
bool inheritance
Definition: DictObjContInfo.h:65
ObjContInfo::Cat::col1
std::string col1
Definition: DictObjContInfo.h:63
ObjContInfo::Cat::items
std::vector< Item > items
Definition: DictObjContInfo.h:66
ObjContInfo::Cat::catName
std::string catName
Definition: DictObjContInfo.h:62
ObjContInfo::Cat::nonDefaultValue
bool nonDefaultValue
Definition: DictObjContInfo.h:64
ObjContInfo::Item
Private class that represents an item.
Definition: DictObjContInfo.h:48
ObjContInfo::Item::itemName
std::string itemName
Definition: DictObjContInfo.h:51
ObjContInfo::Item::descr
std::string descr
Definition: DictObjContInfo.h:50
ObjContInfo
Public class that represents a generic information class for the generic object container.
Definition: DictObjContInfo.h:40
ObjContInfo::GetItemIndex
unsigned int GetItemIndex(const std::string &catName, const std::string &itemName) const
ObjContInfo::_cats
std::vector< Cat > _cats
Definition: DictObjContInfo.h:71
ObjContInfo::AddCat
void AddCat(const std::string &catName)
ObjContInfo::GetItemIndices
std::pair< unsigned int, unsigned int > GetItemIndices(const std::string &catName, const std::string &itemName) const
ObjContInfo::_objContInfoDescr
std::string _objContInfoDescr
Definition: DictObjContInfo.h:69
ObjContInfo::AddItem
void AddItem(const std::string &descr, const std::string &itemName)
ObjContInfo::AddCat
void AddCat(const std::string &catName, const std::string &col1, const bool nonDefaultValue=false, const bool inheritance=false)
ObjContInfo::ObjContInfo
ObjContInfo()
ObjContInfo::_catMap
std::map< std::pair< std::string, std::string >, std::pair< unsigned int, unsigned int > > _catMap
Definition: DictObjContInfo.h:74
ObjContInfo::~ObjContInfo
virtual ~ObjContInfo()
SubcatObjContInfo
Private class that represents an information class for the sub-category object container.
Definition: DictObjContInfo.h:178
SubcatObjContInfo::GetInstance
static SubcatObjContInfo & GetInstance()
rcsb_types.h