Junxiao Shi | 65d0072 | 2014-02-17 10:50:20 -0700 | [diff] [blame^] | 1 | /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ |
| 2 | /** |
| 3 | * Copyright (C) 2014 Named Data Networking Project |
| 4 | * See COPYING for copyright and distribution information. |
| 5 | */ |
| 6 | |
| 7 | #ifndef NFD_TABLE_MEASUREMENTS_ENTRY_HPP |
| 8 | #define NFD_TABLE_MEASUREMENTS_ENTRY_HPP |
| 9 | |
| 10 | #include "common.hpp" |
| 11 | #include "strategy-info-host.hpp" |
| 12 | #include "core/scheduler.hpp" |
| 13 | |
| 14 | namespace nfd { |
| 15 | |
| 16 | class Measurements; |
| 17 | |
| 18 | namespace measurements { |
| 19 | |
| 20 | /** \class Entry |
| 21 | * \brief represents a Measurements entry |
| 22 | */ |
| 23 | class Entry : public StrategyInfoHost, noncopyable |
| 24 | { |
| 25 | public: |
| 26 | explicit |
| 27 | Entry(const Name& name); |
| 28 | |
| 29 | const Name& |
| 30 | getName() const; |
| 31 | |
| 32 | private: |
| 33 | Name m_name; |
| 34 | |
| 35 | private: // lifetime |
| 36 | time::Point m_expiry; |
| 37 | EventId m_cleanup; |
| 38 | |
| 39 | friend class ::nfd::Measurements; |
| 40 | }; |
| 41 | |
| 42 | inline const Name& |
| 43 | Entry::getName() const |
| 44 | { |
| 45 | return m_name; |
| 46 | } |
| 47 | |
| 48 | } // namespace measurements |
| 49 | } // namespace nfd |
| 50 | |
| 51 | #endif // NFD_TABLE_MEASUREMENTS_ENTRY_HPP |