#include <ncbireg.hpp>
Inheritance diagram for CCompoundRWRegistry:


Writeable compound registry.
Compound registry whose top layer is a two-layer registry; all writes go to the two-layer registry.
Definition at line 651 of file ncbireg.hpp.
Public Types | |
| typedef int | TPriority |
| Not restricted to ePriority_*. | |
| enum | EPriority { ePriority_MinUser = CCompoundRegistry::ePriority_Min, ePriority_Default = CCompoundRegistry::ePriority_Default, ePriority_MaxUser = CCompoundRegistry::ePriority_Max - 0x10000, ePriority_Reserved } |
| Priority for sub-registries; entries in higher-priority sub-registries take precedence over (identically named) entries in lower-priority ones. More... | |
Public Member Functions | |
| CCompoundRWRegistry (TFlags m_Flags=0) | |
| Constructor. | |
| ~CCompoundRWRegistry () | |
| Destructor. | |
| TPriority | 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. | |
| void | SetCoreCutoff (TPriority prio) |
| void | Add (const IRegistry ®, 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. | |
| void | Remove (const IRegistry ®) |
| Remove sub-registry "reg". | |
| CConstRef< IRegistry > | FindByName (const string &name) const |
| Return a pointer to the sub-registry with the given name, or NULL if not found. | |
| CConstRef< IRegistry > | FindByContents (const string §ion, 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. | |
| bool | LoadBaseRegistries (TFlags flags=0, intmetareg_flags=0) |
| Load any base registries listed in [NCBI].Inherits; returns true if able to load at least one, false otherwise. | |
Static Public Attributes | |
| static const char * | sm_MainRegName = ".main" |
| Predefined subregistry's name. | |
| static const char * | sm_BaseRegNamePrefix = ".base:" |
| Prefix for any base registries' names. | |
Protected Member Functions | |
| bool | x_Empty (TFlags flags) const |
| bool | x_Modified (TFlags flags) const |
| void | x_SetModifiedFlag (bool modified, TFlags flags) |
| const string & | x_Get (const string §ion, const string &name, TFlags flags) const |
| bool | x_HasEntry (const string §ion, const string &name, TFlags flags) const |
| const string & | x_GetComment (const string §ion, const string &name, TFlags flags) const |
| void | x_Enumerate (const string §ion, list< string > &entries, TFlags flags) const |
| void | x_ChildLockAction (FLockAction action) |
| void | x_Clear (TFlags flags) |
| Called locked, like the virtual methods inherited from IRegistry. | |
| bool | x_Set (const string §ion, const string &name, const string &value, TFlags flags, const string &comment) |
| bool | x_SetComment (const string &comment, const string §ion, const string &name, TFlags flags) |
| IRWRegistry * | x_Read (CNcbiIstream &is, TFlags flags) |
| Most implementations should not override this, but CNcbiRegistry must, to handle some special cases properly. | |
| void | x_Add (const IRegistry ®, TPriority prio=ePriority_Default, const string &name=kEmptyStr) |
| Add an internal high-priority subregistry. | |
Private Types | |
| typedef map< string, TFlags > | TClearedEntries |
Private Attributes | |
| TClearedEntries | m_ClearedEntries |
| CRef< CTwoLayerRegistry > | m_MainRegistry |
| CRef< CCompoundRegistry > | m_AllRegistries |
| set< string > | m_BaseRegNames |
| TFlags | m_Flags |
|
|
Definition at line 737 of file ncbireg.hpp. |
|
|
Not restricted to ePriority_*.
Definition at line 669 of file ncbireg.hpp. |
|
|
Priority for sub-registries; entries in higher-priority sub-registries take precedence over (identically named) entries in lower-priority ones. Ties are broken arbitrarily.
Definition at line 663 of file ncbireg.hpp. |
|
|
Constructor.
Definition at line 1484 of file ncbireg.cpp. References CCompoundRegistry::ePriority_Max, m_MainRegistry, sm_MainRegName, and x_Add(). Referenced by CNcbiRegistry::x_Init(). |
|
|
Destructor.
Definition at line 1494 of file ncbireg.cpp. |
|
||||||||||||||||
|
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 1511 of file ncbireg.cpp. References NCBI_THROW2. |
|
||||||||||||||||
|
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 1545 of file ncbireg.cpp. References m_AllRegistries. |
|
|
Return a pointer to the sub-registry with the given name, or NULL if not found.
Definition at line 1539 of file ncbireg.cpp. References m_AllRegistries. Referenced by LoadBaseRegistries(), x_Clear(), and CNcbiRegistry::x_Read(). |
|
|
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 1499 of file ncbireg.cpp. References m_AllRegistries. Referenced by x_Enumerate(). |
|
||||||||||||
|
Load any base registries listed in [NCBI].Inherits; returns true if able to load at least one, false otherwise.
Definition at line 1553 of file ncbireg.cpp. References _TRACE, FindByName(), IRegistry::fJustCore, m_MainRegistry, CNcbiRegistry::sm_FileRegName, and NStr::Split(). Referenced by x_Read(), and CNcbiRegistry::x_Read(). |
|
|
Remove sub-registry "reg". Throw an exception if "reg" is not a (direct) sub-registry. Definition at line 1527 of file ncbireg.cpp. References CRef< C, Locker >::GetPointer(), m_MainRegistry, and NCBI_THROW2. Referenced by x_Clear(). |
|
|
Definition at line 1505 of file ncbireg.cpp. References m_AllRegistries. |
|
||||||||||||||||
|
Add an internal high-priority subregistry.
Definition at line 1770 of file ncbireg.cpp. References m_AllRegistries. Referenced by CCompoundRWRegistry(), and CNcbiRegistry::x_Init(). |
|
|
Definition at line 1703 of file ncbireg.cpp. |
|
|
Called locked, like the virtual methods inherited from IRegistry.
Implements IRWRegistry. Reimplemented in CNcbiRegistry. Definition at line 1709 of file ncbireg.cpp. References set< Key, Compare >::clear(), FindByName(), ITERATE, m_BaseRegNames, m_MainRegistry, Remove(), and sm_BaseRegNamePrefix. Referenced by CNcbiRegistry::x_Clear(). |
|
|
Definition at line 1609 of file ncbireg.cpp. References CRef< C, Locker >::Empty(), and m_AllRegistries. |
|
||||||||||||||||
|
Definition at line 1674 of file ncbireg.cpp. References map_checker< Container >::end(), map_checker< Container >::find(), IRegistry::fJustCore, GetCoreCutoff(), set< Key, Compare >::insert(), ITERATE, m_AllRegistries, m_ClearedEntries, REVERSE_ITERATE, and s_FlatKey(). |
|
||||||||||||||||
|
Definition at line 1632 of file ncbireg.cpp. References map_checker< Container >::end(), map_checker< Container >::find(), IRegistry::fJustCore, kEmptyStr, m_ClearedEntries, and s_FlatKey(). |
|
||||||||||||||||
|
Definition at line 1666 of file ncbireg.cpp. References m_AllRegistries. |
|
||||||||||||||||
|
Definition at line 1648 of file ncbireg.cpp. References map_checker< Container >::end(), map_checker< Container >::find(), IRegistry::fJustCore, m_ClearedEntries, and s_FlatKey(). |
|
|
Definition at line 1615 of file ncbireg.cpp. References m_AllRegistries. |
|
||||||||||||
|
Most implementations should not override this, but CNcbiRegistry must, to handle some special cases properly.
Reimplemented from IRWRegistry. Reimplemented in CNcbiRegistry. Definition at line 1756 of file ncbireg.cpp. References IRegistry::Empty(), IRegistry::fOverride, IRegistry::fPersistent, LoadBaseRegistries(), and IRWRegistry::x_Read(). |
|
||||||||||||||||||||||||
|
Implements IRWRegistry. Definition at line 1720 of file ncbireg.cpp. References _TRACE, IRegistry::fLayerFlags, IRegistry::fPersistent, IRegistry::Get(), IRegistry::HasEntry(), m_ClearedEntries, m_MainRegistry, and s_FlatKey(). |
|
||||||||||||||||||||
|
Implements IRWRegistry. Definition at line 1748 of file ncbireg.cpp. References m_MainRegistry. |
|
||||||||||||
|
Definition at line 1621 of file ncbireg.cpp. References m_AllRegistries, and m_MainRegistry. |
|
|
Definition at line 741 of file ncbireg.hpp. Referenced by FindByContents(), FindByName(), GetCoreCutoff(), SetCoreCutoff(), x_Add(), x_Empty(), x_Enumerate(), x_GetComment(), x_Modified(), and x_SetModifiedFlag(). |
|
|
Definition at line 742 of file ncbireg.hpp. Referenced by x_Clear(). |
|
|
Definition at line 739 of file ncbireg.hpp. Referenced by x_Enumerate(), x_Get(), x_HasEntry(), and x_Set(). |
|
|
Reimplemented in CNcbiRegistry. Definition at line 743 of file ncbireg.hpp. |
|
|
Definition at line 740 of file ncbireg.hpp. Referenced by CCompoundRWRegistry(), LoadBaseRegistries(), Remove(), x_Clear(), x_Set(), x_SetComment(), and x_SetModifiedFlag(). |
|
|
Prefix for any base registries' names.
Definition at line 707 of file ncbireg.hpp. Referenced by x_Clear(). |
|
|
Predefined subregistry's name.
Definition at line 705 of file ncbireg.hpp. Referenced by CCompoundRWRegistry(), and CNcbiRegistry::x_Read(). |
1.4.6
Modified on Mon Dec 07 16:22:52 2009 by modify_doxy.py rev. 173732