NCBI C++ ToolKit
Public Types | Public Member Functions | Private Attributes | List of all members
CEnumeratedTypeValues Class Reference

Search Toolkit Book for CEnumeratedTypeValues

#include <serial/enumvalues.hpp>

+ Collaboration diagram for CEnumeratedTypeValues:

Public Types

enum  EValueFlags { eNone = 0 , eHideName = 1 }
 
typedef list< pair< string, TEnumValueType > > TValues
 
typedef map< CTempString, TEnumValueType, PQuickStringLessTNameToValue
 
typedef map< TEnumValueType, const string * > TValueToName
 
typedef unsigned int TValueFlags
 Binary OR of EValueFlags. More...
 

Public Member Functions

 CEnumeratedTypeValues (const char *name, bool isInteger)
 
 CEnumeratedTypeValues (const string &name, bool isInteger)
 
 ~CEnumeratedTypeValues (void)
 
const stringGetName (void) const
 
const stringGetModuleName (void) const
 Get ASN.1 module name. More...
 
void SetModuleName (const string &name)
 Set ASN.1 module name. More...
 
bool IsInteger (void) const
 Check whether the type is defined as INTEGER in ASN.1 spec. More...
 
bool IsInternal (void) const
 Check if this enum describes internal unnamed type. More...
 
const stringGetInternalName (void) const
 Return internal type access string e.g. Int-fuzz.lim. More...
 
const stringGetInternalModuleName (void) const
 Return internal type's owner module name. More...
 
void SetInternalName (const string &name)
 Mark this enum as internal. More...
 
const stringGetAccessName (void) const
 Return internal or regular name. More...
 
const stringGetAccessModuleName (void) const
 Return internal or regular module name. More...
 
const TValuesGetValues (void) const
 Get the list of name-value pairs. More...
 
void AddValue (const string &name, TEnumValueType value, TValueFlags flags=eNone)
 Add name-value pair. More...
 
void AddValue (const char *name, TEnumValueType value, TValueFlags flags=eNone)
 Add name-value pair. More...
 
TEnumValueType FindValue (const CTempString &name) const
 Find numeric value by the name of the enum. More...
 
bool IsValidName (const CTempString &name) const
 Check whether enum with this name is defined. More...
 
const stringFindName (TEnumValueType value, bool allowBadValue) const
 Find name of the enum by its numeric value. More...
 
string GetDisplayName (TEnumValueType value) const
 
const TNameToValueNameToValue (void) const
 Get name-to-value map. More...
 
const TValueToNameValueToName (void) const
 Get value-to-name map. More...
 
void ClearIndexes (void)
 
void SetBitset (bool bitset=true)
 
bool IsBitset (void) const
 
TValueFlags GetValueFlags (TEnumValueType) const
 
const stringFindNameEx (TEnumValueType value, bool allowBadValue) const
 

Private Attributes

string m_Name
 
string m_ModuleName
 
bool m_Integer
 
bool m_IsBitset
 
bool m_IsInternal
 
TValues m_Values
 
map< TEnumValueType, TValueFlagsm_ValueFlags
 
atomic< TNameToValue * > m_NameToValue
 
atomic< TValueToName * > m_ValueToName
 

Detailed Description

Definition at line 51 of file enumvalues.hpp.


The documentation for this class was generated from the following files:
Modified on Sun Apr 21 03:41:34 2024 by modify_doxy.py rev. 669887