NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.3: 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/indirected.hpp>
31
#include <boost/range/adaptor/map.hpp>
32
33
namespace
nfd
{
34
37
class
FaceTable
: noncopyable
38
{
39
public
:
40
FaceTable
();
41
47
void
48
add
(shared_ptr<Face>
face
);
49
52
void
53
addReserved
(shared_ptr<Face> face,
FaceId
faceId);
54
59
Face
*
60
get
(
FaceId
id)
const
;
61
64
size_t
65
size
()
const
;
66
67
public
:
// enumeration
68
typedef
std::map<FaceId, shared_ptr<Face>>
FaceMap
;
69
70
typedef
boost::indirected_range<const boost::select_second_const_range<FaceMap>>
ForwardRange
;
71
74
typedef
boost::range_iterator<ForwardRange>::type
const_iterator
;
75
76
const_iterator
77
begin
()
const
;
78
79
const_iterator
80
end
()
const
;
81
82
public
:
// signals
85
signal::Signal<FaceTable, Face&>
afterAdd
;
86
91
signal::Signal<FaceTable, Face&>
beforeRemove
;
92
93
private
:
94
void
95
addImpl(shared_ptr<Face> face,
FaceId
faceId);
96
97
void
98
remove
(
FaceId
faceId);
99
100
ForwardRange
101
getForwardRange()
const
;
102
103
private
:
104
FaceId
m_lastFaceId;
105
FaceMap m_faces;
106
};
107
108
}
// namespace nfd
109
110
#endif // NFD_DAEMON_FW_FACE_TABLE_HPP
nfd::FaceTable::afterAdd
signal::Signal< FaceTable, Face & > afterAdd
fires after a face is added
Definition:
face-table.hpp:85
nfd::FaceTable::size
size_t size() const
Definition:
face-table.cpp:52
face.hpp
nfd::FaceTable::ForwardRange
boost::indirected_range< const boost::select_second_const_range< FaceMap > > ForwardRange
Definition:
face-table.hpp:70
nfd::FaceTable::const_iterator
boost::range_iterator< ForwardRange >::type const_iterator
ForwardIterator for Face&.
Definition:
face-table.hpp:74
nfd::face::Face
generalization of a network interface
Definition:
face.hpp:67
nfd::FaceTable::add
void add(shared_ptr< Face > face)
add a face
Definition:
face-table.cpp:58
nfd::FaceTable::beforeRemove
signal::Signal< FaceTable, Face & > beforeRemove
fires before a face is removed
Definition:
face-table.hpp:91
nfd::FaceTable::begin
const_iterator begin() const
Definition:
face-table.cpp:119
ndn::util::signal::Signal
provides a lightweight signal / event system
Definition:
signal-signal.hpp:50
nfd::FaceTable::FaceMap
std::map< FaceId, shared_ptr< Face > > FaceMap
Definition:
face-table.hpp:68
nfd::FaceTable
container of all faces
Definition:
face-table.hpp:37
nfd::FaceTable::end
const_iterator end() const
Definition:
face-table.cpp:125
nfd
Copyright (c) 2011-2015 Regents of the University of California.
Definition:
ndn-common.hpp:40
face
nfd::FaceTable::addReserved
void addReserved(shared_ptr< Face > face, FaceId faceId)
add a special face with a reserved FaceId
Definition:
face-table.cpp:71
nfd::face::FaceId
uint64_t FaceId
identifies a face
Definition:
face.hpp:39
nfd::FaceTable::FaceTable
FaceTable()
Definition:
face-table.cpp:36
ndnSIM
NFD
daemon
fw
face-table.hpp
Generated on Wed Jan 11 2017 18:17:15 for ndnSIM by
1.8.13