NCBI C++ ToolKit
Classes | Typedefs | Enumerations | Enumerator | Functions | Variables | Friends
Application Registry
+ Collaboration diagram for Application Registry:

Classes

class  IEnvRegMapper
 IEnvRegMapper –. More...
 
class  CEnvironmentRegistry
 CEnvironmentRegistry –. More...
 
class  CSimpleEnvRegMapper
 CSimpleEnvRegMapper –. More...
 
class  CNcbiEnvRegMapper
 CNcbiEnvRegMapper –. More...
 
class  IRegistry
 IRegistry –. More...
 
class  IRWRegistry
 IRWRegistry –. More...
 
class  CMemoryRegistry
 CMemoryRegistry –. More...
 
struct  CMemoryRegistry::SEntry
 
struct  CMemoryRegistry::SSection
 
class  CCompoundRegistry
 CCompoundRegistry –. More...
 
class  CTwoLayerRegistry
 CTwoLayerRegistry –. More...
 
class  CCompoundRWRegistry
 CCompoundRWRegistry –. More...
 
class  CNcbiRegistry
 CNcbiRegistry –. More...
 
class  CRegistryException
 CRegistryException –. More...
 
class  CRegistryReadGuard
 CRegistry{Read,Write}Guard –. More...
 

Typedefs

typedef int CEnvironmentRegistry::TPriority
 Not restricted to ePriority_*. More...
 
typedef multimap< TPriority, CConstRef< IEnvRegMapper > > CEnvironmentRegistry::TPriorityMap
 
typedef int IRegistry::TFlags
 Binary OR of "EFlags". More...
 
typedef void(IRegistry::* IRegistry::FLockAction) (void)
 
typedef map< string, SEntry, PNocase_ConditionalCMemoryRegistry::TEntries
 
typedef map< string, SSection, PNocase_ConditionalCMemoryRegistry::TSections
 
typedef int CCompoundRegistry::TPriority
 Not restricted to ePriority_*. More...
 
typedef multimap< TPriority, CRef< IRegistry > > CCompoundRegistry::TPriorityMap
 
typedef map< string, CRef< IRegistry > > CCompoundRegistry::TNameMap
 
typedef CRef< IRWRegistryCTwoLayerRegistry::CRegRef
 
typedef int CCompoundRWRegistry::TPriority
 Not restricted to ePriority_*. More...
 
typedef map< string, TFlagsCCompoundRWRegistry::TClearedEntries
 
typedef CGuard< IRegistry, SSimpleReadLock< IRegistry > > CRegistryReadGuard::TParent
 
typedef CGuard< IRegistry, SSimpleWriteLock< IRegistry > > CRegistryWriteGuard
 

Enumerations

enum  CEnvironmentRegistry::EPriority { CEnvironmentRegistry::ePriority_Min = kMin_Int , CEnvironmentRegistry::ePriority_Default = 0 , CEnvironmentRegistry::ePriority_Max = kMax_Int }
 
enum  IRegistry::EFlags {
  IRegistry::fTransient = 0x1 , IRegistry::fPersistent = 0x100 , IRegistry::fOverride = 0x2 , IRegistry::fNoOverride = 0x200 ,
  IRegistry::fTruncate = 0x4 , IRegistry::fNoTruncate = 0x400 , IRegistry::fJustCore = 0x8 , IRegistry::fNotJustCore = 0x800 ,
  IRegistry::fIgnoreErrors = 0x10 , IRegistry::fInternalSpaces = 0x20 , IRegistry::fWithNcbirc = 0x40 , IRegistry::fCountCleared = 0x80 ,
  IRegistry::fSectionCase = 0x1000 , IRegistry::fEntryCase = 0x2000 , IRegistry::fSectionlessEntries = 0x4000 , IRegistry::fSections = 0x8000 ,
  IRegistry::fPlaintextAllowed = 0x10000 , IRegistry::fInSectionComments = 0x20000 , IRegistry::fInternalCheckedAndLocked = 0x40000 , IRegistry::fCoreLayers = fTransient | fPersistent | fJustCore ,
  IRegistry::fAllLayers = fTransient | fPersistent | fNotJustCore , IRegistry::fCaseFlags = fSectionCase | fEntryCase
}
 Flags controlling the behavior of registry methods. More...
 
enum  IRegistry::EErrAction { IRegistry::eThrow , IRegistry::eErrPost , IRegistry::eReturn }
 What to do if parameter value is present but cannot be converted into the requested type. More...
 
enum  IRegistry::EMasks { IRegistry::fLayerFlags = fAllLayers | fJustCore , IRegistry::fTPFlags = fTransient | fPersistent }
 
enum  IRWRegistry::EOperation { IRWRegistry::eClear , IRWRegistry::eRead , IRWRegistry::eSet }
 Categories of modifying operations. More...
 
enum  CCompoundRegistry::EPriority { CCompoundRegistry::ePriority_Min = kMin_Int , CCompoundRegistry::ePriority_Default = 0 , CCompoundRegistry::ePriority_Max = kMax_Int }
 Priority for sub-registries; entries in higher-priority sub-registries take precedence over (identically named) entries in lower-priority ones. More...
 
enum  CCompoundRWRegistry::EPriority { CCompoundRWRegistry::ePriority_MinUser = CCompoundRegistry::ePriority_Min , CCompoundRWRegistry::ePriority_Default = CCompoundRegistry::ePriority_Default , CCompoundRWRegistry::ePriority_MaxUser = CCompoundRegistry::ePriority_Max - 0x10000 , CCompoundRWRegistry::ePriority_Reserved }
 Priority for sub-registries; entries in higher-priority sub-registries take precedence over (identically named) entries in lower-priority ones. More...
 
enum  CNcbiRegistry::ECompatFlags {
  CNcbiRegistry::eTransient = fTransient , CNcbiRegistry::ePersistent = fPersistent , CNcbiRegistry::eOverride = fOverride , CNcbiRegistry::eNoOverride = fNoOverride ,
  CNcbiRegistry::eTruncate = fTruncate , CNcbiRegistry::eNoTruncate = fNoTruncate
}
 
enum  CNcbiRegistry::EReservedPriority { CNcbiRegistry::ePriority_File = ePriority_Reserved , CNcbiRegistry::ePriority_Overrides , CNcbiRegistry::ePriority_Environment , CNcbiRegistry::ePriority_RuntimeOverrides }
 
enum  CRegistryException::EErrCode {
  CRegistryException::eSection , CRegistryException::eEntry , CRegistryException::eValue , CRegistryException::eUnencrypted ,
  CRegistryException::eDecryptionFailed , CRegistryException::eErr
}
 Error types that the Registry can generate. More...
 

Functions

virtual string IEnvRegMapper::RegToEnv (const string &section, const string &name) const =0
 Returns empty strings for unsupported (section, name) pairs. More...
 
virtual bool IEnvRegMapper::EnvToReg (const string &env, string &section, string &name) const =0
 The return value indicates whether the environment variable was appropriately formatted. More...
 
virtual string IEnvRegMapper::GetPrefix (void) const
 Can be overriden to speed enumeration. More...
 
 CEnvironmentRegistry::CEnvironmentRegistry (TFlags flags=0)
 Constructors. More...
 
 CEnvironmentRegistry::CEnvironmentRegistry (CNcbiEnvironment &env, EOwnership own=eNoOwnership, TFlags flags=0)
 
 CEnvironmentRegistry::~CEnvironmentRegistry ()
 Destructor. More...
 
void CEnvironmentRegistry::AddMapper (const IEnvRegMapper &mapper, TPriority prio=ePriority_Default)
 
void CEnvironmentRegistry::RemoveMapper (const IEnvRegMapper &mapper)
 
bool CEnvironmentRegistry::x_Empty (TFlags flags) const
 Implementations of the fundamental operations above, to be run with the lock already acquired and some basic sanity checks performed. More...
 
bool CEnvironmentRegistry::x_Modified (TFlags flags) const
 
void CEnvironmentRegistry::x_SetModifiedFlag (bool modified, TFlags flags)
 
const stringCEnvironmentRegistry::x_Get (const string &section, const string &name, TFlags flags) const
 
const stringCEnvironmentRegistry::x_Get (const string &section, const string &name, TFlags flags, bool &found) const
 
bool CEnvironmentRegistry::x_HasEntry (const string &section, const string &name, TFlags flags) const
 
const stringCEnvironmentRegistry::x_GetComment (const string &section, const string &name, TFlags flags) const
 
void CEnvironmentRegistry::x_Enumerate (const string &section, list< string > &entries, TFlags flags) const
 
void CEnvironmentRegistry::x_ChildLockAction (FLockAction action)
 
void CEnvironmentRegistry::x_Clear (TFlags flags)
 Called locked, like the virtual methods inherited from IRegistry. More...
 
bool CEnvironmentRegistry::x_Set (const string &section, const string &name, const string &value, TFlags flags, const string &comment)
 
bool CEnvironmentRegistry::x_Unset (const string &section, const string &name, TFlags flags)
 
bool CEnvironmentRegistry::x_SetComment (const string &comment, const string &section, const string &name, TFlags flags)
 
 CEnvironmentRegistry::CEnvironmentRegistry (const CEnvironmentRegistry &)
 Copying prohibited. More...
 
 CSimpleEnvRegMapper::CSimpleEnvRegMapper (const string &section, const string &prefix, const string &suffix=kEmptyStr)
 
string CSimpleEnvRegMapper::RegToEnv (const string &section, const string &name) const
 Returns empty strings for unsupported (section, name) pairs. More...
 
bool CSimpleEnvRegMapper::EnvToReg (const string &env, string &section, string &name) const
 The return value indicates whether the environment variable was appropriately formatted. More...
 
string CSimpleEnvRegMapper::GetPrefix (void) const
 Can be overriden to speed enumeration. More...
 
string CNcbiEnvRegMapper::RegToEnv (const string &section, const string &name) const
 Returns empty strings for unsupported (section, name) pairs. More...
 
bool CNcbiEnvRegMapper::EnvToReg (const string &env, string &section, string &name) const
 The return value indicates whether the environment variable was appropriately formatted. More...
 
string CNcbiEnvRegMapper::GetPrefix (void) const
 Can be overriden to speed enumeration. More...
 
bool IRegistry::Empty (TFlags flags=fAllLayers) const
 Verify if Registry is empty. More...
 
bool IRegistry::Modified (TFlags flags=fPersistent) const
 Verify if persistent values have been modified. More...
 
void IRegistry::SetModifiedFlag (bool modified, TFlags flags=fPersistent)
 Indicate whether any relevant values are out of sync with some external resource (typically a configuration file). More...
 
bool IRegistry::Write (CNcbiOstream &os, TFlags flags=0) const
 Write the registry content to output stream. More...
 
virtual const stringIRegistry::Get (const string &section, const string &name, TFlags flags=0) const
 Get the parameter value. More...
 
virtual bool IRegistry::HasEntry (const string &section, const string &name=kEmptyStr, TFlags flags=0) const
 
virtual string IRegistry::GetString (const string &section, const string &name, const string &default_value, TFlags flags=0) const
 Get the parameter string value. More...
 
string IRegistry::GetEncryptedString (const string &section, const string &name, TFlags flags=0, const string &password=kEmptyStr) const
 Get a value that was (potentially) stored encrypted. More...
 
virtual int IRegistry::GetInt (const string &section, const string &name, int default_value, TFlags flags=0, EErrAction err_action=eThrow) const
 Get integer value of specified parameter name. More...
 
virtual bool IRegistry::GetBool (const string &section, const string &name, bool default_value, TFlags flags=0, EErrAction err_action=eThrow) const
 Get boolean value of specified parameter name. More...
 
virtual double IRegistry::GetDouble (const string &section, const string &name, double default_value, TFlags flags=0, EErrAction err_action=eThrow) const
 Get double value of specified parameter name. More...
 
virtual const stringIRegistry::GetComment (const string &section=kEmptyStr, const string &name=kEmptyStr, TFlags flags=0) const
 Get comment of the registry entry "section:name". More...
 
virtual void IRegistry::EnumerateInSectionComments (const string &section, list< string > *comments, TFlags flags=fAllLayers) const
 Enumerate in-section comments. More...
 
virtual void IRegistry::EnumerateSections (list< string > *sections, TFlags flags=fAllLayers) const
 Enumerate section names. More...
 
virtual void IRegistry::EnumerateEntries (const string &section, list< string > *entries, TFlags flags=fAllLayers) const
 Enumerate parameter names for a specified section. More...
 
void IRegistry::ReadLock (void)
 Support for locking. More...
 
void IRegistry::WriteLock (void)
 
void IRegistry::Unlock (void)
 
static bool IRegistry::IsNameSection (const string &str, TFlags flags)
 Check if "str" consists of alphanumeric and '_' only Treat the case of set fSectionlessEntries separately. More...
 
static bool IRegistry::IsNameEntry (const string &str, TFlags flags)
 
static void IRegistry::x_CheckFlags (const string &func, TFlags &flags, TFlags allowed)
 
virtual bool IRegistry::x_Empty (TFlags flags) const =0
 Implementations of the fundamental operations above, to be run with the lock already acquired and some basic sanity checks performed. More...
 
virtual bool IRegistry::x_Modified (TFlags) const
 
virtual void IRegistry::x_SetModifiedFlag (bool, TFlags)
 
virtual const stringIRegistry::x_Get (const string &section, const string &name, TFlags flags) const =0
 
virtual bool IRegistry::x_HasEntry (const string &section, const string &name, TFlags flags) const =0
 
virtual const stringIRegistry::x_GetComment (const string &section, const string &name, TFlags flags) const =0
 
virtual void IRegistry::x_Enumerate (const string &section, list< string > &entries, TFlags flags) const =0
 
virtual void IRegistry::x_ChildLockAction (FLockAction)
 
static TFlags IRWRegistry::AssessImpact (TFlags flags, EOperation op)
 Indicate which portions of the registry the given operation would affect. More...
 
void IRWRegistry::Clear (TFlags flags=fAllLayers)
 Reset the registry content. More...
 
IRWRegistryIRWRegistry::Read (CNcbiIstream &is, TFlags flags=0, const string &path=kEmptyStr)
 Read and parse the stream "is", and merge its content with current Registry entries. More...
 
bool IRWRegistry::Set (const string &section, const string &name, const string &value, TFlags flags=0, const string &comment=kEmptyStr)
 Set the configuration parameter value. More...
 
bool IRWRegistry::Unset (const string &section, const string &name, TFlags flags=0)
 Fully unset the configuration parameter value, so that HasEntry returns false. More...
 
bool IRWRegistry::SetComment (const string &comment, const string &section=kEmptyStr, const string &name=kEmptyStr, TFlags flags=0)
 Set comment "comment" for the registry entry "section:name". More...
 
virtual void IRWRegistry::x_Clear (TFlags flags)=0
 Called locked, like the virtual methods inherited from IRegistry. More...
 
virtual bool IRWRegistry::x_Set (const string &section, const string &name, const string &value, TFlags flags, const string &comment)=0
 
