Commit 09a7dbf0 authored by Jelte Jansen's avatar Jelte Jansen Committed by Jelte Jansen
Browse files

added some example code in doxygen doc

parent f9107953
......@@ -18,6 +18,7 @@
#define __STATISTICS_H 1
#include <cc/session.h>
#include <stdint.h>
class AuthCountersImpl;
......
......@@ -93,6 +93,30 @@ isc::data::ConstElementPtr createCommand(const std::string& command,
///
/// Raises a CCSessionError if this is not a well-formed command
///
/// Example code: (command_message is a ConstElementPtr that is
/// passed here)
/// \code
/// ConstElementPtr args;
/// std::string command_str;
///
/// try {
/// 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
/// << "value "
/// << args->get("bar")->stringValue();
/// }
/// } else {
/// std::cout << "Unknown command '" << command_str << std::endl;
/// }
/// } catch (CCSessionError cse) {
/// std::cerr << "Bad command in CC Session: "
/// << cse.what() << std::endl;
/// }
/// \endcode
///
/// \param arg This value will be set to the ElementPtr pointing to
/// the argument, or to an empty Map (ElementPtr) if there was none.
/// \param command The command message containing the command (as made
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment