A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
attribute-construction-list.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2011 Mathieu Lacage
3
*
4
* This program is free software; you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License version 2 as
6
* published by the Free Software Foundation;
7
*
8
* This program is distributed in the hope that it will be useful,
9
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
* GNU General Public License for more details.
12
*
13
* You should have received a copy of the GNU General Public License
14
* along with this program; if not, write to the Free Software
15
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16
*
17
* Authors: Mathieu Lacage <mathieu.lacage@gmail.com>
18
*/
19
#ifndef ATTRIBUTE_CONSTRUCTION_LIST_H
20
#define ATTRIBUTE_CONSTRUCTION_LIST_H
21
22
#include "
attribute.h
"
23
24
#include <list>
25
32
namespace
ns3
33
{
34
40
class
AttributeConstructionList
41
{
42
public
:
44
struct
Item
45
{
47
Ptr<const AttributeChecker>
checker
;
49
Ptr<AttributeValue>
value
;
51
std::string
name
;
52
};
54
typedef
std::list<struct Item>::const_iterator
CIterator
;
55
57
AttributeConstructionList
();
58
66
void
Add
(std::string name,
Ptr<const AttributeChecker>
checker,
Ptr<AttributeValue>
value
);
67
75
Ptr<AttributeValue>
Find
(
Ptr<const AttributeChecker>
checker)
const
;
76
78
CIterator
Begin
()
const
;
80
CIterator
End
()
const
;
81
82
private
:
84
std::list<struct Item>
m_list
;
85
};
86
87
}
// namespace ns3
88
89
#endif
/* ATTRIBUTE_CONSTRUCTION_LIST_H */
attribute.h
ns3::AttributeValue, ns3::AttributeAccessor and ns3::AttributeChecker declarations.
ns3::AttributeConstructionList
List of Attribute name, value and checker triples used to construct Objects.
Definition:
attribute-construction-list.h:41
ns3::AttributeConstructionList::Find
Ptr< AttributeValue > Find(Ptr< const AttributeChecker > checker) const
Find an Attribute in the list from its AttributeChecker.
Definition:
attribute-construction-list.cc:65
ns3::AttributeConstructionList::Begin
CIterator Begin() const
Definition:
attribute-construction-list.cc:80
ns3::AttributeConstructionList::End
CIterator End() const
Definition:
attribute-construction-list.cc:87
ns3::AttributeConstructionList::m_list
std::list< struct Item > m_list
The list of Items.
Definition:
attribute-construction-list.h:84
ns3::AttributeConstructionList::Add
void Add(std::string name, Ptr< const AttributeChecker > checker, Ptr< AttributeValue > value)
Add an Attribute to the list.
Definition:
attribute-construction-list.cc:40
ns3::AttributeConstructionList::CIterator
std::list< struct Item >::const_iterator CIterator
Iterator type.
Definition:
attribute-construction-list.h:54
ns3::AttributeConstructionList::AttributeConstructionList
AttributeConstructionList()
Constructor.
Definition:
attribute-construction-list.cc:34
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition:
ptr.h:78
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
second.value
value
Definition:
second.py:41
ns3::AttributeConstructionList::Item
A single Attribute triple.
Definition:
attribute-construction-list.h:45
ns3::AttributeConstructionList::Item::name
std::string name
The name of the Attribute.
Definition:
attribute-construction-list.h:51
ns3::AttributeConstructionList::Item::checker
Ptr< const AttributeChecker > checker
Checker used to validate serialized values.
Definition:
attribute-construction-list.h:47
ns3::AttributeConstructionList::Item::value
Ptr< AttributeValue > value
The value of the Attribute.
Definition:
attribute-construction-list.h:49
src
core
model
attribute-construction-list.h
Generated on Fri Mar 31 2023 13:30:39 for ns-3 by
1.9.1