virtual bool IRWRegistry::x_Unset (const string &section, const string &name, TFlags flags)=0
 
virtual bool IRWRegistry::x_SetComment (const string &comment, const string &section, const string &name, TFlags flags)=0
 
virtual IRWRegistryIRWRegistry::x_Read (CNcbiIstream &is, TFlags flags, const string &path)
 Most implementations should not override this, but CNcbiRegistry must, to handle some special cases properly. More...
 
static bool IRWRegistry::MaybeSet (string &target, const string &value, TFlags flags)
 
 CMemoryRegistry::CMemoryRegistry (TFlags flags=0)
 
bool CMemoryRegistry::x_Empty (TFlags flags) const
 Implementations of the fundamental operations above, to be run with the lock already acquired and some basic sanity checks performed. More...
 
bool CMemoryRegistry::x_Modified (TFlags) const
 
void CMemoryRegistry::x_SetModifiedFlag (bool modified, TFlags)
 
const stringCMemoryRegistry::x_Get (const string &section, const string &name, TFlags flags) const
 
bool CMemoryRegistry::x_HasEntry (const string &section, const string &name, TFlags flags) const
 
const stringCMemoryRegistry::x_GetComment (const string &section, const string &name, TFlags flags) const
 
void CMemoryRegistry::x_Enumerate (const string &section, list< string > &entries, TFlags flags) const
 
void CMemoryRegistry::x_Clear (TFlags flags)
 Called locked, like the virtual methods inherited from IRegistry. More...
 
bool CMemoryRegistry::x_Set (const string &section, const string &name, const string &value, TFlags flags, const string &comment)
 
bool CMemoryRegistry::x_Unset (const string &section, const string &name, TFlags flags)
 
bool CMemoryRegistry::x_SetComment (const string &comment, const string &section, const string &name, TFlags flags)
 
 CMemoryRegistry::SSection::SSection (TFlags flags)
 
 CCompoundRegistry::CCompoundRegistry ()
 
void CCompoundRegistry::Add (const IRegistry &reg, TPriority prio=ePriority_Default, const string &name=kEmptyStr)
 Non-empty names must be unique within each compound registry, but there is no limit to the number of anonymous sub-registries. More...
 
void CCompoundRegistry::Remove (const IRegistry &reg)
 Remove sub-registry "reg". More...
 
TPriority CCompoundRegistry::GetCoreCutoff (void) const
 Subregistries whose priority is less than the core cutoff (ePriority_Default by default) will be ignored for fJustCore operations, such as Write by default. More...
 
void CCompoundRegistry::SetCoreCutoff (TPriority prio)
 
CConstRef< IRegistryCCompoundRegistry::FindByName (const string &name) const
 Return a pointer to the sub-registry with the given name, or NULL if not found. More...
 
CConstRef< IRegistryCCompoundRegistry::FindByContents (const string &section, const string &entry=kEmptyStr, TFlags flags=0) const
 Return a pointer to the highest-priority sub-registry with a section named SECTION containing (if ENTRY is non-empty) an entry named ENTRY, or NULL if not found. More...
 
bool CCompoundRegistry::x_Empty (TFlags flags) const
 True iff all sub-registries are empty. More...
 
bool CCompoundRegistry::x_Modified (TFlags flags) const
 True iff any sub-registry is modified. More...
 
void CCompoundRegistry::x_SetModifiedFlag (bool modified, TFlags flags)
 
const stringCCompoundRegistry::x_Get (const string &section, const string &name, TFlags flags) const
 
bool CCompoundRegistry::x_HasEntry (const string &section, const string &name, TFlags flags) const
 
const stringCCompoundRegistry::x_GetComment (const string &section, const string &name, TFlags flags) const
 
void CCompoundRegistry::x_Enumerate (const string &section, list< string > &entries, TFlags flags) const
 
void CCompoundRegistry::x_ChildLockAction (FLockAction action)
 
 CTwoLayerRegistry::CTwoLayerRegistry (IRWRegistry *persistent=0, TFlags flags=0)
 Constructor. More...
 
bool CTwoLayerRegistry::x_Empty (TFlags flags) const
 Implementations of the fundamental operations above, to be run with the lock already acquired and some basic sanity checks performed. More...
 
bool CTwoLayerRegistry::x_Modified (TFlags flags) const
 
void CTwoLayerRegistry::x_SetModifiedFlag (bool modified, TFlags flags)
 
const stringCTwoLayerRegistry::x_Get (const string &section, const string &name, TFlags flags) const
 
bool CTwoLayerRegistry::x_HasEntry (const string &section, const string &name, TFlags flags) const
 
const stringCTwoLayerRegistry::x_GetComment (const string &section, const string &name, TFlags flags) const
 
void CTwoLayerRegistry::x_Enumerate (const string &section, list< string > &entries, TFlags flags) const
 
void CTwoLayerRegistry::x_ChildLockAction (FLockAction action)
 
void CTwoLayerRegistry::x_Clear (TFlags flags)
 Called locked, like the virtual methods inherited from IRegistry. More...
 
bool CTwoLayerRegistry::x_Set (const string &section, const string &name, const string &value, TFlags flags, const string &comment)
 
bool CTwoLayerRegistry::x_Unset (const string &section, const string &name, TFlags flags)
 
bool CTwoLayerRegistry::x_SetComment (const string &comment, const string &section, const string &name, TFlags flags)
 
 CCompoundRWRegistry::CCompoundRWRegistry (TFlags m_Flags=0)
 Constructor. More...
 
 CCompoundRWRegistry::~CCompoundRWRegistry ()
 Destructor. More...
 
TPriority CCompoundRWRegistry::GetCoreCutoff (void) const
 Subregistries whose priority is less than the core cutoff (ePriority_Reserved by default) will be ignored for fJustCore operations, such as Write by default. More...
 
void CCompoundRWRegistry::SetCoreCutoff (TPriority prio)
 
void CCompoundRWRegistry::Add (const IRegistry &reg, TPriority prio=ePriority_Default, const string &name=kEmptyStr)
 Non-empty names must be unique within each compound registry, but there is no limit to the number of anonymous sub-registries. More...
 
void CCompoundRWRegistry::Remove (const IRegistry &reg)
 Remove sub-registry "reg". More...
 
CConstRef< IRegistryCCompoundRWRegistry::FindByName (const string &name) const
 Return a pointer to the sub-registry with the given name, or NULL if not found. More...
 
CConstRef< IRegistryCCompoundRWRegistry::FindByContents (const string &section, const string &entry=kEmptyStr, TFlags flags=0) const
 Return a pointer to the highest-priority sub-registry with a section named SECTION containing (if ENTRY is non-empty) an entry named ENTRY, or NULL if not found. More...
 
bool CCompoundRWRegistry::LoadBaseRegistries (TFlags flags=0, int metareg_flags=0, const string &path=kEmptyStr)
 Load any base registries listed in [NCBI].Inherits; returns true if able to load at least one, false otherwise. More...
 
bool CCompoundRWRegistry::x_Empty (TFlags flags) const
 Implementations of the fundamental operations above, to be run with the lock already acquired and some basic sanity checks performed. More...
 
bool CCompoundRWRegistry::x_Modified (TFlags flags) const
 
void CCompoundRWRegistry::x_SetModifiedFlag (bool modified, TFlags flags)
 
const stringCCompoundRWRegistry::x_Get (const string &section, const string &name, TFlags flags) const
 
bool CCompoundRWRegistry::x_HasEntry (const string &section, const string &name, TFlags flags) const
 
const stringCCompoundRWRegistry::x_GetComment (const string &section, const string &name, TFlags flags) const
 
void CCompoundRWRegistry::x_Enumerate (const string &section, list< string > &entries, TFlags flags) const
 
void CCompoundRWRegistry::x_ChildLockAction (FLockAction action)
 
void CCompoundRWRegistry::x_Clear (TFlags flags)
 Called locked, like the virtual methods inherited from IRegistry. More...
 
bool CCompoundRWRegistry::x_Set (const string &section, const string &name, const string &value, TFlags flags, const string &comment)
 
bool CCompoundRWRegistry::x_Unset (const string &section, const string &name, TFlags flags)
 
bool CCompoundRWRegistry::x_SetComment (const string &comment, const string &section, const string &name, TFlags flags)
 
IRWRegistryCCompoundRWRegistry::x_Read (CNcbiIstream &is, TFlags flags, const string &path)
 Most implementations should not override this, but CNcbiRegistry must, to handle some special cases properly. More...
 
void CCompoundRWRegistry::x_Add (const IRegistry &reg, TPriority prio=ePriority_Default, const string &name=kEmptyStr)
 Add an internal high-priority subregistry. More...
 
 CNcbiRegistry::CNcbiRegistry (TFlags flags=0)
 Constructor. More...
 
 CNcbiRegistry::CNcbiRegistry (CNcbiIstream &is, TFlags flags=0, const string &path=kEmptyStr)
 Constructor. More...
 
 CNcbiRegistry::~CNcbiRegistry ()
 
bool CNcbiRegistry::IncludeNcbircIfAllowed (TFlags flags=fWithNcbirc)
 Attempt to load a systemwide configuration file (.ncbirc on Unix, ncbi.ini on Windows) as a low-priority registry, as long as the following conditions all hold: More...
 
void CNcbiRegistry::x_Clear (TFlags flags)
 Called locked, like the virtual methods inherited from IRegistry. More...
 
IRWRegistryCNcbiRegistry::x_Read (CNcbiIstream &is, TFlags flags, const string &path)
 Most implementations should not override this, but CNcbiRegistry must, to handle some special cases properly. More...
 
const stringCNcbiRegistry::x_GetComment (const string &section, const string &name, TFlags flags) const
 
void CNcbiRegistry::x_Init (void)
 
virtual const char * CRegistryException::GetErrCodeString (void) const override
 Translate from the error code value to its string representation. More...
 
 CRegistryException::NCBI_EXCEPTION_DEFAULT2 (CRegistryException, CParseTemplException< CCoreException >, std::string::size_type)
 
 CRegistryReadGuard::CRegistryReadGuard (const IRegistry &reg)
 

Variables

AutoPtr< CNcbiEnvironmentCEnvironmentRegistry::m_Env
 
TPriorityMap CEnvironmentRegistry::m_PriorityMap
 
bool CEnvironmentRegistry::m_Modified
 only tracks mods made through this. More...
 
TFlags CEnvironmentRegistry::m_Flags
 
string CSimpleEnvRegMapper::m_Section
 
string CSimpleEnvRegMapper::m_Prefix
 
string CSimpleEnvRegMapper::m_Suffix
 
static const char * CNcbiEnvRegMapper::sm_Prefix = "NCBI_CONFIG_"
 
static const char * IRegistry::sm_InSectionCommentName = "[]"
 Entry name for an in-section comment. More...
 
CRWLock IRegistry::m_Lock
 
string CMemoryRegistry::SEntry::value
 
string CMemoryRegistry::SEntry::comment
 
string CMemoryRegistry::SSection::comment
 
string CMemoryRegistry::SSection::in_section_comment
 
TEntries CMemoryRegistry::SSection::entries
 
bool CMemoryRegistry::SSection::cleared
 
bool CMemoryRegistry::m_IsModified
 
string CMemoryRegistry::m_RegistryComment
 
TSections CMemoryRegistry::m_Sections
 
TFlags CMemoryRegistry::m_Flags
 
TPriorityMap CCompoundRegistry::m_PriorityMap
 
TNameMap CCompoundRegistry::m_NameMap
 excludes anonymous sub-registries More...
 
TPriority CCompoundRegistry::m_CoreCutoff
 
CRegRef CTwoLayerRegistry::m_Transient
 
CRegRef CTwoLayerRegistry::m_Persistent
 
static const char * CCompoundRWRegistry::sm_MainRegName = ".main"
 Predefined subregistry's name. More...
 
static const char * CCompoundRWRegistry::sm_BaseRegNamePrefix = ".base:"
 Prefix for any base registries' names. More...
 
TClearedEntries CCompoundRWRegistry::m_ClearedEntries
 
CRef< CTwoLayerRegistryCCompoundRWRegistry::m_MainRegistry
 
CRef< CCompoundRegistryCCompoundRWRegistry::m_AllRegistries
 
set< stringCCompoundRWRegistry::m_BaseRegNames
 
TFlags CCompoundRWRegistry::m_Flags
 
static const char * CNcbiRegistry::sm_EnvRegName = ".env"
 Predefined subregistries' names. More...
 
static const char * CNcbiRegistry::sm_FileRegName = ".file"
 
static const char * CNcbiRegistry::sm_OverrideRegName = ".overrides"
 
static const char * CNcbiRegistry::sm_SysRegName = ".ncbirc"
 
CRef< CEnvironmentRegistryCNcbiRegistry::m_EnvRegistry
 
CRef< CTwoLayerRegistryCNcbiRegistry::m_FileRegistry
 
CRef< IRWRegistryCNcbiRegistry::m_OverrideRegistry
 
CRef< IRWRegistryCNcbiRegistry::m_SysRegistry
 
unsigned int CNcbiRegistry::m_RuntimeOverrideCount
 
TFlags CNcbiRegistry::m_Flags
 

Friends

class CCompoundRegistry::CCompoundRWRegistry
 
string IRegistry::GetValue (const string &section, const string &name, const string &default_value, EErrAction=eReturn, TFlags flags=0) const
 Overloading of getters for generic programming. More...
 
int IRegistry::GetValue (const string &section, const string &name, int default_value, EErrAction err_action=eErrPost, TFlags flags=0) const
 
bool IRegistry::GetValue (const string &section, const string &name, bool default_value, EErrAction err_action=eErrPost, TFlags flags=0) const
 
double IRegistry::GetValue (const string &section, const string &name, double default_value, EErrAction err_action=eErrPost, TFlags flags=0) const
 
bool IRWRegistry::SetValue (const string &section, const string &name, const string &value, TFlags flags=0, const string &comment=kEmptyStr)
 Overloading of setters for generic programming. More...
 
bool IRWRegistry::SetValue (const string &section, const string &name, int value, TFlags flags=0, const string &comment=kEmptyStr)
 
bool IRWRegistry::SetValue (const string &section, const string &name, bool value, TFlags flags=0, const string &comment=kEmptyStr)
 
bool IRWRegistry::SetValue (const string &section, const string &name, double value, TFlags flags=0, const string &comment=kEmptyStr)
 

Detailed Description

Typedef Documentation

◆ CRegistryWriteGuard

Definition at line 1044 of file ncbireg.hpp.

◆ CRegRef

Definition at line 780 of file ncbireg.hpp.

◆ FLockAction

typedef void(IRegistry::* IRegistry::FLockAction) (void)
protected

Definition at line 388 of file ncbireg.hpp.

◆ TClearedEntries

Definition at line 889 of file ncbireg.hpp.

◆ TEntries

Definition at line 622 of file ncbireg.hpp.

◆ TFlags

Binary OR of "EFlags".

Definition at line 107 of file ncbireg.hpp.

◆ TNameMap

Definition at line 724 of file ncbireg.hpp.

◆ TParent

