#include <env_reg.hpp>
Inheritance diagram for CEnvironmentRegistry:


Adapts CNcbiEnvironment to act like a registry. Leaves all caching of values to CNcbiEnvironment, and does not support comments. Always transient, though making it the persistent side of a CTwoLayerRegistry can mask that.
Uses customizable mappers between environment variable names and registry section/name pairs; see below for details.
Definition at line 86 of file env_reg.hpp.
Public Types | |
| typedef int | TPriority |
| Not restricted to ePriority_*. | |
| enum | EPriority { ePriority_Min = kMin_Int, ePriority_Default = 0, ePriority_Max = kMax_Int } |
Public Member Functions | |
| CEnvironmentRegistry (TFlags flags=0) | |
| Constructors. | |
| CEnvironmentRegistry (CNcbiEnvironment &env, EOwnership own=eNoOwnership, TFlags flags=0) | |
| ~CEnvironmentRegistry () | |
| Destructor. | |
| void | AddMapper (const IEnvRegMapper &mapper, TPriority prio=ePriority_Default) |
| void | RemoveMapper (const IEnvRegMapper &mapper) |
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) |
Private Types | |
| typedef multimap< TPriority, CConstRef< IEnvRegMapper > > | TPriorityMap |
Private Member Functions | |
| CEnvironmentRegistry (const CEnvironmentRegistry &) | |
| Copying prohibited. | |
Private Attributes | |
| AutoPtr< CNcbiEnvironment > | m_Env |
| TPriorityMap | m_PriorityMap |
| bool | m_Modified |
| only tracks mods made through this. | |
| TFlags | m_Flags |
|
|
Not restricted to ePriority_*.
Definition at line 102 of file env_reg.hpp. |
|
|
Definition at line 133 of file env_reg.hpp. |
|
|
Definition at line 97 of file env_reg.hpp. |
|
|
Constructors.
Definition at line 47 of file env_reg.cpp. References AddMapper(). |
|
||||||||||||||||
|
Definition at line 55 of file env_reg.cpp. References AddMapper(). |
|
|
Destructor.
Definition at line 63 of file env_reg.cpp. |
|
|
Copying prohibited.
Definition at line 131 of file env_reg.hpp. |
|
||||||||||||
|
Definition at line 68 of file env_reg.cpp. References multimap_checker< Container >::insert(), and m_PriorityMap. Referenced by CEnvironmentRegistry(). |
|
|
Definition at line 76 of file env_reg.cpp. References multimap_checker< Container >::erase(), m_PriorityMap, NCBI_THROW2, and NON_CONST_ITERATE. |
|
|
Definition at line 191 of file env_reg.cpp. |
|
|
Called locked, like the virtual methods inherited from IRegistry.
Implements IRWRegistry. Definition at line 196 of file env_reg.cpp. References IRegistry::fTransient. |
|
|
Definition at line 90 of file env_reg.cpp. References ITERATE, m_Env, and m_PriorityMap. |
|
||||||||||||||||
|
Definition at line 159 of file env_reg.cpp. References IRegistry::fTransient, ITERATE, m_Env, and m_PriorityMap. |
|
||||||||||||||||
|
Definition at line 121 of file env_reg.cpp. References IRegistry::fCaseFlags, IRegistry::fCountCleared, IRegistry::fPersistent, IRegistry::fTPFlags, kEmptyStr, m_Env, m_Flags, m_PriorityMap, REVERSE_ITERATE, and NStr::ToUpper(). Referenced by x_HasEntry(). |
|
||||||||||||||||
|
Definition at line 152 of file env_reg.cpp. References kEmptyStr. |
|
||||||||||||||||
|
Definition at line 144 of file env_reg.cpp. |
|
|
Definition at line 107 of file env_reg.cpp. References IRegistry::fTransient, and m_Modified. |
|
||||||||||||||||||||||||
|
Implements IRWRegistry. Definition at line 204 of file env_reg.cpp. References IRegistry::fCaseFlags, m_Env, m_Flags, m_PriorityMap, IRWRegistry::MaybeSet(), REVERSE_ITERATE, and NStr::ToUpper(). |
|
||||||||||||||||||||
|
Implements IRWRegistry. Definition at line 233 of file env_reg.cpp. References ERR_POST_X. |
|
||||||||||||
|
Definition at line 113 of file env_reg.cpp. References IRegistry::fTransient, and m_Modified. |
|
|
Definition at line 135 of file env_reg.hpp. Referenced by x_Empty(), x_Enumerate(), x_Get(), and x_Set(). |
|
|
Definition at line 138 of file env_reg.hpp. |
|
|
only tracks mods made through this.
Definition at line 137 of file env_reg.hpp. Referenced by x_Modified(), and x_SetModifiedFlag(). |
|
|
Definition at line 136 of file env_reg.hpp. Referenced by AddMapper(), RemoveMapper(), x_Empty(), x_Enumerate(), x_Get(), and x_Set(). |
1.4.6
Modified on Mon Dec 07 16:23:03 2009 by modify_doxy.py rev. 173732