src/corelib/ncbi_config.cpp File Reference

#include <ncbi_pch.hpp>
#include <corelib/ncbistd.hpp>
#include <corelib/ncbi_config.hpp>
#include <corelib/ncbidll.hpp>
#include <corelib/ncbireg.hpp>
#include <corelib/error_codes.hpp>
#include <algorithm>
#include <memory>
#include <set>

Include dependency graph for ncbi_config.cpp:

Go to the source code of this file.

Classes

struct  SNodeNameUpdater

Defines

#define NCBI_USE_ERRCODE_X   Corelib_Config

Typedefs

typedef CConfig::TParamTree TParamTree
typedef CConfig::TParamValue TParamValue
typedef map< TParamTree *,
set< string > > 
TSectionMap

Functions

static void s_List2Set (const list< string > &src, set< string > *dst)
bool s_IsSubNode (const string &str)
void s_AddOrReplaceSubNode (TParamTree *node_ptr, const string &element_name, const string &element_value)
TParamTrees_FindSubNode (const string &path, TParamTree *tree_root)
void s_ParseSubNodes (const string &sub_nodes, TParamTree *parent_node, TSectionMap &inc_sections, set< string > &rm_sections)
bool s_IsParentNode (TParamTree *parent, TParamTree *child)
void s_IncludeNode (TParamTree *parent_node, const TParamTree *inc_node)
void s_ExpandSubNodes (TSectionMap &inc_sections, TParamTree *tree_root, TParamTree *node)

Variables

static const char * kSubNode = ".SubNode"
static const char * kSubSection = ".SubSection"
static const char * kNodeName = ".NodeName"
static const char * kIncludeSections = ".Include"


Define Documentation

#define NCBI_USE_ERRCODE_X   Corelib_Config
 

Definition at line 46 of file ncbi_config.cpp.


Typedef Documentation

typedef CConfig::TParamTree TParamTree
 

Definition at line 79 of file ncbi_config.cpp.

typedef CConfig::TParamValue TParamValue
 

Definition at line 80 of file ncbi_config.cpp.

typedef map<TParamTree*, set<string> > TSectionMap
 

Definition at line 81 of file ncbi_config.cpp.


Function Documentation

void s_AddOrReplaceSubNode TParamTree node_ptr,
const string &  element_name,
const string &  element_value
 

Definition at line 84 of file ncbi_config.cpp.

Referenced by CConfig::ConvertRegToTree().

void s_ExpandSubNodes TSectionMap inc_sections,
TParamTree tree_root,
TParamTree node
 

Definition at line 170 of file ncbi_config.cpp.

References _TRACE, map_checker< Container >::begin(), map_checker< Container >::end(), map_checker< Container >::erase(), map_checker< Container >::find(), ITERATE, s_FindSubNode(), s_IncludeNode(), and s_IsParentNode().

TParamTree* s_FindSubNode const string &  path,
TParamTree tree_root
 

Definition at line 100 of file ncbi_config.cpp.

References NStr::Split().

Referenced by s_ExpandSubNodes().

void s_IncludeNode TParamTree parent_node,
const TParamTree inc_node
 

Definition at line 150 of file ncbi_config.cpp.

Referenced by s_ExpandSubNodes().

bool s_IsParentNode TParamTree parent,
TParamTree child
 

Definition at line 137 of file ncbi_config.cpp.

Referenced by s_ExpandSubNodes().

bool s_IsSubNode const string &  str  ) 
 

Definition at line 67 of file ncbi_config.cpp.

References NStr::CompareNocase(), kSubNode, and kSubSection.

Referenced by CConfig::ConvertRegToTree().

static void s_List2Set const list< string > &  src,
set< string > *  dst
[static]
 

Definition at line 59 of file ncbi_config.cpp.

References set< Key, Compare >::insert(), and ITERATE.

Referenced by CConfig::ConvertRegToTree(), and s_ParseSubNodes().

void s_ParseSubNodes const string &  sub_nodes,
TParamTree parent_node,
TSectionMap inc_sections,
set< string > &  rm_sections
 

Definition at line 112 of file ncbi_config.cpp.

References auto_ptr< X >::get(), set< Key, Compare >::insert(), map_checker< Container >::insert(), ITERATE, pos, auto_ptr< X >::release(), s_List2Set(), and NStr::Split().

Referenced by CConfig::ConvertRegToTree().


Variable Documentation

const char* kIncludeSections = ".Include" [static]
 

Definition at line 55 of file ncbi_config.cpp.

Referenced by CConfig::ConvertRegToTree().

const char* kNodeName = ".NodeName" [static]
 

Definition at line 54 of file ncbi_config.cpp.

Referenced by CConfig::ConvertRegToTree(), and SNodeNameUpdater::operator()().

const char* kSubNode = ".SubNode" [static]
 

Definition at line 52 of file ncbi_config.cpp.

Referenced by s_IsSubNode().

const char* kSubSection = ".SubSection" [static]
 

Definition at line 53 of file ncbi_config.cpp.

Referenced by s_IsSubNode().


Generated on Mon Dec 7 07:36:00 2009 for NCBI C++ ToolKit by  doxygen 1.4.6
Modified on Mon Dec 07 16:21:45 2009 by modify_doxy.py rev. 173732