diff options
author | An-Cheng Huang <ancheng@vyatta.com> | 2010-12-02 14:35:25 -0800 |
---|---|---|
committer | An-Cheng Huang <ancheng@vyatta.com> | 2010-12-02 14:35:25 -0800 |
commit | 352a9e94534933aca7403e91d1dc55c26bf633ce (patch) | |
tree | df413a5fbd1ab0e0b4776eff98149dd9cbc8006d /src/cstore/cstore.hpp | |
parent | 58005829f825c3e6843d0c2c36e1e343194ec3dd (diff) | |
download | vyatta-cfg-352a9e94534933aca7403e91d1dc55c26bf633ce.tar.gz vyatta-cfg-352a9e94534933aca7403e91d1dc55c26bf633ce.zip |
implement load function in new config input/output infrastructure.
* add "commands diff" functionality to config input/output infrastructure.
* consolidate similar logic in "commands diff" and "show diff".
* add loadFile functionality to cstore using "commands diff".
* export loadFile through shell API.
Diffstat (limited to 'src/cstore/cstore.hpp')
-rw-r--r-- | src/cstore/cstore.hpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/cstore/cstore.hpp b/src/cstore/cstore.hpp index 267dabe..d1d01fa 100644 --- a/src/cstore/cstore.hpp +++ b/src/cstore/cstore.hpp @@ -112,7 +112,7 @@ public: * edit-related commands (invoked from shell functions) * completion-related (for completion script) * session-related (setup, teardown, etc.) - * load (XXX currently still implemented in perl) + * load * * these operate on the "working config" and the session and MUST NOT * be used by anything other than the listed operations. @@ -165,8 +165,8 @@ public: virtual bool inSession() = 0; // commit bool unmarkCfgPathChanged(const vector<string>& path_comps); - // XXX load - //bool unmarkCfgPathDeactivatedDescendants(const vector<string>& path_comps); + // load + bool loadFile(const char *filename); /****** * these functions are observers of the current "working config" or @@ -476,6 +476,8 @@ private: // util functions string get_shell_prompt(const string& level); void shell_escape_squotes(string& str); + void print_str_vec(const char *pre, const char *post, + const vector<string>& vec, const char *quote); }; #endif /* _CSTORE_H_ */ |