diff options
author | Yoshitaka Aharen <aharen@jprs.co.jp> | 2012-10-25 13:36:08 +0200 |
---|---|---|
committer | Yoshitaka Aharen <aharen@jprs.co.jp> | 2012-11-15 08:47:54 +0100 |
commit | 7791af176bda3e99caffe8ca2aa2fc69d92a95dc (patch) | |
tree | fce3bdd86cfdc9306237208a6381ec4ea81732df /src/lib/statistics | |
parent | [2155] added some notes to the mapping tables of counter item (diff) | |
download | kea-7791af176bda3e99caffe8ca2aa2fc69d92a95dc.tar.xz kea-7791af176bda3e99caffe8ca2aa2fc69d92a95dc.zip |
[2155] removed inline keywords from methods inside class definition
Conflicts:
src/bin/auth/statistics.h
Diffstat (limited to 'src/lib/statistics')
-rw-r--r-- | src/lib/statistics/counter.h | 8 | ||||
-rw-r--r-- | src/lib/statistics/counter_dict.h | 28 |
2 files changed, 18 insertions, 18 deletions
diff --git a/src/lib/statistics/counter.h b/src/lib/statistics/counter.h index af9a5f7937..a5a1a1dcc6 100644 --- a/src/lib/statistics/counter.h +++ b/src/lib/statistics/counter.h @@ -46,7 +46,7 @@ public: /// \param items A number of counter items to hold (greater than 0) /// /// \throw isc::InvalidParameter \a items is 0 - explicit inline Counter(const size_t items) : + explicit Counter(const size_t items) : counters_(items, InitialValue) { if (items == 0) { @@ -57,14 +57,14 @@ public: /// The destructor. /// /// This method never throws an exception. - inline ~Counter() {}; + ~Counter() {}; /// \brief Increment a counter item specified with \a type. /// /// \param type %Counter item to increment /// /// \throw isc::OutOfRange \a type is invalid - inline void inc(const Counter::Type type) { + void inc(const Counter::Type type) { if (type >= counters_.size()) { isc_throw(isc::OutOfRange, "Counter type is out of range"); } @@ -77,7 +77,7 @@ public: /// \param type %Counter item to get the value of /// /// \throw isc::OutOfRange \a type is invalid - inline const Counter::Value& get(const Counter::Type type) const { + const Counter::Value& get(const Counter::Type type) const { if (type >= counters_.size()) { isc_throw(isc::OutOfRange, "Counter type is out of range"); } diff --git a/src/lib/statistics/counter_dict.h b/src/lib/statistics/counter_dict.h index 6861abf3db..863c0fb831 100644 --- a/src/lib/statistics/counter_dict.h +++ b/src/lib/statistics/counter_dict.h @@ -48,7 +48,7 @@ private: // specified at the construction of this class. CounterDictionary(); public: - explicit inline CounterDictionary(const size_t items) : + explicit CounterDictionary(const size_t items) : items_(items) { // The number of items must not be 0 @@ -56,8 +56,8 @@ public: isc_throw(isc::InvalidParameter, "Items must not be 0"); } }; - inline ~CounterDictionary() {}; - inline void addElement(const std::string& name) { + ~CounterDictionary() {}; + void addElement(const std::string& name) { // throw if the element already exists if (dictionary_.count(name) != 0) { isc_throw(isc::InvalidParameter, @@ -68,7 +68,7 @@ public: dictionary_.insert( DictionaryMap::value_type(name, CounterPtr(new Counter(items_)))); }; - inline void deleteElement(const std::string& name) { + void deleteElement(const std::string& name) { size_t result = dictionary_.erase(name); if (result != 1) { // If an element with specified name does not exist, throw @@ -77,7 +77,7 @@ public: "Element " << name << " does not exist"); } }; - inline Counter& getElement(const std::string& name) { + Counter& getElement(const std::string& name) { DictionaryMap::const_iterator i = dictionary_.find(name); if (i != dictionary_.end()) { // the key was found. return the element. @@ -89,7 +89,7 @@ public: "Element " << name << " does not exist"); } }; - inline Counter& operator[](const std::string& name) { + Counter& operator[](const std::string& name) { return (getElement(name)); }; /// \brief \c ConstIterator is a constant iterator that provides an @@ -112,31 +112,31 @@ public: /// This constructor is mostly exception free. But it may still /// throw a standard exception if memory allocation fails /// inside the method. - inline ConstIterator() {} + ConstIterator() {} /// The destructor. /// /// This method never throws an exception. - inline ~ConstIterator() {} + ~ConstIterator() {} /// Constructor from implementation detail DictionaryMap::const_iterator - inline ConstIterator( + ConstIterator( DictionaryMap::const_iterator iterator) : iterator_(iterator) {} private: /// \brief An internal method to increment this iterator. - inline void increment() { + void increment() { ++iterator_; return; } /// \brief An internal method to check equality. - inline bool equal(const ConstIterator& other) const { + bool equal(const ConstIterator& other) const { return (iterator_ == other.iterator_); } /// \brief An internal method to dereference this iterator. - inline const value_type& dereference() const { + const value_type& dereference() const { return (iterator_->first); } @@ -145,10 +145,10 @@ public: DictionaryMap::const_iterator iterator_; }; - inline ConstIterator begin() const { + ConstIterator begin() const { return (CounterDictionary::ConstIterator(dictionary_.begin())); }; - inline ConstIterator end() const { + ConstIterator end() const { return (CounterDictionary::ConstIterator(dictionary_.end())); }; |