blob: 60a428fbcd8d17f70e9098357948be25b35866e5 [file] [log] [blame]
Junxiao Shi65d00722014-02-17 10:50:20 -07001/* -*- 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
14namespace nfd {
15
HangZhangcb4fc832014-03-11 16:57:11 +080016class NameTree;
17
18namespace name_tree {
19class Entry;
20}
21
Junxiao Shi65d00722014-02-17 10:50:20 -070022class Measurements;
23
24namespace measurements {
25
26/** \class Entry
27 * \brief represents a Measurements entry
28 */
29class Entry : public StrategyInfoHost, noncopyable
30{
31public:
32 explicit
33 Entry(const Name& name);
34
35 const Name&
36 getName() const;
37
38private:
39 Name m_name;
40
41private: // lifetime
42 time::Point m_expiry;
43 EventId m_cleanup;
HangZhangcb4fc832014-03-11 16:57:11 +080044 shared_ptr<name_tree::Entry> m_nameTreeEntry;
Junxiao Shi65d00722014-02-17 10:50:20 -070045
HangZhangcb4fc832014-03-11 16:57:11 +080046 friend class nfd::NameTree;
47 friend class nfd::name_tree::Entry;
48 friend class nfd::Measurements;
Junxiao Shi65d00722014-02-17 10:50:20 -070049};
50
51inline const Name&
52Entry::getName() const
53{
54 return m_name;
55}
56
57} // namespace measurements
58} // namespace nfd
59
60#endif // NFD_TABLE_MEASUREMENTS_ENTRY_HPP