Definition at line 1038 of file ncbireg.hpp.

◆ TPriority [1/3]

Not restricted to ePriority_*.

Definition at line 102 of file env_reg.hpp.

◆ TPriority [2/3]

Not restricted to ePriority_*.

Definition at line 671 of file ncbireg.hpp.

◆ TPriority [3/3]

Not restricted to ePriority_*.

Definition at line 813 of file ncbireg.hpp.

◆ TPriorityMap [1/2]

Definition at line 136 of file env_reg.hpp.

◆ TPriorityMap [2/2]

Definition at line 723 of file ncbireg.hpp.

◆ TSections

Definition at line 633 of file ncbireg.hpp.

Enumeration Type Documentation

◆ ECompatFlags

Enumerator
eTransient 
ePersistent 
eOverride 
eNoOverride 
eTruncate 
eNoTruncate 

Definition at line 915 of file ncbireg.hpp.

◆ EErrAction

What to do if parameter value is present but cannot be converted into the requested type.

Enumerator
eThrow 

Throw an exception if an error occurs.

eErrPost 

Log the error message and return default value.

eReturn 

Return default value.

Definition at line 200 of file ncbireg.hpp.

◆ EErrCode

Error types that the Registry can generate.

Enumerator
eSection 

Section name format error.

eEntry 

Entry name format error.

eValue 

General value format error.

eUnencrypted 

Value should have been encrypted, but wasn't.

eDecryptionFailed 

Value looked encrypted, but decryption failed.

eErr 

Other error.

Definition at line 1008 of file ncbireg.hpp.

◆ EFlags

Flags controlling the behavior of registry methods.

Please note:

  • Although CNcbiRegistry supports a full complement of layers, other derived classes may ignore some or all level-related flags.
  • Most read-only operations consider all layers; the only exception is Write, which defaults to fPersistent and fJustCore.
  • The presence or absence of fSectionCase and fEntryCase is relevant ONLY when constructing new registry objects.
Enumerator
fTransient 

Transient – not saved by default.

fPersistent 

Persistent – saved when file is written.

fOverride 

Existing value can be overriden.

fNoOverride 

Cannot change existing value.

fTruncate 

Leading, trailing blanks can be truncated.

fNoTruncate 

Cannot truncate parameter value.

fJustCore 

Ignore auxiliary subregistries.

fNotJustCore 

Include auxiliary subregistries.

fIgnoreErrors 

Continue Read()ing after parse errors.

fInternalSpaces 

Allow internal whitespace in names.

fWithNcbirc 

Include .ncbirc (used only by CNcbiReg.)

fCountCleared 

Let explicitly cleared entries stand.

fSectionCase 

Create with case-sensitive section names.

fEntryCase 

Create with case-sensitive entry names.

fSectionlessEntries 

Allow empty section names (for test_res framework)

fSections 

Indicates that we want sections from x_Enumerate.

fPlaintextAllowed 
See also
GetEncryptedString()
fInSectionComments 

Indicates that we want in-section comments from x_Enumerate.

fInternalCheckedAndLocked 
fCoreLayers 
fAllLayers 
fCaseFlags 

Definition at line 82 of file ncbireg.hpp.

◆ EMasks

enum IRegistry::EMasks
protected
Enumerator
fLayerFlags 
fTPFlags 

Definition at line 365 of file ncbireg.hpp.

◆ EOperation

Categories of modifying operations.

Enumerator
eClear 
eRead 
eSet 

Definition at line 410 of file ncbireg.hpp.

◆ EPriority [1/3]

Enumerator
ePriority_Min 
ePriority_Default 
ePriority_Max 

Definition at line 97 of file env_reg.hpp.

◆ EPriority [2/3]

Priority for sub-registries; entries in higher-priority sub-registries take precedence over (identically named) entries in lower-priority ones.

Ties are broken arbitrarily.

Enumerator
ePriority_Min 
ePriority_Default 
ePriority_Max 

Definition at line 666 of file ncbireg.hpp.

◆ EPriority [3/3]

Priority for sub-registries; entries in higher-priority sub-registries take precedence over (identically named) entries in lower-priority ones.

Ties are broken arbitrarily.

Enumerator
ePriority_MinUser 
ePriority_Default 
ePriority_MaxUser 
ePriority_Reserved 

Everything greater is for internal use.

Definition at line 807 of file ncbireg.hpp.

◆ EReservedPriority

Enumerator
ePriority_File 
ePriority_Overrides 
ePriority_Environment 
ePriority_RuntimeOverrides 

Definition at line 977 of file ncbireg.hpp.

Function Documentation

◆ Add() [1/2]

void CCompoundRegistry::Add ( const IRegistry reg,
TPriority  prio = ePriority_Default,
const string name = kEmptyStr 
)

Non-empty names must be unique within each compound registry, but there is no limit to the number of anonymous sub-registries.

Sub-registries themselves may not (directly) appear more than once.

Definition at line 1186 of file ncbireg.cpp.

References multimap_checker< Container >::insert(), CCompoundRegistry::m_NameMap, CCompoundRegistry::m_PriorityMap, NCBI_THROW2, and CRef< C, Locker >::Reset().

Referenced by CSynRegistry::Add(), and CCompoundRWRegistry::x_Add().

◆ Add() [2/2]

void CCompoundRWRegistry::Add ( const IRegistry reg,
TPriority  prio = ePriority_Default,
const string name = kEmptyStr 
)

Non-empty names must be unique within each compound registry, but there is no limit to the number of anonymous sub-registries.

Sub-registries themselves may not (directly) appear more than once.

Definition at line 1779 of file ncbireg.cpp.

References CCompoundRWRegistry::ePriority_MaxUser, ERR_POST_X, NCBI_THROW2, Warning(), and CCompoundRWRegistry::x_Add().

Referenced by s_FindPathToGeneInfoFiles(), and s_FindPathToWM().

◆ AddMapper()

void CEnvironmentRegistry::AddMapper ( const IEnvRegMapper mapper,
TPriority  prio = ePriority_Default 
)

◆ AssessImpact()

IRegistry::TFlags IRWRegistry::AssessImpact ( TFlags  flags,
EOperation  op 
)
static

Indicate which portions of the registry the given operation would affect.

Definition at line 574 of file ncbireg.cpp.

References _TROUBLE, IRWRegistry::eClear, IRWRegistry::eRead, IRWRegistry::eSet, IRegistry::fJustCore, flags, IRegistry::fLayerFlags, IRegistry::fPersistent, IRegistry::fTPFlags, and IRegistry::fTransient.

Referenced by CMetaRegistry::Load(), and CMetaRegistry::SEntry::Reload().

◆ CCompoundRegistry()

CCompoundRegistry::CCompoundRegistry ( )
inline

Definition at line 656 of file ncbireg.hpp.

◆ CCompoundRWRegistry()

CCompoundRWRegistry::CCompoundRWRegistry ( TFlags  m_Flags = 0)

◆ CEnvironmentRegistry() [1/3]

CEnvironmentRegistry::CEnvironmentRegistry ( CNcbiEnvironment env,
EOwnership  own = eNoOwnership,
TFlags  flags = 0 
)

Definition at line 58 of file env_reg.cpp.

References CEnvironmentRegistry::AddMapper().

◆ CEnvironmentRegistry() [2/3]

CEnvironmentRegistry::CEnvironmentRegistry ( const CEnvironmentRegistry )
inlineprivate

Copying prohibited.

Definition at line 134 of file env_reg.hpp.

◆ CEnvironmentRegistry() [3/3]

CEnvironmentRegistry::CEnvironmentRegistry ( TFlags  flags = 0)

Constructors.

Definition at line 50 of file env_reg.cpp.

References CEnvironmentRegistry::AddMapper().

◆ Clear()

void IRWRegistry::Clear ( TFlags  flags = fAllLayers)

◆ CMemoryRegistry()

CMemoryRegistry::CMemoryRegistry ( TFlags  flags = 0)
inline

Definition at line 586 of file ncbireg.hpp.

◆ CNcbiRegistry() [1/2]

CNcbiRegistry::CNcbiRegistry ( CNcbiIstream is,
TFlags  flags = 0,
const string path = kEmptyStr 
)

Constructor.

Parameters
isInput stream to load the Registry from. NOTE: if the stream is a file, it must be opened in binary mode!
flagsHow parameters are stored. The default is to store all parameters as persistent unless the "eTransient" flag is set in which case the newly retrieved parameters are stored as transient.
pathWhere to look for base registries listed with relative paths.
See also
Read()

Definition at line 1615 of file ncbireg.cpp.

References IRegistry::fCaseFlags, IRegistry::fInternalSpaces, flags, IRegistry::fSectionlessEntries, IRegistry::fTransient, IRegistry::fWithNcbirc, CNcbiRegistry::IncludeNcbircIfAllowed(), CCompoundRWRegistry::LoadBaseRegistries(), CNcbiRegistry::m_FileRegistry, IRWRegistry::Read(), IRegistry::x_CheckFlags(), and CNcbiRegistry::x_Init().

◆ CNcbiRegistry() [2/2]

CNcbiRegistry::CNcbiRegistry ( TFlags  flags = 0)

Constructor.

Definition at line 1608 of file ncbireg.cpp.

References CNcbiRegistry::x_Init().

◆ CRegistryReadGuard()

CRegistryReadGuard::CRegistryReadGuard ( const IRegistry reg)
inline

Definition at line 1039 of file ncbireg.hpp.

◆ CSimpleEnvRegMapper()

CSimpleEnvRegMapper::CSimpleEnvRegMapper ( const string section,
const string prefix,
const string suffix = kEmptyStr 
)

Definition at line 290 of file env_reg.cpp.

◆ CTwoLayerRegistry()

CTwoLayerRegistry::CTwoLayerRegistry ( IRWRegistry persistent = 0,
TFlags  flags = 0 
)

Constructor.

The transient layer is always a new memory registry, and so is the persistent layer by default.

Definition at line 1365 of file ncbireg.cpp.

◆ Empty()

bool IRegistry::Empty ( TFlags  flags = fAllLayers) const

◆ EnumerateEntries()

void IRegistry::EnumerateEntries ( const string section,
list< string > *  entries,
TFlags  flags = fAllLayers 
) const
virtual

Enumerate parameter names for a specified section.

Write all parameter names for specified "section" to the "entries" list in order. Previous contents of the list are erased.

Deprecated:

Enumerates sections rather than entries if section is

empty and fSectionlessEntries is not set.

Parameters
flagsTo control search.

Reimplemented in CSynRegistryToIRegistry.

Definition at line 514 of file ncbireg.cpp.

References _ASSERT, _TRACE, entries, IRegistry::fCountCleared, IRegistry::fInternalSpaces, flags, IRegistry::fLayerFlags, IRegistry::fSectionlessEntries, IRegistry::fSections, IRegistry::fTPFlags, IRegistry::IsNameSection(), NStr::PrintableString(), NStr::TruncateSpaces(), IRegistry::x_CheckFlags(), and IRegistry::x_Enumerate().

Referenced by CDBLB_ServiceMapper::ConfigureFromRegistry(), CDBUDRandomMapper::ConfigureFromRegistry(), CDBUDPriorityMapper::ConfigureFromRegistry(), CConfig::ConvertRegToTree(), CPluginManager< TClass >::CPluginManager(), CDriverManager::CreateDsFrom(), CRemoteAppLauncher::CRemoteAppLauncher(), CSmallDNS::CSmallDNS(), CPtbRegistry::EnumerateEntries(), CSynRegistryToIRegistry::EnumerateEntries(), CRegistryFile::FromConfigFile(), GetDefaultLogLocation(), CCgiApplication::GetDefaultLogPath(), CIdMapperConfig::Initialize(), CColorTableMethod::Load(), CColumnScoringMethod::Load(), CMatrixScoringMethod::Load(), CStdAnnotTypes::LoadTypes(), NS_ValidateServiceToQueueSection(), SQueueParameters::ReadLinkedSections(), SQueueParameters::ReadQueue(), CNetScheduleServer::ReadServicesConfig(), CCgiRedirectApplication::RemapEntries(), IRegistry::Write(), CTwoLayerRegistry::x_Enumerate(), CDataTypeModule::x_GetVar(), CNcbiApplicationAPI::x_LogOptions(), CNcbiTestApplication::x_ReadConfiguration(), SPubseqGatewaySettings::x_ReadCountersSection(), CQueueDataBase::x_ReadLinkedSections(), and CNetScheduleDApp::x_SaveSection().

◆ EnumerateInSectionComments()

void IRegistry::EnumerateInSectionComments ( const string section,
list< string > *  comments,
TFlags  flags = fAllLayers 
) const
virtual

Enumerate in-section comments.

Write all in-section comments to the "comments" list in (registry priority) order. Previous contents of the list are erased.

Parameters
flagsTo control layers if search. Allowed values are fTransient, fPersistent, fNotJustCore, fJustCore and their mix using |

Reimplemented in CSynRegistryToIRegistry.

Definition at line 474 of file ncbireg.cpp.

References _ASSERT, _TRACE, IRegistry::fInSectionComments, flags, IRegistry::fLayerFlags, IRegistry::fTPFlags, IRegistry::IsNameSection(), NStr::PrintableString(), NStr::TruncateSpaces(), IRegistry::x_CheckFlags(), and IRegistry::x_Enumerate().

Referenced by CSynRegistryToIRegistry::EnumerateInSectionComments(), IRegistry::Write(), and CTwoLayerRegistry::x_Enumerate().

◆ EnumerateSections()

void IRegistry::EnumerateSections ( list< string > *  sections,
TFlags  flags = fAllLayers 
) const
virtual

◆ EnvToReg() [1/3]

bool CSimpleEnvRegMapper::EnvToReg ( const string env,
string section,
string name 
) const
virtual

The return value indicates whether the environment variable was appropriately formatted.

Implements IEnvRegMapper.

Definition at line 305 of file env_reg.cpp.

References NStr::EndsWith(), NStr::eNocase, env, CSimpleEnvRegMapper::m_Prefix, CSimpleEnvRegMapper::m_Section, CSimpleEnvRegMapper::m_Suffix, and NStr::StartsWith().

◆ EnvToReg() [2/3]

bool CNcbiEnvRegMapper::EnvToReg ( const string env,
string section,
string name 
) const
virtual

The return value indicates whether the environment variable was appropriately formatted.

Implements IEnvRegMapper.

Definition at line 380 of file env_reg.cpp.

References _ASSERT, env, ERR_POST, IRegistry::fInternalSpaces, Info(), isalnum(), islower(), IRegistry::IsNameEntry(), IRegistry::IsNameSection(), NPOS, s_IdentifySubstitution(), CNcbiEnvRegMapper::sm_Prefix, NStr::Split(), and NStr::StartsWith().

◆ EnvToReg() [3/3]

virtual bool IEnvRegMapper::EnvToReg ( const string env,
string section,
string name 
) const
pure virtual

The return value indicates whether the environment variable was appropriately formatted.

Implemented in CNcbiEnvRegMapper, and CSimpleEnvRegMapper.

◆ FindByContents() [1/2]

