Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ISC Open Source Projects
Kea
Commits
0bb6cd06
Commit
0bb6cd06
authored
Jan 10, 2011
by
Jelte Jansen
Browse files
improve doc for parseCommand()
parent
09a7dbf0
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/lib/config/ccsession.h
View file @
0bb6cd06
...
...
@@ -96,17 +96,16 @@ isc::data::ConstElementPtr createCommand(const std::string& command,
/// Example code: (command_message is a ConstElementPtr that is
/// passed here)
/// \code
/// ConstElementPtr args;
/// std::string command_str;
///
/// ElementPtr command_message = Element::fromJSON("{ \"command\": [\"foo\", { \"bar\": 123 } ] }");
/// try {
/// command_str = parseCommand(args, command_message);
/// ConstElementPtr args;
/// std::string command_str = parseCommand(args, command_message);
/// if (command_str == "foo") {
/// std::cout << "The command 'foo' was given" << std::endl;
/// if (args
.
contains("bar")) {
/// std::cout << "It had argument name 'bar' set, which has
/// if (args
->
contains("bar")) {
/// std::cout << "It had argument name 'bar' set, which has
"
/// << "value "
/// << args->get("bar")->
str
in
g
Value();
/// << args->get("bar")->in
t
Value();
/// }
/// } else {
/// std::cout << "Unknown command '" << command_str << std::endl;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment