NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.0: NDN, CCN, CCNx, content centric networks
API Documentation
face-table.hpp
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
26
#ifndef NFD_DAEMON_FW_FACE_TABLE_HPP
27
#define NFD_DAEMON_FW_FACE_TABLE_HPP
28
29
#include "
face/face.hpp
"
30
#include <boost/range/adaptor/map.hpp>
31
32
namespace
nfd
{
33
34
class
Forwarder
;
35
38
class
FaceTable
: noncopyable
39
{
40
public
:
41
explicit
42
FaceTable
(
Forwarder
& forwarder);
43
44
VIRTUAL_WITH_TESTS
45
~FaceTable
();
46
47
VIRTUAL_WITH_TESTS
void
48
add
(shared_ptr<Face>
face
);
49
51
VIRTUAL_WITH_TESTS
void
52
addReserved
(shared_ptr<Face> face,
FaceId
faceId);
53
54
VIRTUAL_WITH_TESTS
shared_ptr<Face>
55
get
(
FaceId
id)
const
;
56
57
size_t
58
size
()
const
;
59
60
public
:
// enumeration
61
typedef
std::map<FaceId, shared_ptr<Face>>
FaceMap
;
62
63
typedef
boost::select_second_const_range<FaceMap>
ForwardRange
;
64
67
typedef
boost::range_iterator<ForwardRange>::type
const_iterator
;
68
69
const_iterator
70
begin
()
const
;
71
72
const_iterator
73
end
()
const
;
74
75
public
:
// signals
78
signal::Signal<FaceTable, shared_ptr<Face>
>
afterAdd
;
79
84
signal::Signal<FaceTable, shared_ptr<Face>
>
beforeRemove
;
85
86
private
:
87
void
88
addImpl(shared_ptr<Face> face,
FaceId
faceId);
89
90
void
91
remove
(shared_ptr<Face> face);
92
93
ForwardRange
94
getForwardRange()
const
;
95
96
private
:
97
Forwarder
& m_forwarder;
98
FaceId
m_lastFaceId;
99
FaceMap m_faces;
100
};
101
102
}
// namespace nfd
103
104
#endif // NFD_DAEMON_FW_FACE_TABLE_HPP
nfd::FaceTable::afterAdd
signal::Signal< FaceTable, shared_ptr< Face > > afterAdd
fires after a Face is added
Definition:
face-table.hpp:78
nfd::FaceTable::size
size_t size() const
Definition:
face-table.cpp:55
face.hpp
nfd::FaceTable::const_iterator
boost::range_iterator< ForwardRange >::type const_iterator
ForwardIterator for shared_ptr<Face>
Definition:
face-table.hpp:67
nfd::FaceTable::add
void add(shared_ptr< Face > face)
Definition:
face-table.cpp:61
nfd::Forwarder
main class of NFD
Definition:
forwarder.hpp:55
nfd::FaceTable::begin
const_iterator begin() const
Definition:
face-table.cpp:131
ndn::util::signal::Signal
provides a lightweight signal / event system
Definition:
signal-signal.hpp:50
nfd::FaceTable::~FaceTable
~FaceTable()
Definition:
face-table.cpp:42
nfd::FaceTable::beforeRemove
signal::Signal< FaceTable, shared_ptr< Face > > beforeRemove
fires before a Face is removed
Definition:
face-table.hpp:84
nfd::FaceTable::FaceMap
std::map< FaceId, shared_ptr< Face > > FaceMap
Definition:
face-table.hpp:61
nfd::FaceTable
container of all Faces
Definition:
face-table.hpp:38
nfd::FaceTable::end
const_iterator end() const
Definition:
face-table.cpp:137
nfd
Copyright (c) 2011-2015 Regents of the University of California.
Definition:
ndn-common.hpp:40
VIRTUAL_WITH_TESTS
#define VIRTUAL_WITH_TESTS
Copyright (c) 2014-2015, Regents of the University of California, Arizona Board of Regents...
Definition:
common.hpp:37
face
nfd::Forwarder
Forwarder
Definition:
forwarder.cpp:38
nfd::FaceTable::ForwardRange
boost::select_second_const_range< FaceMap > ForwardRange
Definition:
face-table.hpp:63
nfd::FaceTable::FaceTable
FaceTable(Forwarder &forwarder)
Definition:
face-table.cpp:36
nfd::FaceTable::addReserved
void addReserved(shared_ptr< Face > face, FaceId faceId)
add a special Face with a reserved FaceId
Definition:
face-table.cpp:74
nfd::face::FaceId
uint64_t FaceId
identifies a face
Definition:
face.hpp:39
ndnSIM
NFD
daemon
fw
face-table.hpp
Generated on Sat Nov 12 2016 16:02:54 for ndnSIM by
1.8.12