CConstRef< IRegistry > CCompoundRegistry::FindByContents ( const string section,
const string entry = kEmptyStr,
TFlags  flags = 0 
) const

Return a pointer to the highest-priority sub-registry with a section named SECTION containing (if ENTRY is non-empty) an entry named ENTRY, or NULL if not found.

Definition at line 1235 of file ncbireg.cpp.

References IRegistry::fCountCleared, IRegistry::fJustCore, flags, CCompoundRegistry::m_PriorityMap, and REVERSE_ITERATE.

Referenced by CCompoundRWRegistry::FindByContents(), CCompoundRegistry::x_Get(), CCompoundRegistry::x_GetComment(), and CCompoundRegistry::x_HasEntry().

◆ FindByContents() [2/2]

CConstRef< IRegistry > CCompoundRWRegistry::FindByContents ( const string section,
const string entry = kEmptyStr,
TFlags  flags = 0 
) const

Return a pointer to the highest-priority sub-registry with a section named SECTION containing (if ENTRY is non-empty) an entry named ENTRY, or NULL if not found.

Definition at line 1813 of file ncbireg.cpp.

References CCompoundRegistry::FindByContents(), flags, and CCompoundRWRegistry::m_AllRegistries.

◆ FindByName() [1/2]

CConstRef< IRegistry > CCompoundRegistry::FindByName ( const string name) const

Return a pointer to the sub-registry with the given name, or NULL if not found.

Definition at line 1228 of file ncbireg.cpp.

References map_checker< Container >::end(), map_checker< Container >::find(), and CCompoundRegistry::m_NameMap.

Referenced by CCompoundRWRegistry::FindByName().

◆ FindByName() [2/2]

CConstRef< IRegistry > CCompoundRWRegistry::FindByName ( const string name) const

Return a pointer to the sub-registry with the given name, or NULL if not found.

Definition at line 1807 of file ncbireg.cpp.

References CCompoundRegistry::FindByName(), and CCompoundRWRegistry::m_AllRegistries.

Referenced by CCompoundRWRegistry::LoadBaseRegistries(), CCompoundRWRegistry::x_Clear(), CCompoundRWRegistry::x_GetComment(), and CNcbiRegistry::x_Read().

◆ Get()

const string & IRegistry::Get ( const string section,
const string name,
TFlags  flags = 0 
) const
virtual

Get the parameter value.

Get the parameter with the specified "name" from the specified "section". First, search for the transient parameter value, and if cannot find in there, then continue the search in the non-transient parameters. If "fPersistent" flag is set in "flags", then don't search in the transient parameters at all.

Parameters
sectionSection name to search under (case-insensitive).
nameParameter name to search for (case-insensitive).
flagsTo control search.
Returns
The parameter value, or empty string if the parameter is not found.
See also
GetString(), GetEncryptedString()

Reimplemented in CSynRegistryToIRegistry.

Definition at line 262 of file ncbireg.cpp.

References _TRACE, IRegistry::fInternalCheckedAndLocked, IRegistry::fInternalSpaces, flags, IRegistry::fLayerFlags, IRegistry::fSectionlessEntries, IRegistry::fTPFlags, IRegistry::IsNameEntry(), IRegistry::IsNameSection(), kEmptyStr, NStr::PrintableString(), NStr::TruncateSpaces(), IRegistry::x_CheckFlags(), and IRegistry::x_Get().

Referenced by CCgiApplication::AddLBCookie(), CBlastFormatUtil::BlastPrintReference(), BOOST_AUTO_TEST_CASE(), CBlastDBExtractor::CBlastDBExtractor(), CBlastFormat::CBlastFormat(), CClientPseudoDataType::CClientPseudoDataType(), CFastaBioseqSource::CFastaBioseqSource(), CCgiStatistics::Compose_Entries(), CDBLB_ServiceMapper::ConfigureFromRegistry(), CConfig::ConvertRegToTree(), CProjectsLstFileFilter::CProjectsLstFileFilter(), CDriverManager::CreateDsFrom(), CCgiApplication::CreateFastCGIWatchFile(), CHelloBasicCommand::CreateView(), CSmallDNS::CSmallDNS(), CIdMapperConfig::DescribeContexts(), CSeqFormatter::DumpAll(), EnabledDelayBuffers(), CHelloCommand::Execute(), CIgBlastArgs::ExtractAlgorithmOptions(), FindBlastDbPath(), CRegistryFile::FromConfigFile(), g_GetConfigDouble(), g_GetConfigFlag(), g_GetConfigInt(), g_GetConfigString(), CClientPseudoTypeStrings::GenerateClassCode(), CCodeGenerator::GenerateClientCode(), CDataTool::GenerateCode(), CFileCode::GenerateHPP(), CSeqDBAtlas::GenerateSearchPath(), CSynRegistry::CInclude::Get(), CSynRegistryToIRegistry::Get(), IRegistry::GetBool(), CProjBulderApp::GetBuildConfigs(), CDataTool::GetConfigValue(), CProjBulderApp::GetDatatoolCommandLine(), IRegistry::GetDouble(), IRegistry::GetEncryptedString(), CWinMaskerFileStorage::GetEnvPath(), CCgiApplication::GetFastCGIStandaloneServer(), IRegistry::GetInt(), CCgiApplication::GetLogOpt(), GetOpt(), CCodeGenerator::GetOpt(), CProjBulderApp::GetProjectTreeInfo(), CAlignFormatUtil::GetProtocol(), CProjBulderApp::GetRegSettings(), IRegistry::GetString(), CSysLog::HonorRegistrySettings(), SNetCacheAPIImpl::Init(), SNetICacheClientImpl::Init(), SNetServerPoolImpl::Init(), SThrottleParams::SIOFailureThreshold::Init(), SThrottleParams::Init(), SNetScheduleAPIImpl::Init(), SNetServiceImpl::Init(), CCgiApplication::Init(), CGlCgiImageApplication::Init(), CCgiRedirectApplication::Init(), SNetScheduleAPIImpl::InitAffinities(), CIdMapperConfig::Initialize(), CNCDistributionConf::Initialize(), CNCDistributionConf::InitMirrorConfig(), CMatrixScoringMethod::Load(), CCompoundRWRegistry::LoadBaseRegistries(), CTemplateScoringMethod::LoadInfo(), NS_ValidateServiceToQueueSection(), CProjBulderApp::ParseArguments(), CCgiRedirectApplication::ProcessRequest(), impl::CDriverContext::ReadDBConfParams(), CNetScheduleServer::ReadServicesConfig(), CNCDistributionConf::ReConfig(), RegistryGetBoolean(), RegistryGetDouble(), RegistryGetInteger(), RegistryGetString(), RegistryIsValidBoolean(), RegistryIsValidDouble(), RegistryIsValidInteger(), RegistryIsValidString(), CCgiRedirectApplication::RemapEntries(), CAutoNcbiConfigFile::RemoveBLASTDBEnvVar(), CNgAlignApp::Run(), CLDS2IndexerApplication::Run(), CDemoApp::Run(), s_FindPathToGeneInfoFiles(), s_FindPathToWM(), s_GetConfigString(), NDirectNetStorageImpl::s_GetFTConfig(), NDirectNetStorageImpl::s_GetICClient(), s_ReadPerClientConfig(), s_ReadServerParams(), s_ReadStorageParams(), CBrowserUtils::SendToBrowser(), IRegistry::Write(), CNgAlignApp::x_AddAligners(), CNgAlignApp::x_AddFilters(), CNgAlignApp::x_AddScorers(), CMakeBlastDBApp::x_BuildDatabase(), CBlastUsageReport::x_CheckBlastUsageEnv(), CDebugDumpViewer::x_CheckLocation(), CNgAlignApp::x_CreateBlastAligner(), CNgAlignApp::x_CreateFileLoadAligner(), CNgAlignApp::x_CreateMergeAligner(), CNgAlignApp::x_CreateRemoteBlastAligner(), CNgAlignApp::x_CreateSequenceSet(), CTwoLayerRegistry::x_Get(), CCompoundRWRegistry::x_Get(), CNetCacheBlobFetchApp::x_GetInitString(), CBlastHitMatrixCGIApplication::x_GetSeqAnnot(), CDataTypeModule::x_GetVar(), CNcbiApplicationAPI::x_HonorStandardSettings(), CDisplaySeqalign::x_InitAlignParams(), CBlastFormat::x_InitAlignTemplates(), CBlastFormat::x_InitDeflineTemplates(), CDisplaySeqalign::x_InitSeqUrl(), CTaxFormat::x_InitTaxFormat(), SDataLoaderConfig::x_LoadBlastDbDataLoaderConfig(), SDataLoaderConfig::x_LoadDataLoadersConfig(), CDiagContext::x_LogEnvironment(), CNcbiApplicationAPI::x_LogOptions(), CDisplaySeqalign::x_PreProcessSingleAlign(), IRWRegistry::x_Read(), CNcbiTestApplication::x_ReadConfiguration(), SPubseqGatewaySettings::x_ReadCountersSection(), CSplitQueryTestFixture::x_ReadQueryBoundsPerChunk(), CSplitQueryTestFixture::x_ReadVectorOfVectorsForTest(), CSatInfoSchema::x_ResolveConnectionByServiceName(), CCompoundRWRegistry::x_Set(), CDataLoadersUtil::x_SetupASNCacheDataLoader(), CDataLoadersUtil::x_SetupVDBDataLoader(), CSequenceSearchForm::x_UpdateFileList(), COrfSearchForm::x_UpdateKozak(), and CBlastDBCmdApp::x_UseLongSeqIds().

◆ GetBool()

bool IRegistry::GetBool ( const string section,
const string name,
bool  default_value,
TFlags  flags = 0,
EErrAction  err_action = eThrow 
) const
virtual

Get boolean value of specified parameter name.

Like "GetString()", plus convert the value into boolean.

Parameters
err_actionWhat to do if error encountered in converting parameter value.
See also
GetString()

Reimplemented in CSynRegistryToIRegistry.

Definition at line 391 of file ncbireg.cpp.

References IRegistry::eErrPost, IRegistry::eReturn, ERR_POST_X, IRegistry::eThrow, flags, IRegistry::Get(), NCBI_RETHROW_SAME, NStr::StringToBool(), and rapidjson::value.

Referenced by CCgiApplication::AddLBCookie(), BDB_CreateEnv(), NWinHook::CApiHookMgr::CApiHookMgr(), CAppConfig::CAppConfig(), CCgiStatistics::Compose(), CAuthListValidator::Configure(), CDBConnectionFactory::ConfigureFromRegistry(), ConfigureLogging(), SSection::Get(), CCgiApplication::GetFastCGIChannelErrors(), CCgiApplication::GetFastCGIComplete_Request_On_Sigterm(), CCgiApplication::GetFastCGIDebug(), CCgiApplication::GetFastCGIHonorExitRequest(), CCgiApplication::GetFastCGIStatLog(), CCgiApplication::GetFastCGIStopIfFailed(), IRegistry::GetValue(), CGridCgiApplication::InitGridClient(), CNCDistributionConf::Initialize(), CMatrixScoringMethod::Load(), NS_ValidateBool(), NSTValidateBool(), NSTValidateServices(), CGenBankUIDataSource::Open(), SQueueParameters::ReadScrambleJobKeys(), CCassConnectionFactory::ReloadConfig(), CAsn2FlatApp::Run(), CCgiApplication::Run(), CBDBEnvKeeperApp::Run(), s_InitAllKNS(), s_IsHugeMode(), s_ReadServerParams(), s_ReadSpecificParams(), CFeaturePanel::SetInputObject(), CNgAlignApp::x_CreateBlastAligner(), CNSTServiceRegistry::x_GetMetadataServices(), NSNPWebServices::x_GetSearchHost(), CGuiObjectInfoVariation::x_GetTooltipService(), CNcbiApplicationAPI::x_HonorStandardSettings(), CPSGS_SNPProcessor::x_LoadConfig(), SPubseqGatewaySettings::x_ReadCassandraProcessorSection(), SPubseqGatewaySettings::x_ReadCDDProcessorSection(), SPubseqGatewaySettings::x_ReadDebugSection(), SPubseqGatewaySettings::x_ReadHealthSection(), SPubseqGatewaySettings::x_ReadIPGSection(), SPubseqGatewaySettings::x_ReadServerSection(), SPubseqGatewaySettings::x_ReadSNPProcessorSection(), CSplitQueryTestFixture::x_ReadSplitQueryInfoForTest(), SPubseqGatewaySettings::x_ReadSSLSection(), SPubseqGatewaySettings::x_ReadWGSProcessorSection(), and CRemoteUpdater::xSetFromConfig().

◆ GetComment()

const string & IRegistry::GetComment ( const string section = kEmptyStr,
const string name = kEmptyStr,
TFlags  flags = 0 
) const
virtual

Get comment of the registry entry "section:name".

Parameters
sectionSection name. If passed empty string, then get the registry comment.
nameParameter name. If empty string, then get the "section" comment.
flagsTo control search.
Returns
Comment string. If not found, return an empty string.

Reimplemented in CSynRegistryToIRegistry.

Definition at line 450 of file ncbireg.cpp.

References _TRACE, IRegistry::fInternalSpaces, flags, IRegistry::fLayerFlags, IRegistry::fSectionlessEntries, IRegistry::IsNameSection(), kEmptyStr, NStr::PrintableString(), IRegistry::sm_InSectionCommentName, NStr::TruncateSpaces(), IRegistry::x_CheckFlags(), and IRegistry::x_GetComment().

Referenced by CSynRegistryToIRegistry::GetComment(), IRegistry::Write(), CTwoLayerRegistry::x_GetComment(), CCompoundRWRegistry::x_GetComment(), CNcbiRegistry::x_GetComment(), and IRWRegistry::x_Read().

◆ GetCoreCutoff() [1/2]

TPriority CCompoundRegistry::GetCoreCutoff ( void  ) const
inline

Subregistries whose priority is less than the core cutoff (ePriority_Default by default) will be ignored for fJustCore operations, such as Write by default.

Definition at line 687 of file ncbireg.hpp.

References CCompoundRegistry::m_CoreCutoff.

Referenced by CCompoundRWRegistry::GetCoreCutoff().

◆ GetCoreCutoff() [2/2]

CCompoundRWRegistry::TPriority CCompoundRWRegistry::GetCoreCutoff ( void  ) const

Subregistries whose priority is less than the core cutoff (ePriority_Reserved by default) will be ignored for fJustCore operations, such as Write by default.

Definition at line 1767 of file ncbireg.cpp.

References CCompoundRegistry::GetCoreCutoff(), and CCompoundRWRegistry::m_AllRegistries.

Referenced by CCompoundRWRegistry::x_Enumerate().

◆ GetDouble()

double IRegistry::GetDouble ( const string section,
const string name,
double  default_value,
TFlags  flags = 0,
EErrAction  err_action = eThrow 
) const
virtual

Get double value of specified parameter name.

Like "GetString()", plus convert the value into double.

Parameters
err_actionWhat to do if error encountered in converting parameter value.
See also
GetString()

