NS-3 based Named Data Networking (NDN) simulator
ndnSIM: NDN, CCN, CCNx, content centric networks
API Documentation
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
ndnSIM
ndnSIM documentation
All TraceSources
All Attributes
All GlobalValues
All LogComponents
Todo List
Modules
Namespaces
Classes
Files
File List
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Groups
Pages
ndn-face-container.h
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
2
/*
3
* Copyright (c) 2011 University of California, Los Angeles
4
*
5
* This program is free software; you can redistribute it and/or modify
6
* it under the terms of the GNU General Public License version 2 as
7
* published by the Free Software Foundation;
8
*
9
* This program is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
* GNU General Public License for more details.
13
*
14
* You should have received a copy of the GNU General Public License
15
* along with this program; if not, write to the Free Software
16
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17
*
18
* Author: Alexander Afanasyev <alexander.afanasyev@ucla.edu>
19
*/
20
21
#ifndef NDN_FACE_CONTAINER_H
22
#define NDN_FACE_CONTAINER_H
23
24
#include <stdint.h>
25
#include <vector>
26
27
#include "ns3/ptr.h"
28
#include "ns3/simple-ref-count.h"
29
#include "ns3/ndn-face.h"
30
31
namespace
ns3 {
32
namespace
ndn {
33
43
class
FaceContainer
:
public
SimpleRefCount<FaceContainer>
44
{
45
private
:
46
typedef
std::vector< Ptr<Face> > Container;
47
public
:
48
typedef
Container::const_iterator
Iterator
;
49
53
FaceContainer
();
54
60
FaceContainer
(
const
FaceContainer
&other);
61
69
FaceContainer
&
operator=
(
const
FaceContainer
&other);
70
76
void
AddAll
(Ptr<FaceContainer> other);
77
83
void
AddAll
(
const
FaceContainer
&other);
84
91
Iterator
Begin
()
const
;
92
99
Iterator
End
()
const
;
100
106
uint32_t
GetN
()
const
;
107
108
// /**
109
// * \brief Set a metric for all faces in the container
110
// *
111
// * \param metric value of metric to assign to all faces in the container
112
// */
113
// void SetMetricToAll (uint16_t metric);
114
122
void
Add
(
const
Ptr<Face> &face);
123
133
Ptr<Face>
Get
(
Iterator
i)
const
;
134
135
private
:
136
Container m_faces;
137
};
138
139
}
// namespace ndn
140
}
// namespace ns3
141
142
#endif
/* NDN_FACE_CONTAINER_H */
ns3::ndn::FaceContainer::Add
void Add(const Ptr< Face > &face)
Set a metric for all faces in the container.
Definition:
ndn-face-container.cc:92
ns3::ndn::FaceContainer::GetN
uint32_t GetN() const
Get the number of faces stored in this container.
Definition:
ndn-face-container.cc:75
ns3::ndn::FaceContainer::Begin
Iterator Begin() const
Get an iterator which refers to the first pair in the container.
Definition:
ndn-face-container.cc:63
ns3::ndn::FaceContainer::Get
Ptr< Face > Get(Iterator i) const
Get a smart pointer to Face-derived object stored in the container.
Definition:
ndn-face-container.cc:98
ns3::ndn::FaceContainer::AddAll
void AddAll(Ptr< FaceContainer > other)
Add all entries from other container.
Definition:
ndn-face-container.cc:50
ns3::ndn::FaceContainer::operator=
FaceContainer & operator=(const FaceContainer &other)
Copy operator for FaceContainer.
Definition:
ndn-face-container.cc:40
ns3::ndn::FaceContainer::End
Iterator End() const
Get an iterator which indicates past-the-last Node in the container.
Definition:
ndn-face-container.cc:69
ns3::ndn::FaceContainer::FaceContainer
FaceContainer()
Create an empty FaceContainer.
Definition:
ndn-face-container.cc:30
ns3::ndn::FaceContainer
A pool for Ndn faces.
Definition:
ndn-face-container.h:43
ns3::ndn::FaceContainer::Iterator
Container::const_iterator Iterator
Iterator over FaceContainer.
Definition:
ndn-face-container.h:48
ndnSIM
helper
ndn-face-container.h
Generated on Mon Jan 19 2015 11:27:03 for ndnSIM by
1.8.7