Commit d24fcdc5 authored by Yoshitaka Aharen's avatar Yoshitaka Aharen
Browse files

[2157] ItemTreeType renamed to ItemTreePtr, fixed markup

parent 01cec039
......@@ -44,13 +44,13 @@ namespace {
void
fillNodes(const Counter& counter,
const struct isc::auth::statistics::CounterTypeTree type_tree[],
isc::auth::statistics::Counters::ItemTreeType& trees)
isc::auth::statistics::Counters::ItemTreePtr& trees)
{
using namespace isc::data;
for (int i = 0; type_tree[i].name != NULL; ++i) {
if (type_tree[i].sub_tree != NULL) {
isc::auth::statistics::Counters::ItemTreeType sub_tree =
isc::auth::statistics::Counters::ItemTreePtr sub_tree =
Element::createMap();
trees->set(type_tree[i].name, sub_tree);
fillNodes(counter, type_tree[i].sub_tree, sub_tree);
......@@ -247,16 +247,16 @@ Counters::inc(const QRAttributes& qrattrs, const Message& response,
}
}
Counters::ItemTreeType
Counters::ItemTreePtr
Counters::get() const {
using namespace isc::data;
Counters::ItemTreeType item_tree = Element::createMap();
Counters::ItemTreePtr item_tree = Element::createMap();
Counters::ItemTreeType zones = Element::createMap();
Counters::ItemTreePtr zones = Element::createMap();
item_tree->set("zones", zones);
Counters::ItemTreeType server = Element::createMap();
Counters::ItemTreePtr server = Element::createMap();
fillNodes(server_qr_counter_, QRCounterTree, server);
zones->set("_SERVER_", server);
......
......@@ -163,6 +163,7 @@ private:
const isc::dns::Message& response);
public:
/// \brief A type of statistics item tree in isc::data::MapElement.
/// \verbatim
/// {
/// zone_name => {
/// item_name => item_value,
......@@ -172,8 +173,9 @@ public:
/// }
/// item_name is a string seperated by '.'.
/// item_value is an integer.
/// \endverbatim
///
typedef isc::data::ElementPtr ItemTreeType;
typedef isc::data::ElementPtr ItemTreePtr;
/// \brief The constructor.
///
......@@ -205,7 +207,7 @@ public:
///
/// \throw std::bad_alloc Internal resource allocation fails
///
ItemTreeType get() const;
ItemTreePtr get() const;
};
} // namespace statistics
......
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