From 0fbe6589e7c853d32ca579623b60f9ba30987cf4 Mon Sep 17 00:00:00 2001 From: Hoa Nguyen Date: Thu, 20 Aug 2020 18:25:10 -0700 Subject: [PATCH] base: Tag API methods and variables in trie.hh Change-Id: I4492dbb997a3ece5cb2675b45bf37d7512449ab6 Signed-off-by: Hoa Nguyen Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/33080 Reviewed-by: Daniel Carvalho Maintainer: Bobby R. Bruce Tested-by: kokoro --- src/base/trie.hh | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/base/trie.hh b/src/base/trie.hh index 71a14c55c..9722c2438 100644 --- a/src/base/trie.hh +++ b/src/base/trie.hh @@ -44,6 +44,8 @@ * * @tparam Key Type of the key of the tree nodes. Must be an integral type. * @tparam Value Type of the values associated to the keys. + * + * @ingroup api_base_utils */ template class Trie @@ -114,11 +116,20 @@ class Trie Node head; public: + /** + * @ingroup api_base_utils + */ typedef Node *Handle; + /** + * @ingroup api_base_utils + */ Trie() : head(0, 0, NULL) {} + /** + * @ingroup api_base_utils + */ static const unsigned MaxBits = sizeof(Key) * 8; private: @@ -192,6 +203,8 @@ class Trie * @param width How many bits of the key (from msb) should be used. * @param val A pointer to the value to store in the trie. * @return A Handle corresponding to this value. + * + * @ingroup api_base_utils */ Handle insert(Key key, unsigned width, Value *val) @@ -278,6 +291,8 @@ class Trie * Method which looks up the Value corresponding to a particular key. * @param key The key to look up. * @return The first Value matching this key, or NULL if none was found. + * + * @ingroup api_base_utils */ Value * lookup(Key key) @@ -293,6 +308,8 @@ class Trie * Method to delete a value from the trie. * @param node A Handle to remove. * @return The Value pointer from the removed entry. + * + * @ingroup api_base_utils */ Value * remove(Handle handle) @@ -337,6 +354,8 @@ class Trie * Method to lookup a value from the trie and then delete it. * @param key The key to look up and then remove. * @return The Value pointer from the removed entry, if any. + * + * @ingroup api_base_utils */ Value * remove(Key key) @@ -350,6 +369,8 @@ class Trie /** * A method which removes all key/value pairs from the trie. This is more * efficient than trying to remove elements individually. + * + * @ingroup api_base_utils */ void clear() -- 2.30.2