Reimplemented in CSynRegistryToIRegistry.

Definition at line 420 of file ncbireg.cpp.

References IRegistry::eErrPost, IRegistry::eReturn, ERR_POST_X, IRegistry::eThrow, NStr::fDecimalPosixOrLocal, flags, IRegistry::Get(), NCBI_RETHROW_SAME, NStr::StringToDouble(), and rapidjson::value.

Referenced by CAuthListValidator::Configure(), CPSGS_CDDProcessor::CPSGS_CDDProcessor(), IRegistry::GetValue(), CColumnScoringMethod::Load(), CMatrixScoringMethod::Load(), NS_ValidateDouble(), NS_ValidateServerSection(), NSTValidateDatabaseSection(), NSTValidateDouble(), SQueueParameters::ReadBlacklistTime(), SQueueParameters::ReadClientRegistryTimeoutAdmin(), SQueueParameters::ReadClientRegistryTimeoutReader(), SQueueParameters::ReadClientRegistryTimeoutSubmitter(), SQueueParameters::ReadClientRegistryTimeoutUnknown(), SQueueParameters::ReadClientRegistryTimeoutWorkerNode(), SQueueParameters::ReadMaxPendingReadWaitTimeout(), SQueueParameters::ReadMaxPendingWaitTimeout(), SQueueParameters::ReadNotifHandicap(), SQueueParameters::ReadNotifHifreqInterval(), SQueueParameters::ReadNotifHifreqPeriod(), SQueueParameters::ReadPendingTimeout(), SQueueParameters::ReadReadBlacklistTime(), SQueueParameters::ReadReaderTimeout(), SQueueParameters::ReadReadTimeout(), SQueueParameters::ReadRunTimeout(), SQueueParameters::ReadTimeout(), SQueueParameters::ReadWnodeTimeout(), CNSTDatabase::SetParameters(), CNgAlignApp::x_AddScorers(), CNgAlignApp::x_CreateMergeAligner(), CNSTDatabase::x_ReadDbAccessInfo(), and SPubseqGatewaySettings::x_ReadServerSection().

◆ GetEncryptedString()

string IRegistry::GetEncryptedString ( const string section,
const string name,
TFlags  flags = 0,
const string password = kEmptyStr 
) const

Get a value that was (potentially) stored encrypted.

Similar to Get(), but if the value appears to have been encrypted, return the corresponding plaintext. Otherwise, unless flags contains fPlaintextAllowed, throw an exception to let the user know of inappropriate plaintext in the configuration file.

Parameters
passwordExplicitly supply a password. If absent, will try standard keys, honoring any key domain recorded in the value.
See also
Get(), GetString(), CNcbiEncrypt

Definition at line 329 of file ncbireg.cpp.

References CNcbiEncrypt::Decrypt(), flags, IRegistry::fPlaintextAllowed, IRegistry::Get(), CNcbiEncrypt::IsEncrypted(), NCBI_RETHROW2, NCBI_THROW2, and NStr::TruncateSpaces().

Referenced by NS_ValidateServerSection(), SNS_Parameters::Read(), SNetStorageServerParameters::Read(), SEutilsParams::SEutilsParams(), SPubseqGatewaySettings::x_ReadAdminSection(), CNSTDatabase::x_ReadDbAccessInfo(), and CNetStorageGCDatabase::x_ReadDbAccessInfo().

◆ GetErrCodeString()

const char * CRegistryException::GetErrCodeString ( void  ) const
overridevirtual

◆ GetInt()

int IRegistry::GetInt ( const string section,
const string name,
int  default_value,
TFlags  flags = 0,
EErrAction  err_action = eThrow 
) const
virtual

Get integer value of specified parameter name.

Like "GetString()", plus convert the value into integer.

Parameters
err_actionWhat to do if error encountered in converting parameter value.
See also
GetString()

Reimplemented in CSynRegistryToIRegistry.

Definition at line 362 of file ncbireg.cpp.

References IRegistry::eErrPost, IRegistry::eReturn, ERR_POST_X, IRegistry::eThrow, flags, IRegistry::Get(), NCBI_RETHROW_SAME, NStr::StringToInt(), and rapidjson::value.

Referenced by CCgiApplication::AddLBCookie(), BDB_CreateEnv(), CCgiStatistics::Compose(), CDBLB_ServiceMapper::ConfigureFromRegistry(), CDBConnectionFactory::ConfigureFromRegistry(), ConfigureLogging(), ConfigureScheduler(), ConfigureSockets(), ConfigureThreads(), ConfigureTimeMan(), CPSGS_CDDProcessor::CPSGS_CDDProcessor(), CCgiApplication::CreateContextWithFlags_Default(), CCgiApplication::CreateFastCGIWatchFile(), CSampleJob::CSampleJob(), CProjBulderApp::EnumOpt(), CRmtScriptTimeout::Get(), SSection::Get(), CCgiApplication::GetFastCGIIterations(), CCgiApplication::GetFastCGIMTMaxThreads(), CCgiApplication::GetFastCGIWatchFileRestartDelay(), CCgiApplication::GetFastCGIWatchFileTimeout(), SPubseqGatewaySettings::GetProcessorMaxConcurrency(), IRegistry::GetValue(), CGridCgiApplication::InitGridClient(), CNCDistributionConf::Initialize(), CStdAnnotTypes::LoadTypes(), NS_ValidateInt(), NS_ValidateRegistrySettings(), NS_ValidateServerSection(), NSTValidateInt(), NSTValidateServerSection(), CSplitQueryTestFixture::QuerySplitter_BlastnMultiQueryMultiChunk(), CSplitQueryTestFixture::QuerySplitter_BlastnSingleQueryMultiChunk(), CSplitQueryTestFixture::QuerySplitter_BlastxMultiQueryMultiChunk(), CSplitQueryTestFixture::QuerySplitter_BlastxSingleQueryMultiChunk(), SQueueParameters::ReadClientRegistryMinAdmins(), SQueueParameters::ReadClientRegistryMinReaders(), SQueueParameters::ReadClientRegistryMinSubmitters(), SQueueParameters::ReadClientRegistryMinUnknowns(), SQueueParameters::ReadClientRegistryMinWorkerNodes(), SQueueParameters::ReadDumpAffBufferSize(), SQueueParameters::ReadDumpBufferSize(), SQueueParameters::ReadDumpClientBufferSize(), SQueueParameters::ReadDumpGroupBufferSize(), SQueueParameters::ReadFailedRetries(), SQueueParameters::ReadMaxJobsPerClient(), SQueueParameters::ReadNotifLofreqMult(), SQueueParameters::ReadReadFailedRetries(), ReConfig_Scheduler(), CCassConnectionFactory::ReloadConfig(), CBDBEnvKeeperApp::Run(), s_ConfigureTaskServer(), NDirectNetStorageImpl::s_GetRelocateChunk(), s_ReadServerParams(), s_ReadSpecificParams(), s_ReadVariableParams(), CSplitCacheApp::SetupCache(), TestDelay(), CNgAlignApp::x_CreateBlastAligner(), CNgAlignApp::x_CreateInversionMergeAligner(), CNgAlignApp::x_CreateMergeAligner(), CNgAlignApp::x_CreateRemoteBlastAligner(), CNcbiApplicationAPI::x_HonorStandardSettings(), CRmtFileStatus::x_Init(), CPSGS_SNPProcessor::x_LoadConfig(), CPSGS_WGSProcessor::x_LoadConfig(), SPubseqGatewaySettings::x_ReadAutoExcludeSection(), SPubseqGatewaySettings::x_ReadIPGSection(), SPubseqGatewaySettings::x_ReadMyNCBISection(), CSplitQueryTestFixture::x_ReadQueryBoundsPerChunk(), SPubseqGatewaySettings::x_ReadServerSection(), CSplitQueryTestFixture::x_ReadSplitQueryInfoForTest(), SPubseqGatewaySettings::x_ReadStatisticsSection(), CSplitQueryTestFixture::x_ReadVectorOfVectorsForTest(), and CRemoteUpdater::xSetFromConfig().

◆ GetPrefix() [1/3]

virtual string IEnvRegMapper::GetPrefix ( void  ) const
inlinevirtual

Can be overriden to speed enumeration.

Reimplemented in CNcbiEnvRegMapper, and CSimpleEnvRegMapper.

Definition at line 69 of file env_reg.hpp.

References kEmptyStr.

◆ GetPrefix() [2/3]

string CSimpleEnvRegMapper::GetPrefix ( void  ) const
virtual

Can be overriden to speed enumeration.

Reimplemented from IEnvRegMapper.

Definition at line 320 of file env_reg.cpp.

References CSimpleEnvRegMapper::m_Prefix.

◆ GetPrefix() [3/3]

string CNcbiEnvRegMapper::GetPrefix ( void  ) const
virtual

Can be overriden to speed enumeration.

Reimplemented from IEnvRegMapper.

Definition at line 446 of file env_reg.cpp.

References CNcbiEnvRegMapper::sm_Prefix.

◆ GetString()

string IRegistry::GetString ( const string section,
const string name,
const string default_value,
TFlags  flags = 0 
) const
virtual

Get the parameter string value.

Similar to the "Get()", but if the configuration parameter is not found, then return 'default_value' rather than empty string.

See also
Get(), GetEncryptedString()

Reimplemented in CSynRegistryToIRegistry.

Definition at line 321 of file ncbireg.cpp.

References flags, IRegistry::Get(), and rapidjson::value.

Referenced by CCgiApplication::AddLBCookie(), BDB_CreateEnv(), CDataSourceInitializer::CDataSourceInitializer(), CGridRPCBaseClient< CAsnBinCompressed >::CGridRPCBaseClient(), CNcbiApplogApp::Cmd_Health(), CDBUDRandomMapper::ConfigureFromRegistry(), CDBUDPriorityMapper::ConfigureFromRegistry(), CDBUniversalMapper::ConfigureFromRegistry(), ConfigureLogging(), CPluginManager< TClass >::CPluginManager(), CGraphCacheFactory::CreateObject(), CRemoteAppLauncher::CRemoteAppLauncher(), CSampleJob::CSampleJob(), CProjBulderApp::GetConfigureMacro(), CProjBulderApp::GetDatatoolCommandLine(), CProjBulderApp::GetDatatoolId(), CProjBulderApp::GetDatatoolPathForApp(), CProjBulderApp::GetDatatoolPathForLib(), GetDefaultLogLocation(), CCgiApplication::GetDefaultLogPath(), GetDefaultTmsContext(), GetDllsList(), GetHostedLibs(), GetLinksURL(), CProjBulderApp::GetRegSettings(), CPtbRegistry::GetString(), IRegistry::GetValue(), CSeqTextDemoDlg::Init(), CNCDistributionConf::Initialize(), IsProducedByDatatool(), CColorTableMethod::Load(), CMatrixScoringMethod::Load(), LoadConfigInfoByNames(), CTemplateScoringMethod::LoadInfo(), CStdAnnotTypes::LoadTypes(), NS_ValidateString(), NSTValidateDatabaseSection(), NSTValidateProlongValue(), NSTValidateString(), NSTValidateTTLValue(), CGenBankUIDataSource::Open(), SExceptionMessage::operator()(), CProjBulderApp::ProcessLocationMacros(), CCassConnectionFactory::ProcessParams(), SNS_Parameters::Read(), SNetStorageServerParameters::Read(), SQueueParameters::ReadClass(), SQueueParameters::ReadDescription(), SNS_Parameters::ReadErrorEmulatorSection(), SQueueParameters::ReadLinkedSections(), SQueueParameters::ReadMaxInputSize(), SQueueParameters::ReadMaxOutputSize(), SQueueParameters::ReadProgram(), SQueueParameters::ReadReaderHosts(), SQueueParameters::ReadSubmHosts(), SQueueParameters::ReadWnodeHosts(), CCassConnectionFactory::ReloadConfig(), CAsn2FlatApp::Run(), CTrackMgrClient::s_Ask(), s_GetMandatoryFields(), s_init_UseGeoLocNameForCountry(), CGraphTrack::s_InitICache(), s_ReadPerClientConfig(), s_ReadRanges(), s_ReadServerParams(), s_ReadSpecificParams(), s_ReadStorageParams(), s_ReadVariableParams(), ColumnarVcfCache::SetInfoFields(), CSplitCacheApp::SetupCache(), SEutilsParams::SEutilsParams(), CNetStorageGCApp::x_CheckExpiration(), CTemplateScoringMethod::x_GetColor(), CODBC_Connection::x_GetDriverName(), CSDB_Decryptor::x_GetKey(), NSNPWebServices::x_GetSearchHost(), CGuiObjectInfoVariation::x_GetTooltipService(), CNcbiApplicationAPI::x_HonorStandardSettings(), CRmtFileStatus::x_Init(), CDataCrawlerCache::x_InitICache(), CPSGS_SNPProcessor::x_LoadConfig(), SPubseqGatewaySettings::x_ReadAdminSection(), SErrorEmulatorParameter::x_ReadCommon(), CNSTDatabase::x_ReadDbAccessInfo(), CNetStorageGCDatabase::x_ReadDbAccessInfo(), SPubseqGatewaySettings::x_ReadHealthSection(), CQueueDataBase::x_ReadLinkedSections(), SPubseqGatewaySettings::x_ReadLmdbCacheSection(), SPubseqGatewaySettings::x_ReadMyNCBISection(), SPubseqGatewaySettings::x_ReadServerSection(), CNSTServiceRegistry::x_ReadServiceProperties(), SPubseqGatewaySettings::x_ReadSSLSection(), SPubseqGatewaySettings::x_ReadStatisticsSection(), CUIToolRegistry::x_ReadToolInfo(), CNetScheduleDApp::x_SaveSection(), and CRemoteUpdater::xSetFromConfig().

◆ GetValue() [1/4]

bool IRegistry::GetValue ( const string section,
const string name,
bool  default_value,
EErrAction  err_action = eErrPost,
TFlags  flags = 0 
) const
inline

Definition at line 268 of file ncbireg.hpp.

References flags, and IRegistry::GetBool().

◆ GetValue() [2/4]

string IRegistry::GetValue ( const string section,
const string name,
const string default_value,
EErrAction  = eReturn,
TFlags  flags = 0 
) const
inline

Overloading of getters for generic programming.

Definition at line 250 of file ncbireg.hpp.

References flags, and IRegistry::GetString().

Referenced by CSynRegistry::TGet().

◆ GetValue() [3/4]

double IRegistry::GetValue ( const string section,
const string name,
double  default_value,
EErrAction  err_action = eErrPost,
TFlags  flags = 0 
) const
inline

Definition at line 277 of file ncbireg.hpp.

References flags, and IRegistry::GetDouble().

◆ GetValue() [4/4]

int IRegistry::GetValue ( const string section,
const string name,
int  default_value,
EErrAction  err_action = eErrPost,
TFlags  flags = 0 
) const
inline

Definition at line 259 of file ncbireg.hpp.

References flags, and IRegistry::GetInt().

◆ HasEntry()

bool IRegistry::HasEntry ( const string section,
const string name = kEmptyStr,
TFlags  flags = 0 
) const
virtual

