summaryrefslogtreecommitdiff
path: root/src/cnode/cnode-algorithm.hpp
diff options
context:
space:
mode:
authorAn-Cheng Huang <ancheng@vyatta.com>2011-03-17 11:48:54 -0700
committerAn-Cheng Huang <ancheng@vyatta.com>2011-03-17 11:48:54 -0700
commiteb9f5718d412022015bb65eb08c30785c79e79e6 (patch)
treebe0b6a9de27965e39c44c5c8a88adf9caa13abf8 /src/cnode/cnode-algorithm.hpp
parentcda3f423c311fd30e8cc24e2de67d99baf352b2a (diff)
downloadvyatta-cfg-eb9f5718d412022015bb65eb08c30785c79e79e6.tar.gz
vyatta-cfg-eb9f5718d412022015bb65eb08c30785c79e79e6.zip
add config path abstraction and high-level caching
* part of the config backend cleanup/optimization work. * improves the performance of "load" (w/o commit) by ~55% and "show" by ~15%.
Diffstat (limited to 'src/cnode/cnode-algorithm.hpp')
-rw-r--r--src/cnode/cnode-algorithm.hpp16
1 files changed, 7 insertions, 9 deletions
diff --git a/src/cnode/cnode-algorithm.hpp b/src/cnode/cnode-algorithm.hpp
index c473d6a..2f8995d 100644
--- a/src/cnode/cnode-algorithm.hpp
+++ b/src/cnode/cnode-algorithm.hpp
@@ -22,9 +22,8 @@
namespace cnode {
void show_cfg_diff(const CfgNode& cfg1, const CfgNode& cfg2,
- vector<string>& cur_path,
- bool show_def = false, bool hide_secret = false,
- bool context_diff = false);
+ Cpath& cur_path, bool show_def = false,
+ bool hide_secret = false, bool context_diff = false);
void show_cfg(const CfgNode& cfg, bool show_def = false,
bool hide_secret = false);
@@ -32,17 +31,16 @@ void show_cmds_diff(const CfgNode& cfg1, const CfgNode& cfg2);
void show_cmds(const CfgNode& cfg);
void get_cmds_diff(const CfgNode& cfg1, const CfgNode& cfg2,
- vector<vector<string> >& del_list,
- vector<vector<string> >& set_list,
- vector<vector<string> >& com_list);
-void get_cmds(const CfgNode& cfg, vector<vector<string> >& set_list,
- vector<vector<string> >& com_list);
+ vector<Cpath>& del_list, vector<Cpath>& set_list,
+ vector<Cpath>& com_list);
+void get_cmds(const CfgNode& cfg, vector<Cpath>& set_list,
+ vector<Cpath>& com_list);
extern const string ACTIVE_CFG;
extern const string WORKING_CFG;
void showConfig(const string& cfg1, const string& cfg2,
- const vector<string>& path, bool show_def = false,
+ const Cpath& path, bool show_def = false,
bool hide_secret = false, bool context_diff = false,
bool show_cmds = false);