CifString.h
Go to the documentation of this file.
//$$FILE$$
//$$VERSION$$
//$$DATE$$
//$$LICENSE$$
#ifndef CIFSTRING_H
#define CIFSTRING_H
#include <string>
#include <vector>
class CifString
{
public:
static const char PREFIX_CHAR = '_';
static const char JOIN_CHAR = '.';
static const char NULL_CHAR = '?';
static const char NOT_APPROPRIATE_CHAR = '.';
static const std::string CIF_DDL_CATEGORY_BLOCK;
static const std::string CIF_DDL_CATEGORY_DATABLOCK;
static const std::string CIF_DDL_CATEGORY_DATABLOCK_METHODS;
static const std::string CIF_DDL_CATEGORY_ITEM;
static const std::string CIF_DDL_CATEGORY_ITEM_LINKED;
static const std::string CIF_DDL_CATEGORY_PDBX_ITEM_LINKED_GROUP;
static const std::string CIF_DDL_CATEGORY_PDBX_ITEM_LINKED_GROUP_LIST;
static const std::string CIF_DDL_CATEGORY_CATEGORY;
static const std::string CIF_DDL_CATEGORY_CATEGORY_EXAMPLES;
static const std::string CIF_DDL_CATEGORY_NDB_CATEGORY_EXAMPLES;
static const std::string CIF_DDL_CATEGORY_CATEGORY_KEY;
static const std::string CIF_DDL_CATEGORY_CATEGORY_GROUP;
static const std::string CIF_DDL_CATEGORY_CATEGORY_GROUP_LIST;
static const std::string CIF_DDL_CATEGORY_CATEGORY_METHODS;
static const std::string CIF_DDL_CATEGORY_SUB_CATEGORY;
static const std::string CIF_DDL_CATEGORY_SUB_CATEGORY_EXAMPLES;
static const std::string CIF_DDL_CATEGORY_SUB_CATEGORY_METHODS;
static const std::string CIF_DDL_CATEGORY_ITEM_SUB_CATEGORY;
static const std::string CIF_DDL_CATEGORY_ITEM_TYPE;
static const std::string CIF_DDL_CATEGORY_ITEM_TYPE_CONDITIONS;
static const std::string CIF_DDL_CATEGORY_ITEM_METHODS;
static const std::string CIF_DDL_CATEGORY_ITEM_TYPE_LIST;
static const std::string CIF_DDL_CATEGORY_ITEM_STRUCTURE;
static const std::string CIF_DDL_CATEGORY_ITEM_STRUCTURE_LIST;
static const std::string CIF_DDL_CATEGORY_ITEM_DESCRIPTION;
static const std::string CIF_DDL_CATEGORY_NDB_ITEM_DESCRIPTION;
static const std::string CIF_DDL_CATEGORY_NDB_CATEGORY_DESCRIPTION;
static const std::string CIF_DDL_CATEGORY_ITEM_EXAMPLES;
static const std::string CIF_DDL_CATEGORY_NDB_ITEM_EXAMPLES;
static const std::string CIF_DDL_CATEGORY_ITEM_DEPENDENT;
static const std::string CIF_DDL_CATEGORY_ITEM_RELATED;
static const std::string CIF_DDL_CATEGORY_ITEM_RANGE;
static const std::string CIF_DDL_CATEGORY_ITEM_ENUMERATION;
static const std::string CIF_DDL_CATEGORY_NDB_ITEM_ENUMERATION;
static const std::string CIF_DDL_CATEGORY_ITEM_DEFAULT;
static const std::string CIF_DDL_CATEGORY_ITEM_ALIASES;
static const std::string CIF_DDL_CATEGORY_DICTIONARY;
static const std::string CIF_DDL_CATEGORY_DICTIONARY_HISTORY;
static const std::string CIF_DDL_CATEGORY_ITEM_UNITS;
static const std::string CIF_DDL_CATEGORY_ITEM_UNITS_LIST;
static const std::string CIF_DDL_CATEGORY_ITEM_UNITS_CONVERSION;
static const std::string CIF_DDL_CATEGORY_METHOD_LIST;
static const std::string CIF_DDL_ITEM_ID;
static const std::string CIF_DDL_ITEM_CATEGORY_ID;
static const std::string CIF_DDL_ITEM_SUB_CATEGORY_ID;
static const std::string CIF_DDL_ITEM_METHOD_ID;
static const std::string CIF_DDL_ITEM_PARENT_NAME;
static const std::string CIF_DDL_ITEM_CHILD_NAME;
static const std::string CIF_DDL_ITEM_CHILD_CATEGORY_ID;
static const std::string CIF_DDL_ITEM_PARENT_CATEGORY_ID;
static const std::string CIF_DDL_ITEM_LINK_GROUP_ID;
static const std::string CIF_DDL_ITEM_LABEL;
static const std::string CIF_DDL_ITEM_CONTEXT;
static const std::string CIF_DDL_ITEM_CONDITION_ID;
static const std::string CIF_DDL_ITEM_ALIAS_NAME;
static const std::string CIF_DDL_ITEM_DICTIONARY;
static const std::string CIF_DDL_ITEM_TITLE;
static const std::string CIF_DDL_ITEM_VERSION;
static const std::string CIF_DDL_ITEM_NAME;
static const std::string CIF_DDL_ITEM_CODE;
static const std::string CIF_DDL_ITEM_PRIMITIVE_CODE;
static const std::string CIF_DDL_ITEM_CONSTRUCT;
static const std::string CIF_DDL_ITEM_ORGANIZATION;
static const std::string CIF_DDL_ITEM_INDEX;
static const std::string CIF_DDL_ITEM_DIMENSION;
static const std::string CIF_DDL_ITEM_DATABLOCK_ID;
static const std::string CIF_DDL_ITEM_DESCRIPTION;
static const std::string CIF_DDL_ITEM_NDB_DESCRIPTION;
static const std::string CIF_DDL_ITEM_CASE;
static const std::string CIF_DDL_ITEM_MANDATORY_CODE;
static const std::string CIF_DDL_ITEM_DETAIL;
static const std::string CIF_DDL_ITEM_MAXIMUM;
static const std::string CIF_DDL_ITEM_MINIMUM;
static const std::string CIF_DDL_ITEM_VALUE;
static const std::string CIF_DDL_ITEM_DEPENDENT_NAME;
static const std::string CIF_DDL_ITEM_RELATED_NAME;
static const std::string CIF_DDL_ITEM_FUNCTION_CODE;
static const std::string CIF_DDL_ITEM_OFFSET;
static const std::string CIF_DDL_ITEM_OPERATOR;
static const std::string CIF_DDL_ITEM_FACTOR;
static const std::string CIF_DDL_ITEM_FROM_CODE;
static const std::string CIF_DDL_ITEM_TO_CODE;
static const std::string CIF_DDL_ITEM_UPDATE;
static const std::string CIF_DDL_ITEM_REVISION;
static const std::string CIF_DDL_ITEM_INLINE;
static const std::string CIF_DDL_ITEM_LANGUAGE;
static const std::string CIF_DDL_ITEM_PARENT_ID;
static const std::string UnknownValue;
static const std::string InapplicableValue;
static void MakeCifItem(std::string& cifItem,
const std::string& categoryName, const std::string& itemName);
static void MakeCifItems(std::vector<std::string>& cifItems,
const std::string& categoryName,
const std::vector<std::string>& attribsNames);
static void GetItemFromCifItem(std::string& keyword,
const std::string& itemName);
static void GetCategoryFromCifItem(std::string& categoryName,
const std::string& itemName);
static bool IsEmptyValue(const std::string& value);
static bool IsUnknownValue(const std::string& value);
static bool IsSpecialChar(const char charValue);
static bool IsSpecialFirstChar(const char charValue);
};
#endif
CifString::CIF_DDL_CATEGORY_CATEGORY
static const std::string CIF_DDL_CATEGORY_CATEGORY
Definition: CifString.h:46
CifString::CIF_DDL_ITEM_CODE
static const std::string CIF_DDL_ITEM_CODE
Definition: CifString.h:99
CifString::CIF_DDL_CATEGORY_DATABLOCK_METHODS
static const std::string CIF_DDL_CATEGORY_DATABLOCK_METHODS
Definition: CifString.h:41
CifString::CIF_DDL_ITEM_CATEGORY_ID
static const std::string CIF_DDL_ITEM_CATEGORY_ID
Definition: CifString.h:83
CifString::CIF_DDL_CATEGORY_ITEM_DEFAULT
static const std::string CIF_DDL_CATEGORY_ITEM_DEFAULT
Definition: CifString.h:73
CifString::CIF_DDL_CATEGORY_SUB_CATEGORY
static const std::string CIF_DDL_CATEGORY_SUB_CATEGORY
Definition: CifString.h:53
CifString::PREFIX_CHAR
static const char PREFIX_CHAR
Definition: CifString.h:33
CifString::NOT_APPROPRIATE_CHAR
static const char NOT_APPROPRIATE_CHAR
Definition: CifString.h:37
CifString::CIF_DDL_ITEM_TO_CODE
static const std::string CIF_DDL_ITEM_TO_CODE
Definition: CifString.h:121
CifString::MakeCifItems
static void MakeCifItems(std::vector< std::string > &cifItems, const std::string &categoryName, const std::vector< std::string > &attribsNames)
CifString::CIF_DDL_CATEGORY_ITEM_METHODS
static const std::string CIF_DDL_CATEGORY_ITEM_METHODS
Definition: CifString.h:59
CifString::CIF_DDL_ITEM_TITLE
static const std::string CIF_DDL_ITEM_TITLE
Definition: CifString.h:96
CifString::CIF_DDL_CATEGORY_ITEM_RELATED
static const std::string CIF_DDL_CATEGORY_ITEM_RELATED
Definition: CifString.h:69
CifString::CIF_DDL_CATEGORY_DATABLOCK
static const std::string CIF_DDL_CATEGORY_DATABLOCK
Definition: CifString.h:40
CifString::CIF_DDL_ITEM_DESCRIPTION
static const std::string CIF_DDL_ITEM_DESCRIPTION
Definition: CifString.h:106
CifString::CIF_DDL_CATEGORY_ITEM_SUB_CATEGORY
static const std::string CIF_DDL_CATEGORY_ITEM_SUB_CATEGORY
Definition: CifString.h:56
CifString::CIF_DDL_CATEGORY_ITEM_STRUCTURE
static const std::string CIF_DDL_CATEGORY_ITEM_STRUCTURE
Definition: CifString.h:61
CifString::CIF_DDL_CATEGORY_CATEGORY_EXAMPLES
static const std::string CIF_DDL_CATEGORY_CATEGORY_EXAMPLES
Definition: CifString.h:47
CifString::CIF_DDL_ITEM_PRIMITIVE_CODE
static const std::string CIF_DDL_ITEM_PRIMITIVE_CODE
Definition: CifString.h:100
CifString::CIF_DDL_ITEM_CASE
static const std::string CIF_DDL_ITEM_CASE
Definition: CifString.h:108
CifString::CIF_DDL_ITEM_ORGANIZATION
static const std::string CIF_DDL_ITEM_ORGANIZATION
Definition: CifString.h:102
CifString::CIF_DDL_CATEGORY_NDB_ITEM_EXAMPLES
static const std::string CIF_DDL_CATEGORY_NDB_ITEM_EXAMPLES
Definition: CifString.h:67
CifString::CIF_DDL_ITEM_MINIMUM
static const std::string CIF_DDL_ITEM_MINIMUM
Definition: CifString.h:112
CifString::CIF_DDL_ITEM_CHILD_NAME
static const std::string CIF_DDL_ITEM_CHILD_NAME
Definition: CifString.h:87
CifString::NULL_CHAR
static const char NULL_CHAR
Definition: CifString.h:36
CifString::CIF_DDL_ITEM_DETAIL
static const std::string CIF_DDL_ITEM_DETAIL
Definition: CifString.h:110
CifString::CIF_DDL_CATEGORY_ITEM_UNITS_CONVERSION
static const std::string CIF_DDL_CATEGORY_ITEM_UNITS_CONVERSION
Definition: CifString.h:79
CifString::CIF_DDL_ITEM_OPERATOR
static const std::string CIF_DDL_ITEM_OPERATOR
Definition: CifString.h:118
CifString::CIF_DDL_ITEM_FROM_CODE
static const std::string CIF_DDL_ITEM_FROM_CODE
Definition: CifString.h:120
CifString::CIF_DDL_CATEGORY_SUB_CATEGORY_METHODS
static const std::string CIF_DDL_CATEGORY_SUB_CATEGORY_METHODS
Definition: CifString.h:55
CifString::CIF_DDL_ITEM_PARENT_NAME
static const std::string CIF_DDL_ITEM_PARENT_NAME
Definition: CifString.h:86
CifString
Public class that contains CIF string related static methods.
Definition: CifString.h:30
CifString::CIF_DDL_CATEGORY_ITEM_RANGE
static const std::string CIF_DDL_CATEGORY_ITEM_RANGE
Definition: CifString.h:70
CifString::CIF_DDL_CATEGORY_NDB_ITEM_ENUMERATION
static const std::string CIF_DDL_CATEGORY_NDB_ITEM_ENUMERATION
Definition: CifString.h:72
CifString::CIF_DDL_ITEM_VERSION
static const std::string CIF_DDL_ITEM_VERSION
Definition: CifString.h:97
CifString::CIF_DDL_CATEGORY_PDBX_ITEM_LINKED_GROUP
static const std::string CIF_DDL_CATEGORY_PDBX_ITEM_LINKED_GROUP
Definition: CifString.h:44
CifString::CIF_DDL_CATEGORY_BLOCK
static const std::string CIF_DDL_CATEGORY_BLOCK
Definition: CifString.h:39
CifString::CIF_DDL_ITEM_LABEL
static const std::string CIF_DDL_ITEM_LABEL
Definition: CifString.h:91
CifString::CIF_DDL_ITEM_DIMENSION
static const std::string CIF_DDL_ITEM_DIMENSION
Definition: CifString.h:104
CifString::CIF_DDL_CATEGORY_ITEM_EXAMPLES
static const std::string CIF_DDL_CATEGORY_ITEM_EXAMPLES
Definition: CifString.h:66
CifString::CIF_DDL_CATEGORY_CATEGORY_GROUP_LIST
static const std::string CIF_DDL_CATEGORY_CATEGORY_GROUP_LIST
Definition: CifString.h:51
CifString::CIF_DDL_CATEGORY_METHOD_LIST
static const std::string CIF_DDL_CATEGORY_METHOD_LIST
Definition: CifString.h:80
CifString::CIF_DDL_ITEM_DATABLOCK_ID
static const std::string CIF_DDL_ITEM_DATABLOCK_ID
Definition: CifString.h:105
CifString::CIF_DDL_CATEGORY_ITEM_LINKED
static const std::string CIF_DDL_CATEGORY_ITEM_LINKED
Definition: CifString.h:43
CifString::CIF_DDL_ITEM_DICTIONARY
static const std::string CIF_DDL_ITEM_DICTIONARY
Definition: CifString.h:95
CifString::IsSpecialFirstChar
static bool IsSpecialFirstChar(const char charValue)
CifString::CIF_DDL_CATEGORY_CATEGORY_METHODS
static const std::string CIF_DDL_CATEGORY_CATEGORY_METHODS
Definition: CifString.h:52
CifString::CIF_DDL_ITEM_DEPENDENT_NAME
static const std::string CIF_DDL_ITEM_DEPENDENT_NAME
Definition: CifString.h:114
CifString::CIF_DDL_ITEM_CONSTRUCT
static const std::string CIF_DDL_ITEM_CONSTRUCT
Definition: CifString.h:101
CifString::CIF_DDL_CATEGORY_ITEM_UNITS_LIST
static const std::string CIF_DDL_CATEGORY_ITEM_UNITS_LIST
Definition: CifString.h:78
CifString::CIF_DDL_ITEM_RELATED_NAME
static const std::string CIF_DDL_ITEM_RELATED_NAME
Definition: CifString.h:115
CifString::CIF_DDL_CATEGORY_ITEM_DEPENDENT
static const std::string CIF_DDL_CATEGORY_ITEM_DEPENDENT
Definition: CifString.h:68
CifString::InapplicableValue
static const std::string InapplicableValue
Definition: CifString.h:129
CifString::CIF_DDL_CATEGORY_ITEM_UNITS
static const std::string CIF_DDL_CATEGORY_ITEM_UNITS
Definition: CifString.h:77
CifString::IsSpecialChar
static bool IsSpecialChar(const char charValue)
CifString::CIF_DDL_CATEGORY_ITEM_TYPE_LIST
static const std::string CIF_DDL_CATEGORY_ITEM_TYPE_LIST
Definition: CifString.h:60
CifString::CIF_DDL_ITEM_FACTOR
static const std::string CIF_DDL_ITEM_FACTOR
Definition: CifString.h:119
CifString::CIF_DDL_ITEM_ALIAS_NAME
static const std::string CIF_DDL_ITEM_ALIAS_NAME
Definition: CifString.h:94
CifString::MakeCifItem
static void MakeCifItem(std::string &cifItem, const std::string &categoryName, const std::string &itemName)
CifString::CIF_DDL_CATEGORY_ITEM
static const std::string CIF_DDL_CATEGORY_ITEM
Definition: CifString.h:42
CifString::CIF_DDL_CATEGORY_CATEGORY_GROUP
static const std::string CIF_DDL_CATEGORY_CATEGORY_GROUP
Definition: CifString.h:50
CifString::CIF_DDL_CATEGORY_ITEM_TYPE
static const std::string CIF_DDL_CATEGORY_ITEM_TYPE
Definition: CifString.h:57
CifString::CIF_DDL_ITEM_PARENT_CATEGORY_ID
static const std::string CIF_DDL_ITEM_PARENT_CATEGORY_ID
Definition: CifString.h:89
CifString::CIF_DDL_ITEM_NDB_DESCRIPTION
static const std::string CIF_DDL_ITEM_NDB_DESCRIPTION
Definition: CifString.h:107
CifString::CIF_DDL_CATEGORY_ITEM_DESCRIPTION
static const std::string CIF_DDL_CATEGORY_ITEM_DESCRIPTION
Definition: CifString.h:63
CifString::CIF_DDL_ITEM_CHILD_CATEGORY_ID
static const std::string CIF_DDL_ITEM_CHILD_CATEGORY_ID
Definition: CifString.h:88
CifString::CIF_DDL_ITEM_UPDATE
static const std::string CIF_DDL_ITEM_UPDATE
Definition: CifString.h:122
CifString::CIF_DDL_CATEGORY_PDBX_ITEM_LINKED_GROUP_LIST
static const std::string CIF_DDL_CATEGORY_PDBX_ITEM_LINKED_GROUP_LIST
Definition: CifString.h:45
CifString::CIF_DDL_ITEM_CONTEXT
static const std::string CIF_DDL_ITEM_CONTEXT
Definition: CifString.h:92
CifString::CIF_DDL_CATEGORY_ITEM_ENUMERATION
static const std::string CIF_DDL_CATEGORY_ITEM_ENUMERATION
Definition: CifString.h:71
CifString::CIF_DDL_ITEM_SUB_CATEGORY_ID
static const std::string CIF_DDL_ITEM_SUB_CATEGORY_ID
Definition: CifString.h:84
CifString::IsEmptyValue
static bool IsEmptyValue(const std::string &value)
CifString::CIF_DDL_ITEM_FUNCTION_CODE
static const std::string CIF_DDL_ITEM_FUNCTION_CODE
Definition: CifString.h:116
CifString::CIF_DDL_CATEGORY_DICTIONARY_HISTORY
static const std::string CIF_DDL_CATEGORY_DICTIONARY_HISTORY
Definition: CifString.h:76
CifString::CIF_DDL_ITEM_ID
static const std::string CIF_DDL_ITEM_ID
Definition: CifString.h:82
CifString::JOIN_CHAR
static const char JOIN_CHAR
Definition: CifString.h:34
CifString::CIF_DDL_CATEGORY_ITEM_ALIASES
static const std::string CIF_DDL_CATEGORY_ITEM_ALIASES
Definition: CifString.h:74
CifString::CIF_DDL_ITEM_VALUE
static const std::string CIF_DDL_ITEM_VALUE
Definition: CifString.h:113
CifString::CIF_DDL_ITEM_PARENT_ID
static const std::string CIF_DDL_ITEM_PARENT_ID
Definition: CifString.h:126
CifString::IsUnknownValue
static bool IsUnknownValue(const std::string &value)
CifString::CIF_DDL_ITEM_NAME
static const std::string CIF_DDL_ITEM_NAME
Definition: CifString.h:98
CifString::CIF_DDL_ITEM_REVISION
static const std::string CIF_DDL_ITEM_REVISION
Definition: CifString.h:123
CifString::CIF_DDL_CATEGORY_DICTIONARY
static const std::string CIF_DDL_CATEGORY_DICTIONARY
Definition: CifString.h:75
CifString::CIF_DDL_ITEM_INLINE
static const std::string CIF_DDL_ITEM_INLINE
Definition: CifString.h:124
CifString::CIF_DDL_CATEGORY_NDB_ITEM_DESCRIPTION
static const std::string CIF_DDL_CATEGORY_NDB_ITEM_DESCRIPTION
Definition: CifString.h:64
CifString::CIF_DDL_ITEM_CONDITION_ID
static const std::string CIF_DDL_ITEM_CONDITION_ID
Definition: CifString.h:93
CifString::CIF_DDL_CATEGORY_NDB_CATEGORY_DESCRIPTION
static const std::string CIF_DDL_CATEGORY_NDB_CATEGORY_DESCRIPTION
Definition: CifString.h:65
CifString::CIF_DDL_ITEM_LANGUAGE
static const std::string CIF_DDL_ITEM_LANGUAGE
Definition: CifString.h:125
CifString::CIF_DDL_ITEM_MAXIMUM
static const std::string CIF_DDL_ITEM_MAXIMUM
Definition: CifString.h:111
CifString::CIF_DDL_CATEGORY_ITEM_STRUCTURE_LIST
static const std::string CIF_DDL_CATEGORY_ITEM_STRUCTURE_LIST
Definition: CifString.h:62
CifString::UnknownValue
static const std::string UnknownValue
Definition: CifString.h:128
CifString::CIF_DDL_CATEGORY_CATEGORY_KEY
static const std::string CIF_DDL_CATEGORY_CATEGORY_KEY
Definition: CifString.h:49
CifString::CIF_DDL_ITEM_LINK_GROUP_ID
static const std::string CIF_DDL_ITEM_LINK_GROUP_ID
Definition: CifString.h:90
CifString::CIF_DDL_CATEGORY_ITEM_TYPE_CONDITIONS
static const std::string CIF_DDL_CATEGORY_ITEM_TYPE_CONDITIONS
Definition: CifString.h:58
CifString::CIF_DDL_ITEM_OFFSET
static const std::string CIF_DDL_ITEM_OFFSET
Definition: CifString.h:117
CifString::GetCategoryFromCifItem
static void GetCategoryFromCifItem(std::string &categoryName, const std::string &itemName)
CifString::CIF_DDL_ITEM_MANDATORY_CODE
static const std::string CIF_DDL_ITEM_MANDATORY_CODE
Definition: CifString.h:109
CifString::CIF_DDL_ITEM_METHOD_ID
static const std::string CIF_DDL_ITEM_METHOD_ID
Definition: CifString.h:85
CifString::CIF_DDL_CATEGORY_NDB_CATEGORY_EXAMPLES
static const std::string CIF_DDL_CATEGORY_NDB_CATEGORY_EXAMPLES
Definition: CifString.h:48
CifString::GetItemFromCifItem
static void GetItemFromCifItem(std::string &keyword, const std::string &itemName)
CifString::CIF_DDL_ITEM_INDEX
static const std::string CIF_DDL_ITEM_INDEX
Definition: CifString.h:103
CifString::CIF_DDL_CATEGORY_SUB_CATEGORY_EXAMPLES
static const std::string CIF_DDL_CATEGORY_SUB_CATEGORY_EXAMPLES
Definition: CifString.h:54