Reimplemented in CSynRegistryToIRegistry.

Definition at line 290 of file ncbireg.cpp.

References _TRACE, IRegistry::fCountCleared, IRegistry::fInternalCheckedAndLocked, IRegistry::fInternalSpaces, flags, IRegistry::fLayerFlags, IRegistry::fSectionlessEntries, IRegistry::fSections, IRegistry::fTPFlags, IRegistry::IsNameEntry(), IRegistry::IsNameSection(), NStr::PrintableString(), IRegistry::sm_InSectionCommentName, NStr::TruncateSpaces(), IRegistry::x_CheckFlags(), and IRegistry::x_HasEntry().

Referenced by BDB_CreateEnv(), CBlastFormatUtil::BlastPrintReference(), BOOST_AUTO_TEST_CASE(), CRemoteAppLauncher::CRemoteAppLauncher(), FindBlastDbPath(), CSeqDBAtlas::GenerateSearchPath(), CCodeGenerator::GetOpt(), SPubseqGatewaySettings::GetProcessorMaxConcurrency(), CAlignFormatUtil::GetProtocol(), CSynRegistry::Has(), CPtbRegistry::HasEntry(), CNcbiRegistry::IncludeNcbircIfAllowed(), CColorTableMethod::Load(), CMatrixScoringMethod::Load(), NS_ValidateDataSize(), NSTValidateServices(), SNS_Parameters::Read(), impl::CDriverContext::ReadDBConfParams(), CGridCommandLineInterfaceApp::Run(), NDirectNetStorageImpl::s_GetSection(), s_ReadPerClientConfig(), s_ReadRanges(), s_ReadSpecificParams(), CSynRegistry::TGet(), CBlastUsageReport::x_CheckBlastUsageEnv(), CMemoryRegistry::x_Enumerate(), CNSTServiceRegistry::x_GetMetadataServices(), CDataTypeModule::x_GetVar(), CTwoLayerRegistry::x_HasEntry(), CCompoundRWRegistry::x_HasEntry(), SDataLoaderConfig::x_LoadBlastDbDataLoaderConfig(), SDataLoaderConfig::x_LoadDataLoadersConfig(), IRWRegistry::x_Read(), CNcbiRegistry::x_Read(), SPubseqGatewaySettings::x_ReadServerSection(), CNSTServiceRegistry::x_ReadServiceProperties(), CNetScheduleDApp::x_SaveSection(), CCompoundRWRegistry::x_Set(), and CRemoteUpdater::xSetFromConfig().

◆ IncludeNcbircIfAllowed()

bool CNcbiRegistry::IncludeNcbircIfAllowed ( TFlags  flags = fWithNcbirc)

Attempt to load a systemwide configuration file (.ncbirc on Unix, ncbi.ini on Windows) as a low-priority registry, as long as the following conditions all hold:

  • fWithNcbirc is set in FLAGS.
  • The environment variable NCBI_DONT_USE_NCBIRC is NOT set.
  • The registry's existing contents do NOT contain a setting of [NCBI]DONT_USE_NCBIRC (case-insensitive).
    Parameters
    flagsRegistry flags to be applied when reading the system configuration file. Must also contain fWithNcbirc (which will be filtered out before calling any other methods) for the call to have any effect.
    Returns
    TRUE if the system configuration file was successfully read and parsed; FALSE otherwise.

Definition at line 1634 of file ncbireg.cpp.

References CMetaRegistry::SEntry::actual_name, Critical(), IRegistry::Empty(), CMetaRegistry::eName_RcOrIni, ERR_POST_X, flags, IRegistry::fWithNcbirc, CRef< C, Locker >::GetPointer(), IRegistry::HasEntry(), CMetaRegistry::Load(), CNcbiRegistry::m_SysRegistry, CMetaRegistry::SEntry::registry, CRef< C, Locker >::Reset(), and Warning().

Referenced by BOOST_AUTO_TEST_CASE(), CNcbiRegistry::CNcbiRegistry(), CNcbiApplicationAPI::LoadConfig(), and CNcbiRegistry::x_Read().

◆ IsNameEntry()

bool IRegistry::IsNameEntry ( const string str,
TFlags  flags 
)
static

◆ IsNameSection()

bool IRegistry::IsNameSection ( const string str,
TFlags  flags 
)
static

◆ LoadBaseRegistries()

bool CCompoundRWRegistry::LoadBaseRegistries ( TFlags  flags = 0,
int  metareg_flags = 0,
const string path = kEmptyStr 
)

◆ MaybeSet()

bool IRWRegistry::MaybeSet ( string target,
const string value,
TFlags  flags 
)
staticprotected

◆ Modified()

bool IRegistry::Modified ( TFlags  flags = fPersistent) const

Verify if persistent values have been modified.

Parameters
flagsLayer(s) to check.
Returns
TRUE if the relevant part(s) of the registry were modified since the last call to SetModifiedFlag(false).

Definition at line 173 of file ncbireg.cpp.

References flags, IRegistry::fLayerFlags, IRegistry::fPersistent, IRegistry::fTransient, IRegistry::x_CheckFlags(), and IRegistry::x_Modified().

Referenced by CMetaRegistry::Load(), CMetaRegistry::SEntry::Reload(), IRegistry::Write(), CTwoLayerRegistry::x_Modified(), CCompoundRWRegistry::x_Modified(), CSynRegistryToIRegistry::x_Modified(), and IRWRegistry::x_Read().

◆ NCBI_EXCEPTION_DEFAULT2()

CRegistryException::NCBI_EXCEPTION_DEFAULT2 ( CRegistryException  ,
CParseTemplException< CCoreException ,
std::string::size_type   
)

◆ Read()

IRWRegistry * IRWRegistry::Read ( CNcbiIstream is,
TFlags  flags = 0,
const string path = kEmptyStr 
)

Read and parse the stream "is", and merge its content with current Registry entries.

Once the Registry has been initialized by the constructor, it is possible to load other parameters from other files using this method.

Parameters
isInput stream to read and parse. NOTE: if the stream is a file, it must be opened in binary mode!
flagsHow parameters are stored. The default is for all values to be read as persistent with the capability of overriding any previously loaded value associated with the same name. The default can be modified by specifying "fTransient", "fNoOverride" or "fTransient | fNoOverride". If there is a conflict between the old and the new (loaded) entry value and if "fNoOverride" flag is set, then just ignore the new value; otherwise, replace the old value by the new one. If "fTransient" flag is set, then store the newly retrieved parameters as transient; otherwise, store them as persistent.
pathWhere to look for base registries listed with relative paths.
Returns
A pointer to a newly created subregistry, if any, directly containing the entries loaded from is.
See also
Write()

Definition at line 605 of file ncbireg.cpp.

References eBOM_Discard, eEncodingForm_Utf16Foreign, eEncodingForm_Utf16Native, IRegistry::fCountCleared, IRegistry::fIgnoreErrors, IRegistry::fInternalSpaces, IRegistry::fJustCore, flags, IRegistry::fNoOverride, IRegistry::fSectionlessEntries, IRegistry::fTransient, IRegistry::fWithNcbirc, GetTextEncodingForm(), NULL, ReadIntoUtf8(), IRegistry::x_CheckFlags(), and IRWRegistry::x_Read().

Referenced by CNcbiApplogApp::Cmd_Health(), CNcbiRegistry::CNcbiRegistry(), CIdMapperConfig::DescribeContexts(), CIdMapperConfig::Initialize(), CMetaRegistry::Load(), CCodeGenerator::LoadConfig(), CNcbiApplicationAPI::LoadConfig(), LoadRegistry(), CStdAnnotTypes::LoadTypes(), CGenBankUIDataSource::Open(), CPtbRegistry::Read(), CMetaRegistry::SEntry::Reload(), CSamplePhoneHomePolicy::Restore(), s_LoadConfFile(), and CNcbiRegistry::x_Read().

◆ ReadLock()

void IRegistry::ReadLock ( void  )

Support for locking.

Individual operations already use these to ensure atomicity, but the locking mechanism is recursive, so users can also make entire sequences of operations atomic.

Definition at line 537 of file ncbireg.cpp.

References IRegistry::m_Lock, CRWLock::ReadLock(), and IRegistry::x_ChildLockAction().

◆ RegToEnv() [1/3]

string CSimpleEnvRegMapper::RegToEnv ( const string section,
const string name 
) const
virtual

Returns empty strings for unsupported (section, name) pairs.

Implements IEnvRegMapper.

Definition at line 298 of file env_reg.cpp.

References kEmptyStr, CSimpleEnvRegMapper::m_Prefix, CSimpleEnvRegMapper::m_Section, and CSimpleEnvRegMapper::m_Suffix.

◆ RegToEnv() [2/3]

string CNcbiEnvRegMapper::RegToEnv ( const string section,
const string name 
) const
virtual

Returns empty strings for unsupported (section, name) pairs.

Implements IEnvRegMapper.

Definition at line 329 of file env_reg.cpp.

References NPOS, NStr::ReplaceInPlace(), result, CNcbiEnvRegMapper::sm_Prefix, NStr::StartsWith(), and NStr::ToUpper().

◆ RegToEnv() [3/3]

virtual string IEnvRegMapper::RegToEnv ( const string section,
const string name 
) const
pure virtual

Returns empty strings for unsupported (section, name) pairs.

Implemented in CNcbiEnvRegMapper, and CSimpleEnvRegMapper.

◆ Remove() [1/2]

void CCompoundRegistry::Remove ( const IRegistry reg)

Remove sub-registry "reg".

Throw an exception if "reg" is not a (direct) sub-registry.

Definition at line 1207 of file ncbireg.cpp.

References map_checker< Container >::erase(), multimap_checker< Container >::erase(), CCompoundRegistry::m_NameMap, CCompoundRegistry::m_PriorityMap, NCBI_THROW2, and NON_CONST_ITERATE.

Referenced by CCompoundRWRegistry::Remove().

◆ Remove() [2/2]

void CCompoundRWRegistry::Remove ( const IRegistry reg)

Remove sub-registry "reg".

Throw an exception if "reg" is not a (direct) sub-registry.

Definition at line 1795 of file ncbireg.cpp.

References CRef< C, Locker >::GetPointer(), CCompoundRWRegistry::m_AllRegistries, CCompoundRWRegistry::m_MainRegistry, NCBI_THROW2, and CCompoundRegistry::Remove().

Referenced by CCompoundRWRegistry::x_Clear().

◆ RemoveMapper()

void CEnvironmentRegistry::RemoveMapper ( const IEnvRegMapper mapper)

◆ Set()

bool IRWRegistry::Set ( const string section,
const string name,
const string value,
TFlags  flags = 0,
const string comment = kEmptyStr 
)

Set the configuration parameter value.

