A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Portuguese
Docs ▼
Wiki
Manual
Models
Develop ▼
API
Bugs
API
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
config.h
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2
/*
3
* Copyright (c) 2008 INRIA
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
* Authors: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
19
*/
20
#ifndef CONFIG_H
21
#define CONFIG_H
22
23
#include "
ptr.h
"
24
#include <string>
25
#include <vector>
26
27
namespace
ns3 {
28
29
class
AttributeValue;
30
class
Object;
31
class
CallbackBase;
32
37
namespace
Config {
38
43
void
Reset
(
void
);
44
53
void
Set
(std::string path,
const
AttributeValue &value);
62
void
SetDefault
(std::string name,
const
AttributeValue &value);
71
bool
SetDefaultFailSafe
(std::string name,
const
AttributeValue &value);
78
void
SetGlobal
(std::string name,
const
AttributeValue &value);
85
bool
SetGlobalFailSafe
(std::string name,
const
AttributeValue &value);
94
void
ConnectWithoutContext
(std::string path,
const
CallbackBase &cb);
101
void
DisconnectWithoutContext
(std::string path,
const
CallbackBase &cb);
111
void
Connect
(std::string path,
const
CallbackBase &cb);
118
void
Disconnect
(std::string path,
const
CallbackBase &cb);
119
127
class
MatchContainer
128
{
129
public
:
130
typedef
std::vector<Ptr<Object> >::const_iterator
Iterator
;
131
MatchContainer
();
132
// constructor used only by implementation.
133
MatchContainer
(
const
std::vector<
Ptr<Object>
> &objects,
134
const
std::vector<std::string> &contexts,
135
std::string path);
136
140
MatchContainer::Iterator
Begin
(
void
)
const
;
144
MatchContainer::Iterator
End
(
void
)
const
;
148
uint32_t
GetN
(
void
)
const
;
153
Ptr<Object>
Get
(uint32_t i)
const
;
161
std::string
GetMatchedPath
(uint32_t i)
const
;
165
std::string
GetPath
(
void
)
const
;
166
175
void
Set
(std::string name,
const
AttributeValue
&value);
184
void
Connect
(std::string name,
const
CallbackBase
&cb);
193
void
ConnectWithoutContext
(std::string name,
const
CallbackBase
&cb);
202
void
Disconnect
(std::string name,
const
CallbackBase
&cb);
211
void
DisconnectWithoutContext
(std::string name,
const
CallbackBase
&cb);
212
private
:
213
std::vector<Ptr<Object> >
m_objects
;
214
std::vector<std::string>
m_contexts
;
215
std::string
m_path
;
216
};
217
223
MatchContainer
LookupMatches
(std::string path);
224
231
void
RegisterRootNamespaceObject
(
Ptr<Object>
obj);
237
void
UnregisterRootNamespaceObject
(
Ptr<Object>
obj);
238
242
uint32_t
GetRootNamespaceObjectN
(
void
);
243
248
Ptr<Object>
GetRootNamespaceObject
(uint32_t i);
249
250
}
// namespace Config
251
252
}
// namespace ns3
253
254
#endif
/* CONFIG_H */
src
core
model
config.h
Generated on Tue May 14 2013 11:08:17 for ns-3 by
1.8.1.2