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
model-typeid-creator.h
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2
/*
3
* This program is free software; you can redistribute it and/or modify
4
* it under the terms of the GNU General Public License version 2 as
5
* published by the Free Software Foundation;
6
*
7
* This program is distributed in the hope that it will be useful,
8
* but WITHOUT ANY WARRANTY; without even the implied warranty of
9
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10
* GNU General Public License for more details.
11
*
12
* You should have received a copy of the GNU General Public License
13
* along with this program; if not, write to the Free Software
14
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
15
*
16
* Author: Moatamri Faker <faker.moatamri@sophia.inria.fr>
17
*/
18
19
#include "
attribute-default-iterator.h
"
20
#include "ns3/type-id.h"
21
#include <gtk/gtk.h>
22
#include <vector>
23
24
namespace
ns3 {
25
26
enum
27
{
28
COL_TYPEID
= 0,
COL_LASTID
29
};
30
31
struct
ModelTypeid
32
{
33
enum
34
{
35
// store TypeId + attribute name +defaultValue and index
36
NODE_ATTRIBUTE
,
37
// store TypeId
38
NODE_TYPEID
39
}
type
;
40
std::string
name
;
41
std::string
defaultValue
;
42
//The TypeId object and if it is an attribute, it's the TypeId object of the attribute
43
TypeId
tid
;
44
//stores the index of the attribute in list of attributes for a given TypeId
45
uint32_t
index
;
46
};
47
class
ModelTypeidCreator
:
public
AttributeDefaultIterator
48
{
49
public
:
50
ModelTypeidCreator
();
55
void
Build
(GtkTreeStore *treestore);
56
private
:
60
virtual
void
VisitAttribute
(
TypeId
tid, std::string name, std::string defaultValue, uint32_t index);
64
virtual
void
StartVisitTypeId
(std::string name);
68
virtual
void
EndVisitTypeId
(
void
);
72
void
Add
(
ModelTypeid
*node);
76
void
Remove
(
void
);
77
//this is the TreeStore model corresponding to the view
78
GtkTreeStore *
m_treestore
;
79
//This contains a vector of iterators used to build the TreeStore
80
std::vector<GtkTreeIter *>
m_iters
;
81
};
82
}
src
config-store
model
model-typeid-creator.h
Generated on Tue Oct 9 2012 16:45:33 for ns-3 by
1.8.1.2