Parameters
valueValue that the parameter is set to.
flagsTo control search. Valid flags := { fPersistent, fNoOverride, fTruncate } If there was already an entry with the same <section,name> key: if "fNoOverride" flag is set then do not override old value and return FALSE; else override the old value and return TRUE. If "fPersistent" flag is set then store the entry as persistent; else store it as transient. If "fTruncate" flag is set then truncate the leading and trailing spaces – " \r\t\v" (NOTE: '
' is not considered a space!).
commentOptional comment string describing parameter.
Returns
TRUE if successful (including replacing a value with itself)

Definition at line 826 of file ncbireg.cpp.

References _ASSERT, _TRACE, IRegistry::fCountCleared, IRegistry::fInternalSpaces, flags, IRegistry::fNoOverride, IRegistry::fPersistent, IRegistry::fSectionlessEntries, IRegistry::fTruncate, IRegistry::IsNameEntry(), IRegistry::IsNameSection(), NPOS, NStr::PrintableString(), s_ConvertComment(), NStr::TruncateSpaces(), rapidjson::value, IRegistry::x_CheckFlags(), IRWRegistry::x_Set(), and IRegistry::x_SetModifiedFlag().

Referenced by CCodeGenerator::AddConfigLine(), BOOST_AUTO_TEST_CASE(), CAutoNcbiConfigFile::CAutoNcbiConfigFile(), CNcbiApplogApp::Cmd_Health(), SBDB_CacheUnitStatistics::ConvertToRegistry(), CCodeGenerator::ExcludeTypes(), CDebugArgs::ExtractAlgorithmOptions(), GetAsnDataViaHTTP(), CRemoteCgiApp::Init(), CStreamTestApp::Init(), MakePluginManagerParamTree(), NCBITEST_AUTO_INIT(), CGenBankUIDataSource::Open(), CCgiApplication::ProcessHttpReferer(), CNCDistributionConf::ReConfig(), RegistrySetBoolean(), RegistrySetDouble(), RegistrySetInteger(), RegistrySetString(), CAutoNcbiConfigFile::RemoveBLASTDBEnvVar(), CSamplePhoneHomePolicy::Restore(), CGridCommandLineInterfaceApp::Run(), CAsnSubCacheCreateApplication::Run(), CDemoApp::Run(), s_REG_Set(), s_ScanRecursive(), CColorTableMethod::Save(), CTemplateScoringMethod::SaveInfo(), CAutoNcbiConfigFile::SetNucleotideBlastDbDataLoader(), CAutoNcbiConfigFile::SetProteinBlastDbDataLoader(), CGridCommandLineInterfaceApp::SetUp_NetCache(), CSplitCacheApp::SetupCache(), IRWRegistry::SetValue(), IRWRegistry::x_Read(), CNcbiRegistry::x_Read(), CTwoLayerRegistry::x_Set(), CCompoundRWRegistry::x_Set(), CSequenceSearchForm::x_UpdateFileList(), COrfSearchForm::x_UpdateKozak(), and CAutoNcbiConfigFile::~CAutoNcbiConfigFile().

◆ SetComment()

bool IRWRegistry::SetComment ( const string comment,
const string section = kEmptyStr,
const string name = kEmptyStr,
TFlags  flags = 0 
)

Set comment "comment" for the registry entry "section:name".

Parameters
commentComment string value. Set to kEmptyStr to delete the comment.
sectionSection name. If "section" is empty string, then set as the registry comment.
nameParameter name. If "name" is empty string, then set as the "section" comment.
flagsHow the comment is stored. The default is for comments to be stored as persistent with the capability of overriding any previously loaded value associated with the same name. The default can be modified by specifying "fTransient", "fNoOverride" or "fTransient | fNoOverride". If there is a conflict between the old and the new comment and if "fNoOverride" flag is set, then just ignore the new comment; otherwise, replace the old comment by the new one. If "fTransient" flag is set, then store the new comment as transient (generally not desired); otherwise, store it as persistent.
Returns
FALSE if "section" and/or "name" do not exist in registry.

Definition at line 895 of file ncbireg.cpp.

References _TRACE, IRegistry::fCountCleared, IRegistry::fInternalSpaces, flags, IRegistry::fNoOverride, IRegistry::fPersistent, IRegistry::fTransient, IRegistry::IsNameEntry(), IRegistry::IsNameSection(), NStr::PrintableString(), s_ConvertComment(), IRegistry::sm_InSectionCommentName, NStr::TruncateSpaces(), IRegistry::x_CheckFlags(), IRWRegistry::x_SetComment(), and IRegistry::x_SetModifiedFlag().

Referenced by IRWRegistry::x_Read(), CTwoLayerRegistry::x_SetComment(), and CCompoundRWRegistry::x_SetComment().

◆ SetCoreCutoff() [1/2]

void CCompoundRegistry::SetCoreCutoff ( TPriority  prio)
inline

Definition at line 688 of file ncbireg.hpp.

References CCompoundRegistry::m_CoreCutoff.

Referenced by CCompoundRWRegistry::SetCoreCutoff().

◆ SetCoreCutoff() [2/2]

void CCompoundRWRegistry::SetCoreCutoff ( TPriority  prio)

◆ SetModifiedFlag()

void IRegistry::SetModifiedFlag ( bool  modified,
TFlags  flags = fPersistent 
)

Indicate whether any relevant values are out of sync with some external resource (typically a configuration file).

You should normally not need to call this explicitly.

Parameters
flagsRelevant layer(s).

Definition at line 184 of file ncbireg.cpp.

References flags, IRegistry::fLayerFlags, IRegistry::fPersistent, IRegistry::fTransient, IRegistry::x_CheckFlags(), and IRegistry::x_SetModifiedFlag().

Referenced by CMetaRegistry::Load(), CMetaRegistry::SEntry::Reload(), IRegistry::Write(), IRWRegistry::x_Read(), CTwoLayerRegistry::x_SetModifiedFlag(), CCompoundRWRegistry::x_SetModifiedFlag(), and CSynRegistryToIRegistry::x_SetModifiedFlag().

◆ SetValue() [1/4]

bool IRWRegistry::SetValue ( const string section,
const string name,
bool  value,
TFlags  flags = 0,
const string comment = kEmptyStr 
)
inline

Definition at line 496 of file ncbireg.hpp.

References NStr::BoolToString(), flags, IRWRegistry::Set(), and rapidjson::value.

◆ SetValue() [2/4]

bool IRWRegistry::SetValue ( const string section,
const string name,
const string value,
TFlags  flags = 0,
const string comment = kEmptyStr 
)
inline

Overloading of setters for generic programming.

Definition at line 478 of file ncbireg.hpp.

References flags, IRWRegistry::Set(), and rapidjson::value.

◆ SetValue() [3/4]

bool IRWRegistry::SetValue ( const string section,
const string name,
double  value,
TFlags  flags = 0,
const string comment = kEmptyStr 
)
inline

Definition at line 505 of file ncbireg.hpp.

References flags, IRWRegistry::Set(), and rapidjson::value.

◆ SetValue() [4/4]

bool IRWRegistry::SetValue ( const string section,
const string name,
int  value,
TFlags  flags = 0,
const string comment = kEmptyStr 
)
inline

Definition at line 487 of file ncbireg.hpp.

References flags, NStr::IntToString(), IRWRegistry::Set(), and rapidjson::value.

◆ SSection()

CMemoryRegistry::SSection::SSection ( TFlags  flags)
inline

Definition at line 624 of file ncbireg.hpp.

◆ Unlock()

void IRegistry::Unlock ( void  )

Definition at line 551 of file ncbireg.cpp.

References IRegistry::m_Lock, CRWLock::Unlock(), and IRegistry::x_ChildLockAction().

◆ Unset()

bool IRWRegistry::Unset ( const string section,
const string name,
TFlags  flags = 0 
)

◆ Write()

bool IRegistry::Write ( CNcbiOstream os,
TFlags  flags = 0 
) const

◆ WriteLock()

void IRegistry::WriteLock ( void  )

◆ x_Add()

void CCompoundRWRegistry::x_Add ( const IRegistry reg,
TPriority  prio = ePriority_Default,
const string name = kEmptyStr 
)
protected

◆ x_CheckFlags()

void IRegistry::x_CheckFlags ( const string func,
TFlags flags,
TFlags  allowed 
)
staticprotected

◆ x_ChildLockAction() [1/5]

void CEnvironmentRegistry::x_ChildLockAction ( FLockAction  action)
protectedvirtual

Reimplemented from IRegistry.

Definition at line 211 of file env_reg.cpp.

◆ x_ChildLockAction() [2/5]

void CCompoundRegistry::x_ChildLockAction ( FLockAction  action)
protectedvirtual

Reimplemented from IRegistry.

Definition at line 1353 of file ncbireg.cpp.

References CCompoundRegistry::m_PriorityMap, and NON_CONST_ITERATE.

◆ x_ChildLockAction() [3/5]

void CTwoLayerRegistry::x_ChildLockAction ( FLockAction  action)
protectedvirtual

Reimplemented from IRegistry.

Definition at line 1494 of file ncbireg.cpp.

◆ x_ChildLockAction() [4/5]

void CCompoundRWRegistry::x_ChildLockAction ( FLockAction  action)
protectedvirtual

Reimplemented from IRegistry.

Definition at line 2014 of file ncbireg.cpp.

◆ x_ChildLockAction() [5/5]

virtual void IRegistry::x_ChildLockAction ( FLockAction  )
inlineprotectedvirtual

◆ x_Clear() [1/6]

void CEnvironmentRegistry::x_Clear ( TFlags  flags)
protectedvirtual

Called locked, like the virtual methods inherited from IRegistry.

Implements IRWRegistry.

Definition at line 216 of file env_reg.cpp.

References flags, and IRegistry::fTransient.

◆ x_Clear() [2/6]

void CMemoryRegistry::x_Clear ( TFlags  flags)
protectedvirtual

Called locked, like the virtual methods inherited from IRegistry.

Implements IRWRegistry.

Definition at line 1055 of file ncbireg.cpp.

References map_checker< Container >::clear(), CMemoryRegistry::m_RegistryComment, and CMemoryRegistry::m_Sections.

◆ x_Clear() [3/6]

void CTwoLayerRegistry::x_Clear ( TFlags  flags)
protectedvirtual

Called locked, like the virtual methods inherited from IRegistry.

Implements IRWRegistry.

Definition at line 1501 of file ncbireg.cpp.

References IRWRegistry::Clear(), flags, IRegistry::fPersistent, IRegistry::fTPFlags, IRegistry::fTransient, CTwoLayerRegistry::m_Persistent, and CTwoLayerRegistry::m_Transient.

◆ x_Clear() [4/6]

void CCompoundRWRegistry::x_Clear ( TFlags  flags)
protectedvirtual

◆ x_Clear() [5/6]

void CNcbiRegistry::x_Clear ( TFlags  flags)
protectedvirtual

Called locked, like the virtual methods inherited from IRegistry.

Reimplemented from CCompoundRWRegistry.

Definition at line 1674 of file ncbireg.cpp.

References IRWRegistry::Clear(), flags, CNcbiRegistry::m_FileRegistry, and CCompoundRWRegistry::x_Clear().

◆ x_Clear() [6/6]

virtual void IRWRegistry::x_Clear ( TFlags  flags)
protectedpure virtual

Called locked, like the virtual methods inherited from IRegistry.

Implemented in CNcbiRegistry, CCompoundRWRegistry, CTwoLayerRegistry, CMemoryRegistry, and CEnvironmentRegistry.

Referenced by IRWRegistry::Clear().

◆ x_Empty() [1/6]

bool CEnvironmentRegistry::x_Empty ( TFlags  flags) const
protectedvirtual

Implementations of the fundamental operations above, to be run with the lock already acquired and some basic sanity checks performed.

Implements IRegistry.

Definition at line 93 of file env_reg.cpp.

References CNcbiEnvironment::Enumerate(), ITERATE, CEnvironmentRegistry::m_Env, and CEnvironmentRegistry::m_PriorityMap.

◆ x_Empty() [2/6]

bool CMemoryRegistry::x_Empty ( TFlags  flags) const
protectedvirtual

Implementations of the fundamental operations above, to be run with the lock already acquired and some basic sanity checks performed.

Implements IRegistry.

Definition at line 947 of file ncbireg.cpp.

References map_checker< Container >::empty(), CMemoryRegistry::m_RegistryComment, and CMemoryRegistry::m_Sections.

◆ x_Empty() [3/6]

bool CCompoundRegistry::x_Empty ( TFlags  flags) const
protectedvirtual

True iff all sub-registries are empty.

Implements IRegistry.

Definition at line 1249 of file ncbireg.cpp.

References IRegistry::fJustCore, flags, CCompoundRegistry::m_CoreCutoff, CCompoundRegistry::m_PriorityMap, and REVERSE_ITERATE.

◆ x_Empty() [4/6]

bool CTwoLayerRegistry::x_Empty ( TFlags  flags) const
protectedvirtual

Implementations of the fundamental operations above, to be run with the lock already acquired and some basic sanity checks performed.

Implements IRegistry.

Definition at line 1373 of file ncbireg.cpp.

References IRegistry::Empty(), flags, IRegistry::fPersistent, IRegistry::fTPFlags, IRegistry::fTransient, CTwoLayerRegistry::m_Persistent, and CTwoLayerRegistry::m_Transient.

◆ x_Empty() [5/6]

bool CCompoundRWRegistry::x_Empty ( TFlags  flags) const
protectedvirtual

Implementations of the fundamental operations above, to be run with the lock already acquired and some basic sanity checks performed.

Implements IRegistry.

Definition at line 1900 of file ncbireg.cpp.

References IRegistry::Empty(), flags, and CCompoundRWRegistry::m_AllRegistries.

◆ x_Empty() [6/6]

virtual bool IRegistry::x_Empty ( TFlags  flags) const
protectedpure virtual

Implementations of the fundamental operations above, to be run with the lock already acquired and some basic sanity checks performed.

Implemented in CConfigRegistry, CSynRegistryToIRegistry, CCompoundRWRegistry, CTwoLayerRegistry, CCompoundRegistry, CMemoryRegistry, and CEnvironmentRegistry.

Referenced by IRWRegistry::Clear(), and IRegistry::Empty().

◆ x_Enumerate() [1/6]

void CEnvironmentRegistry::x_Enumerate ( const string section,
list< string > &  entries,
TFlags  flags 
) const
protectedvirtual

◆ x_Enumerate() [2/6]

void CMemoryRegistry::x_Enumerate ( const string section,
list< string > &  entries,
TFlags  flags 
) const
protectedvirtual

◆ x_Enumerate() [3/6]

void CCompoundRegistry::x_Enumerate ( const string section,
list< string > &  entries,
TFlags  flags 
) const
protectedvirtual

◆ x_Enumerate() [4/6]

void CTwoLayerRegistry::x_Enumerate ( const string section,
list< string > &  entries,
TFlags  flags 
) const
protectedvirtual

◆ x_Enumerate() [5/6]

void CCompoundRWRegistry::x_Enumerate ( const string section,
list< string > &  entries,
TFlags  flags 
) const
protectedvirtual

◆ x_Enumerate() [6/6]

virtual void IRegistry::x_Enumerate ( const string section,
list< string > &  entries,
TFlags  flags 
) const
protectedpure virtual

◆ x_Get() [1/7]

const string & CEnvironmentRegistry::x_Get ( const string section,
const string name,
TFlags  flags 
) const
protectedvirtual

Implements IRegistry.

Definition at line 124 of file env_reg.cpp.

References flags.

Referenced by CEnvironmentRegistry::x_HasEntry().

◆ x_Get() [2/7]

const string & CMemoryRegistry::x_Get ( const string section,
const string name,
TFlags  flags 
) const
protectedvirtual

◆ x_Get() [3/7]

const string & CCompoundRegistry::x_Get ( const string section,
const string name,
TFlags  flags 
) const
protectedvirtual

Implements IRegistry.

Definition at line 1290 of file ncbireg.cpp.

References CCompoundRegistry::FindByContents(), IRegistry::fJustCore, flags, and kEmptyStr.

◆ x_Get() [4/7]

const string & CTwoLayerRegistry::x_Get ( const string section,
const string name,
TFlags  flags 
) const
protectedvirtual

◆ x_Get() [5/7]

const string & CCompoundRWRegistry::x_Get ( const string section,
const string name,
TFlags  flags 
) const
protectedvirtual

◆ x_Get() [6/7]

virtual const string& IRegistry::x_Get ( const string section,
const string name,
TFlags  flags 
) const
protectedpure virtual

◆ x_Get() [7/7]

const string & CEnvironmentRegistry::x_Get ( const string section,
const string name,
TFlags  flags,
bool found 
) const
protected

◆ x_GetComment() [1/7]

const string & CEnvironmentRegistry::x_GetComment ( const string section,
const string name,
TFlags  flags 
) const
protectedvirtual

Implements IRegistry.

Definition at line 166 of file env_reg.cpp.

References kEmptyStr.

◆ x_GetComment() [2/7]

const string & CMemoryRegistry::x_GetComment ( const string section,
const string name,
TFlags  flags 
) const
protectedvirtual

◆ x_GetComment() [3/7]

const string & CCompoundRegistry::x_GetComment ( const string section,
const string name,
TFlags  flags 
) const
protectedvirtual

◆ x_GetComment() [4/7]

const string & CTwoLayerRegistry::x_GetComment ( const string section,
const string name,
TFlags  flags 
) const
protectedvirtual

◆ x_GetComment() [5/7]

const string & CCompoundRWRegistry::x_GetComment ( const string section,
const string name,
TFlags  flags 
) const
protectedvirtual

◆ x_GetComment() [6/7]

const string & CNcbiRegistry::x_GetComment ( const string section,
const string name,
TFlags  flags 
) const
protectedvirtual

◆ x_GetComment() [7/7]

virtual const string& IRegistry::x_GetComment ( const string section,
const string name,
TFlags  flags 
) const
protectedpure virtual

◆ x_HasEntry() [1/6]

bool CEnvironmentRegistry::x_HasEntry ( const string section,
const string name,
TFlags  flags 
) const
protectedvirtual

Implements IRegistry.

Definition at line 156 of file env_reg.cpp.

References flags, and CEnvironmentRegistry::x_Get().

◆ x_HasEntry() [2/6]

bool CMemoryRegistry::x_HasEntry ( const string section,
const string name,
TFlags  flags 
) const
protectedvirtual

◆ x_HasEntry() [3/6]

bool CCompoundRegistry::x_HasEntry ( const string section,
const string name,
TFlags  flags 
) const
protectedvirtual

Implements IRegistry.

Definition at line 1300 of file ncbireg.cpp.

References CCompoundRegistry::FindByContents(), and flags.

◆ x_HasEntry() [4/6]

bool CTwoLayerRegistry::x_HasEntry ( const string section,
const string name,
TFlags  flags 
) const
protectedvirtual

◆ x_HasEntry() [5/6]

bool CCompoundRWRegistry::x_HasEntry ( const string section,
const string name,
TFlags  flags 
) const
protectedvirtual

◆ x_HasEntry() [6/6]

virtual bool IRegistry::x_HasEntry ( const string section,
const string name,
TFlags  flags 
) const
protectedpure virtual

◆ x_Init()

void CNcbiRegistry::x_Init ( void  )
inlineprivate

◆ x_Modified() [1/6]

bool CEnvironmentRegistry::x_Modified ( TFlags  flags) const
protectedvirtual

Reimplemented from IRegistry.

Definition at line 110 of file env_reg.cpp.

References flags, IRegistry::fTransient, and CEnvironmentRegistry::m_Modified.

◆ x_Modified() [2/6]

bool CCompoundRegistry::x_Modified ( TFlags  flags) const
protectedvirtual

True iff any sub-registry is modified.

Reimplemented from IRegistry.

Definition at line 1263 of file ncbireg.cpp.

References IRegistry::fJustCore, flags, CCompoundRegistry::m_CoreCutoff, CCompoundRegistry::m_PriorityMap, and REVERSE_ITERATE.

◆ x_Modified() [3/6]

bool CTwoLayerRegistry::x_Modified ( TFlags  flags) const
protectedvirtual

◆ x_Modified() [4/6]

bool CCompoundRWRegistry::x_Modified ( TFlags  flags) const
protectedvirtual

Reimplemented from IRegistry.

Definition at line 1906 of file ncbireg.cpp.

References flags, CCompoundRWRegistry::m_AllRegistries, and IRegistry::Modified().

◆ x_Modified() [5/6]

virtual bool IRegistry::x_Modified ( TFlags  ) const
inlineprotectedvirtual

◆ x_Modified() [6/6]

bool CMemoryRegistry::x_Modified ( TFlags  ) const
inlineprotectedvirtual

Reimplemented from IRegistry.

Definition at line 599 of file ncbireg.hpp.

References CMemoryRegistry::m_IsModified.

◆ x_Read() [1/3]

IRWRegistry * IRWRegistry::x_Read ( CNcbiIstream is,
TFlags  flags,
const string path 
)
protectedvirtual

◆ x_Read() [2/3]

IRWRegistry * CCompoundRWRegistry::x_Read ( CNcbiIstream is,
TFlags  flags,
const string path 
)
protectedvirtual

Most implementations should not override this, but CNcbiRegistry must, to handle some special cases properly.

Reimplemented from IRWRegistry.

Reimplemented in CNcbiRegistry.

Definition at line 2080 of file ncbireg.cpp.

References IRegistry::Empty(), flags, IRegistry::fNoOverride, IRegistry::fOverride, IRegistry::fPersistent, in(), CCompoundRWRegistry::LoadBaseRegistries(), NULL, and IRWRegistry::x_Read().

Referenced by CNcbiRegistry::x_Read().

◆ x_Read() [3/3]

IRWRegistry * CNcbiRegistry::x_Read ( CNcbiIstream is,
TFlags  flags,
const string path 
)
protectedvirtual

◆ x_Set() [1/5]

bool CEnvironmentRegistry::x_Set ( const string section,
const string name,
const string value,
TFlags  flags,
const string comment 
)
protectedvirtual

◆ x_Set() [2/5]

bool CMemoryRegistry::x_Set ( const string section,
const string name,
const string value,
TFlags  flags,
const string comment 
)
protectedvirtual

◆ x_Set() [3/5]

bool CTwoLayerRegistry::x_Set ( const string section,
const string name,
const string value,
TFlags  flags,
const string comment 
)
protectedvirtual

◆ x_Set() [4/5]

bool CCompoundRWRegistry::x_Set ( const string section,
const string name,
const string value,
TFlags  flags,
const string comment 
)
protectedvirtual

◆ x_Set() [5/5]

virtual bool IRWRegistry::x_Set ( const string section,
const string name,
const string value,
TFlags  flags,
const string comment 
)
protectedpure virtual

◆ x_SetComment() [1/5]

bool CEnvironmentRegistry::x_SetComment ( const string comment,
const string section,
const string name,
TFlags  flags 
)
protectedvirtual

Implements IRWRegistry.

Definition at line 281 of file env_reg.cpp.

References ERR_POST_X, and Warning().

◆ x_SetComment() [2/5]

bool CMemoryRegistry::x_SetComment ( const string comment,
const string section,
const string name,
TFlags  flags 
)
protectedvirtual

◆ x_SetComment() [3/5]

bool CTwoLayerRegistry::x_SetComment ( const string comment,
const string section,
const string name,
TFlags  flags 
)
protectedvirtual

◆ x_SetComment() [4/5]

bool CCompoundRWRegistry::x_SetComment ( const string comment,
const string section,
const string name,
TFlags  flags 
)
protectedvirtual

Implements IRWRegistry.

Definition at line 2072 of file ncbireg.cpp.

References flags, CCompoundRWRegistry::m_MainRegistry, and IRWRegistry::SetComment().

◆ x_SetComment() [5/5]

virtual bool IRWRegistry::x_SetComment ( const string comment,
const string section,
const string name,
TFlags  flags 
)
protectedpure virtual

◆ x_SetModifiedFlag() [1/6]

void CEnvironmentRegistry::x_SetModifiedFlag ( bool  modified,
TFlags  flags 
)
protectedvirtual

Reimplemented from IRegistry.

Definition at line 116 of file env_reg.cpp.

References flags, IRegistry::fTransient, and CEnvironmentRegistry::m_Modified.

◆ x_SetModifiedFlag() [2/6]

void CCompoundRegistry::x_SetModifiedFlag ( bool  modified,
TFlags  flags 
)
protectedvirtual

◆ x_SetModifiedFlag() [3/6]

void CTwoLayerRegistry::x_SetModifiedFlag ( bool  modified,
TFlags  flags 
)
protectedvirtual

◆ x_SetModifiedFlag() [4/6]

void CCompoundRWRegistry::x_SetModifiedFlag ( bool  modified,
TFlags  flags 
)
protectedvirtual

◆ x_SetModifiedFlag() [5/6]

void CMemoryRegistry::x_SetModifiedFlag ( bool  modified,
TFlags   
)
inlineprotectedvirtual

Reimplemented from IRegistry.

Definition at line 600 of file ncbireg.hpp.

References CMemoryRegistry::m_IsModified.

◆ x_SetModifiedFlag() [6/6]

virtual void IRegistry::x_SetModifiedFlag ( bool  ,
TFlags   
)
inlineprotectedvirtual

◆ x_Unset() [1/5]

bool CEnvironmentRegistry::x_Unset ( const string section,
const string name,
TFlags  flags 
)
protectedvirtual

◆ x_Unset() [2/5]

bool CMemoryRegistry::x_Unset ( const string section,
const string name,
TFlags  flags 
)
protectedvirtual

◆ x_Unset() [3/5]

bool CTwoLayerRegistry::x_Unset ( const string section,
const string name,
TFlags  flags 
)
protectedvirtual

◆ x_Unset() [4/5]

bool CCompoundRWRegistry::x_Unset ( const string section,
const string name,
TFlags  flags 
)
protectedvirtual

◆ x_Unset() [5/5]

virtual bool IRWRegistry::x_Unset ( const string section,
const string name,
TFlags  flags 
)
protectedpure virtual

◆ ~CCompoundRWRegistry()

CCompoundRWRegistry::~CCompoundRWRegistry ( )

Destructor.

Definition at line 1762 of file ncbireg.cpp.

◆ ~CEnvironmentRegistry()

CEnvironmentRegistry::~CEnvironmentRegistry ( )

Destructor.

Definition at line 66 of file env_reg.cpp.

◆ ~CNcbiRegistry()

CNcbiRegistry::~CNcbiRegistry ( )

Definition at line 1629 of file ncbireg.cpp.

Variable Documentation

◆ cleared

bool CMemoryRegistry::SSection::cleared

Definition at line 631 of file ncbireg.hpp.

◆ comment [1/2]

string CMemoryRegistry::SEntry::comment

Definition at line 620 of file ncbireg.hpp.

Referenced by CMemoryRegistry::x_Set().

◆ comment [2/2]

string CMemoryRegistry::SSection::comment

Definition at line 628 of file ncbireg.hpp.

◆ entries

TEntries CMemoryRegistry::SSection::entries

Definition at line 630 of file ncbireg.hpp.

◆ in_section_comment

string CMemoryRegistry::SSection::in_section_comment

Definition at line 629 of file ncbireg.hpp.

◆ m_AllRegistries

CRef<CCompoundRegistry> CCompoundRWRegistry::m_AllRegistries
private

◆ m_BaseRegNames

set<string> CCompoundRWRegistry::m_BaseRegNames
private

◆ m_ClearedEntries

TClearedEntries CCompoundRWRegistry::m_ClearedEntries
private

◆ m_CoreCutoff

TPriority CCompoundRegistry::m_CoreCutoff
private

◆ m_Env

AutoPtr<CNcbiEnvironment> CEnvironmentRegistry::m_Env
private

◆ m_EnvRegistry

CRef<CEnvironmentRegistry> CNcbiRegistry::m_EnvRegistry
private

Definition at line 984 of file ncbireg.hpp.

Referenced by CNcbiRegistry::x_Init().

◆ m_FileRegistry

CRef<CTwoLayerRegistry> CNcbiRegistry::m_FileRegistry
private

◆ m_Flags [1/4]

TFlags CEnvironmentRegistry::m_Flags
private

◆ m_Flags [2/4]

TFlags CMemoryRegistry::m_Flags
private

Definition at line 639 of file ncbireg.hpp.

Referenced by CMemoryRegistry::x_Set(), and CMemoryRegistry::x_SetComment().

◆ m_Flags [3/4]

TFlags CCompoundRWRegistry::m_Flags
private

Definition at line 895 of file ncbireg.hpp.

Referenced by CCompoundRWRegistry::LoadBaseRegistries().

◆ m_Flags [4/4]

TFlags CNcbiRegistry::m_Flags
private

Definition at line 989 of file ncbireg.hpp.

Referenced by CNcbiRegistry::x_Init(), and CNcbiRegistry::x_Read().

◆ m_IsModified

bool CMemoryRegistry::m_IsModified
private

Definition at line 636 of file ncbireg.hpp.

Referenced by CMemoryRegistry::x_Modified(), and CMemoryRegistry::x_SetModifiedFlag().

◆ m_Lock

CRWLock IRegistry::m_Lock
mutableprivate

Definition at line 392 of file ncbireg.hpp.

Referenced by IRegistry::ReadLock(), IRegistry::Unlock(), and IRegistry::WriteLock().

◆ m_MainRegistry

CRef<CTwoLayerRegistry> CCompoundRWRegistry::m_MainRegistry
private

◆ m_Modified

bool CEnvironmentRegistry::m_Modified
private

only tracks mods made through this.

Definition at line 140 of file env_reg.hpp.

Referenced by CEnvironmentRegistry::x_Modified(), and CEnvironmentRegistry::x_SetModifiedFlag().

◆ m_NameMap

TNameMap CCompoundRegistry::m_NameMap
private

excludes anonymous sub-registries

Definition at line 727 of file ncbireg.hpp.

Referenced by CCompoundRegistry::Add(), CCompoundRegistry::FindByName(), and CCompoundRegistry::Remove().

◆ m_OverrideRegistry

CRef<IRWRegistry> CNcbiRegistry::m_OverrideRegistry
private

Definition at line 986 of file ncbireg.hpp.

Referenced by CNcbiRegistry::x_Init().

◆ m_Persistent

CRegRef CTwoLayerRegistry::m_Persistent
private

◆ m_Prefix

string CSimpleEnvRegMapper::m_Prefix
private

◆ m_PriorityMap [1/2]

TPriorityMap CEnvironmentRegistry::m_PriorityMap
private

◆ m_PriorityMap [2/2]

TPriorityMap CCompoundRegistry::m_PriorityMap
private

◆ m_RegistryComment

string CMemoryRegistry::m_RegistryComment
private

◆ m_RuntimeOverrideCount

unsigned int CNcbiRegistry::m_RuntimeOverrideCount
private

Definition at line 988 of file ncbireg.hpp.

Referenced by CNcbiRegistry::x_Read().

◆ m_Section

string CSimpleEnvRegMapper::m_Section
private

Definition at line 166 of file env_reg.hpp.

Referenced by CSimpleEnvRegMapper::EnvToReg(), and CSimpleEnvRegMapper::RegToEnv().

◆ m_Sections

TSections CMemoryRegistry::m_Sections
private

◆ m_Suffix

string CSimpleEnvRegMapper::m_Suffix
private

Definition at line 166 of file env_reg.hpp.

Referenced by CSimpleEnvRegMapper::EnvToReg(), and CSimpleEnvRegMapper::RegToEnv().

◆ m_SysRegistry

CRef<IRWRegistry> CNcbiRegistry::m_SysRegistry
private

Definition at line 987 of file ncbireg.hpp.

Referenced by CNcbiRegistry::IncludeNcbircIfAllowed(), and CNcbiRegistry::x_Init().

◆ m_Transient

CRegRef CTwoLayerRegistry::m_Transient
private

◆ sm_BaseRegNamePrefix

const char * CCompoundRWRegistry::sm_BaseRegNamePrefix = ".base:"
static

Prefix for any base registries' names.

Definition at line 858 of file ncbireg.hpp.

Referenced by CCompoundRWRegistry::LoadBaseRegistries(), and CCompoundRWRegistry::x_Clear().

◆ sm_EnvRegName

const char * CNcbiRegistry::sm_EnvRegName = ".env"
static

Predefined subregistries' names.

Definition at line 963 of file ncbireg.hpp.

Referenced by CNcbiRegistry::x_Init().

◆ sm_FileRegName

const char * CNcbiRegistry::sm_FileRegName = ".file"
static

Definition at line 964 of file ncbireg.hpp.

Referenced by CCompoundRWRegistry::LoadBaseRegistries(), and CNcbiRegistry::x_Init().

◆ sm_InSectionCommentName

const char * IRegistry::sm_InSectionCommentName = "[]"
static

◆ sm_MainRegName

const char * CCompoundRWRegistry::sm_MainRegName = ".main"
static

Predefined subregistry's name.

Definition at line 856 of file ncbireg.hpp.

Referenced by CCompoundRWRegistry::CCompoundRWRegistry(), and CNcbiRegistry::x_Read().

◆ sm_OverrideRegName

const char * CNcbiRegistry::sm_OverrideRegName = ".overrides"
static

Definition at line 965 of file ncbireg.hpp.

Referenced by CNcbiRegistry::x_Init(), and CNcbiRegistry::x_Read().

◆ sm_Prefix

const char * CNcbiEnvRegMapper::sm_Prefix = "NCBI_CONFIG_"
staticprivate

◆ sm_SysRegName

const char * CNcbiRegistry::sm_SysRegName = ".ncbirc"
static

Definition at line 966 of file ncbireg.hpp.

Referenced by CNcbiRegistry::x_Init().

◆ value

string CMemoryRegistry::SEntry::value

Definition at line 620 of file ncbireg.hpp.

Referenced by CMemoryRegistry::x_Set().

Friends

◆ CCompoundRWRegistry

friend class CCompoundRWRegistry
friend

Definition at line 730 of file ncbireg.hpp.

Modified on Sat Apr 27 11:18:07 2024 by modify_doxy.py rev. 669887