author | Maja Grubišić <maja.grubisic@live.com> |
Sat, 10 Nov 2012 19:16:38 +0100 | |
changeset 9134 | 7a750f032acd |
parent 8765 | b89660102b63 |
child 10968 | 2d29fee2b7b8 |
permissions | -rw-r--r-- |
7412
d79278c6e51c
refactor ObjectVector generic code into a separate file and introduce ObjectMap.
Mathieu Lacage <mathieu.lacage@gmail.com>
parents:
7169
diff
changeset
|
1 |
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ |
d79278c6e51c
refactor ObjectVector generic code into a separate file and introduce ObjectMap.
Mathieu Lacage <mathieu.lacage@gmail.com>
parents:
7169
diff
changeset
|
2 |
/* |
d79278c6e51c
refactor ObjectVector generic code into a separate file and introduce ObjectMap.
Mathieu Lacage <mathieu.lacage@gmail.com>
parents:
7169
diff
changeset
|
3 |
* Copyright (c) 2007 INRIA, Mathieu Lacage |
d79278c6e51c
refactor ObjectVector generic code into a separate file and introduce ObjectMap.
Mathieu Lacage <mathieu.lacage@gmail.com>
parents:
7169
diff
changeset
|
4 |
* |
d79278c6e51c
refactor ObjectVector generic code into a separate file and introduce ObjectMap.
Mathieu Lacage <mathieu.lacage@gmail.com>
parents:
7169
diff
changeset
|
5 |
* This program is free software; you can redistribute it and/or modify |
d79278c6e51c
refactor ObjectVector generic code into a separate file and introduce ObjectMap.
Mathieu Lacage <mathieu.lacage@gmail.com>
parents:
7169
diff
changeset
|
6 |
* it under the terms of the GNU General Public License version 2 as |
d79278c6e51c
refactor ObjectVector generic code into a separate file and introduce ObjectMap.
Mathieu Lacage <mathieu.lacage@gmail.com>
parents:
7169
diff
changeset
|
7 |
* published by the Free Software Foundation; |
d79278c6e51c
refactor ObjectVector generic code into a separate file and introduce ObjectMap.
Mathieu Lacage <mathieu.lacage@gmail.com>
parents:
7169
diff
changeset
|
8 |
* |
d79278c6e51c
refactor ObjectVector generic code into a separate file and introduce ObjectMap.
Mathieu Lacage <mathieu.lacage@gmail.com>
parents:
7169
diff
changeset
|
9 |
* This program is distributed in the hope that it will be useful, |
d79278c6e51c
refactor ObjectVector generic code into a separate file and introduce ObjectMap.
Mathieu Lacage <mathieu.lacage@gmail.com>
parents:
7169
diff
changeset
|
10 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
d79278c6e51c
refactor ObjectVector generic code into a separate file and introduce ObjectMap.
Mathieu Lacage <mathieu.lacage@gmail.com>
parents:
7169
diff
changeset
|
11 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
d79278c6e51c
refactor ObjectVector generic code into a separate file and introduce ObjectMap.
Mathieu Lacage <mathieu.lacage@gmail.com>
parents:
7169
diff
changeset
|
12 |
* GNU General Public License for more details. |
d79278c6e51c
refactor ObjectVector generic code into a separate file and introduce ObjectMap.
Mathieu Lacage <mathieu.lacage@gmail.com>
parents:
7169
diff
changeset
|
13 |
* |
d79278c6e51c
refactor ObjectVector generic code into a separate file and introduce ObjectMap.
Mathieu Lacage <mathieu.lacage@gmail.com>
parents:
7169
diff
changeset
|
14 |
* You should have received a copy of the GNU General Public License |
d79278c6e51c
refactor ObjectVector generic code into a separate file and introduce ObjectMap.
Mathieu Lacage <mathieu.lacage@gmail.com>
parents:
7169
diff
changeset
|
15 |
* along with this program; if not, write to the Free Software |
d79278c6e51c
refactor ObjectVector generic code into a separate file and introduce ObjectMap.
Mathieu Lacage <mathieu.lacage@gmail.com>
parents:
7169
diff
changeset
|
16 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
d79278c6e51c
refactor ObjectVector generic code into a separate file and introduce ObjectMap.
Mathieu Lacage <mathieu.lacage@gmail.com>
parents:
7169
diff
changeset
|
17 |
* |
d79278c6e51c
refactor ObjectVector generic code into a separate file and introduce ObjectMap.
Mathieu Lacage <mathieu.lacage@gmail.com>
parents:
7169
diff
changeset
|
18 |
* Authors: Mathieu Lacage <mathieu.lacage@gmail.com> |
d79278c6e51c
refactor ObjectVector generic code into a separate file and introduce ObjectMap.
Mathieu Lacage <mathieu.lacage@gmail.com>
parents:
7169
diff
changeset
|
19 |
*/ |
d79278c6e51c
refactor ObjectVector generic code into a separate file and introduce ObjectMap.
Mathieu Lacage <mathieu.lacage@gmail.com>
parents:
7169
diff
changeset
|
20 |
#include "object-ptr-container.h" |
9134
7a750f032acd
Clean up function logging of core module.
Maja Grubišić <maja.grubisic@live.com>
parents:
8765
diff
changeset
|
21 |
#include "log.h" |
7a750f032acd
Clean up function logging of core module.
Maja Grubišić <maja.grubisic@live.com>
parents:
8765
diff
changeset
|
22 |
|
7a750f032acd
Clean up function logging of core module.
Maja Grubišić <maja.grubisic@live.com>
parents:
8765
diff
changeset
|
23 |
NS_LOG_COMPONENT_DEFINE ("ObjectPtrContainer"); |
2405
17f406c71505
add ObjectVector value support.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
24 |
|
17f406c71505
add ObjectVector value support.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
25 |
namespace ns3 { |
17f406c71505
add ObjectVector value support.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
26 |
|
7412
d79278c6e51c
refactor ObjectVector generic code into a separate file and introduce ObjectMap.
Mathieu Lacage <mathieu.lacage@gmail.com>
parents:
7169
diff
changeset
|
27 |
ObjectPtrContainerValue::ObjectPtrContainerValue () |
7169
358f71a624d8
core coding style changes
Josh Pelkey <jpelkey@gatech.edu>
parents:
6821
diff
changeset
|
28 |
{ |
9134
7a750f032acd
Clean up function logging of core module.
Maja Grubišić <maja.grubisic@live.com>
parents:
8765
diff
changeset
|
29 |
NS_LOG_FUNCTION (this); |
7169
358f71a624d8
core coding style changes
Josh Pelkey <jpelkey@gatech.edu>
parents:
6821
diff
changeset
|
30 |
} |
2405
17f406c71505
add ObjectVector value support.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
31 |
|
7412
d79278c6e51c
refactor ObjectVector generic code into a separate file and introduce ObjectMap.
Mathieu Lacage <mathieu.lacage@gmail.com>
parents:
7169
diff
changeset
|
32 |
ObjectPtrContainerValue::Iterator |
d79278c6e51c
refactor ObjectVector generic code into a separate file and introduce ObjectMap.
Mathieu Lacage <mathieu.lacage@gmail.com>
parents:
7169
diff
changeset
|
33 |
ObjectPtrContainerValue::Begin (void) const |
2405
17f406c71505
add ObjectVector value support.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
34 |
{ |
9134
7a750f032acd
Clean up function logging of core module.
Maja Grubišić <maja.grubisic@live.com>
parents:
8765
diff
changeset
|
35 |
NS_LOG_FUNCTION (this); |
2405
17f406c71505
add ObjectVector value support.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
36 |
return m_objects.begin (); |
17f406c71505
add ObjectVector value support.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
37 |
} |
7412
d79278c6e51c
refactor ObjectVector generic code into a separate file and introduce ObjectMap.
Mathieu Lacage <mathieu.lacage@gmail.com>
parents:
7169
diff
changeset
|
38 |
ObjectPtrContainerValue::Iterator |
d79278c6e51c
refactor ObjectVector generic code into a separate file and introduce ObjectMap.
Mathieu Lacage <mathieu.lacage@gmail.com>
parents:
7169
diff
changeset
|
39 |
ObjectPtrContainerValue::End (void) const |
2405
17f406c71505
add ObjectVector value support.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
40 |
{ |
9134
7a750f032acd
Clean up function logging of core module.
Maja Grubišić <maja.grubisic@live.com>
parents:
8765
diff
changeset
|
41 |
NS_LOG_FUNCTION (this); |
2405
17f406c71505
add ObjectVector value support.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
42 |
return m_objects.end (); |
17f406c71505
add ObjectVector value support.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
43 |
} |
7169
358f71a624d8
core coding style changes
Josh Pelkey <jpelkey@gatech.edu>
parents:
6821
diff
changeset
|
44 |
uint32_t |
7412
d79278c6e51c
refactor ObjectVector generic code into a separate file and introduce ObjectMap.
Mathieu Lacage <mathieu.lacage@gmail.com>
parents:
7169
diff
changeset
|
45 |
ObjectPtrContainerValue::GetN (void) const |
2405
17f406c71505
add ObjectVector value support.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
46 |
{ |
9134
7a750f032acd
Clean up function logging of core module.
Maja Grubišić <maja.grubisic@live.com>
parents:
8765
diff
changeset
|
47 |
NS_LOG_FUNCTION (this); |
2405
17f406c71505
add ObjectVector value support.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
48 |
return m_objects.size (); |
17f406c71505
add ObjectVector value support.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
49 |
} |
7169
358f71a624d8
core coding style changes
Josh Pelkey <jpelkey@gatech.edu>
parents:
6821
diff
changeset
|
50 |
Ptr<Object> |
7412
d79278c6e51c
refactor ObjectVector generic code into a separate file and introduce ObjectMap.
Mathieu Lacage <mathieu.lacage@gmail.com>
parents:
7169
diff
changeset
|
51 |
ObjectPtrContainerValue::Get (uint32_t i) const |
2405
17f406c71505
add ObjectVector value support.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
52 |
{ |
9134
7a750f032acd
Clean up function logging of core module.
Maja Grubišić <maja.grubisic@live.com>
parents:
8765
diff
changeset
|
53 |
NS_LOG_FUNCTION (this << i); |
8765
b89660102b63
Fixed valgrind errors in attribute system. Fixed typo in AttributeMap test. Fixed Get() method for elements not present in the map
Jaume Nin
parents:
7884
diff
changeset
|
54 |
Iterator it = m_objects.find (i); |
b89660102b63
Fixed valgrind errors in attribute system. Fixed typo in AttributeMap test. Fixed Get() method for elements not present in the map
Jaume Nin
parents:
7884
diff
changeset
|
55 |
Ptr<Object> value = 0; |
b89660102b63
Fixed valgrind errors in attribute system. Fixed typo in AttributeMap test. Fixed Get() method for elements not present in the map
Jaume Nin
parents:
7884
diff
changeset
|
56 |
if ( it != m_objects.end () ) |
b89660102b63
Fixed valgrind errors in attribute system. Fixed typo in AttributeMap test. Fixed Get() method for elements not present in the map
Jaume Nin
parents:
7884
diff
changeset
|
57 |
{ |
b89660102b63
Fixed valgrind errors in attribute system. Fixed typo in AttributeMap test. Fixed Get() method for elements not present in the map
Jaume Nin
parents:
7884
diff
changeset
|
58 |
value = m_objects.find (i)->second; |
b89660102b63
Fixed valgrind errors in attribute system. Fixed typo in AttributeMap test. Fixed Get() method for elements not present in the map
Jaume Nin
parents:
7884
diff
changeset
|
59 |
} |
b89660102b63
Fixed valgrind errors in attribute system. Fixed typo in AttributeMap test. Fixed Get() method for elements not present in the map
Jaume Nin
parents:
7884
diff
changeset
|
60 |
return value; |
2405
17f406c71505
add ObjectVector value support.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
61 |
} |
17f406c71505
add ObjectVector value support.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
62 |
|
2965
4b28e9740e3b
get rid of Attribute class. Use AttributeValue subclasses directly.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2950
diff
changeset
|
63 |
Ptr<AttributeValue> |
7412
d79278c6e51c
refactor ObjectVector generic code into a separate file and introduce ObjectMap.
Mathieu Lacage <mathieu.lacage@gmail.com>
parents:
7169
diff
changeset
|
64 |
ObjectPtrContainerValue::Copy (void) const |
2405
17f406c71505
add ObjectVector value support.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
65 |
{ |
9134
7a750f032acd
Clean up function logging of core module.
Maja Grubišić <maja.grubisic@live.com>
parents:
8765
diff
changeset
|
66 |
NS_LOG_FUNCTION (this); |
7412
d79278c6e51c
refactor ObjectVector generic code into a separate file and introduce ObjectMap.
Mathieu Lacage <mathieu.lacage@gmail.com>
parents:
7169
diff
changeset
|
67 |
return ns3::Create<ObjectPtrContainerValue> (*this); |
2405
17f406c71505
add ObjectVector value support.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
68 |
} |
17f406c71505
add ObjectVector value support.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
69 |
std::string |
7412
d79278c6e51c
refactor ObjectVector generic code into a separate file and introduce ObjectMap.
Mathieu Lacage <mathieu.lacage@gmail.com>
parents:
7169
diff
changeset
|
70 |
ObjectPtrContainerValue::SerializeToString (Ptr<const AttributeChecker> checker) const |
2405
17f406c71505
add ObjectVector value support.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
71 |
{ |
9134
7a750f032acd
Clean up function logging of core module.
Maja Grubišić <maja.grubisic@live.com>
parents:
8765
diff
changeset
|
72 |
NS_LOG_FUNCTION (this << checker); |
3190
51fe9001a679
add some doxygen, remove a couple of XXX
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2965
diff
changeset
|
73 |
std::ostringstream oss; |
7884
963d5bfe9c52
Fixed bug 1352 (Object attribute map / vector issue)
Jaume Nin <jnin@cttc.cat>
parents:
7412
diff
changeset
|
74 |
Iterator it; |
963d5bfe9c52
Fixed bug 1352 (Object attribute map / vector issue)
Jaume Nin <jnin@cttc.cat>
parents:
7412
diff
changeset
|
75 |
for (it = Begin (); it != End (); ++it) |
3190
51fe9001a679
add some doxygen, remove a couple of XXX
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2965
diff
changeset
|
76 |
{ |
7884
963d5bfe9c52
Fixed bug 1352 (Object attribute map / vector issue)
Jaume Nin <jnin@cttc.cat>
parents:
7412
diff
changeset
|
77 |
oss << (*it).second; |
963d5bfe9c52
Fixed bug 1352 (Object attribute map / vector issue)
Jaume Nin <jnin@cttc.cat>
parents:
7412
diff
changeset
|
78 |
if (it != End ()) |
7169
358f71a624d8
core coding style changes
Josh Pelkey <jpelkey@gatech.edu>
parents:
6821
diff
changeset
|
79 |
{ |
358f71a624d8
core coding style changes
Josh Pelkey <jpelkey@gatech.edu>
parents:
6821
diff
changeset
|
80 |
oss << " "; |
358f71a624d8
core coding style changes
Josh Pelkey <jpelkey@gatech.edu>
parents:
6821
diff
changeset
|
81 |
} |
3190
51fe9001a679
add some doxygen, remove a couple of XXX
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2965
diff
changeset
|
82 |
} |
51fe9001a679
add some doxygen, remove a couple of XXX
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2965
diff
changeset
|
83 |
return oss.str (); |
2405
17f406c71505
add ObjectVector value support.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
84 |
} |
17f406c71505
add ObjectVector value support.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
85 |
bool |
7412
d79278c6e51c
refactor ObjectVector generic code into a separate file and introduce ObjectMap.
Mathieu Lacage <mathieu.lacage@gmail.com>
parents:
7169
diff
changeset
|
86 |
ObjectPtrContainerValue::DeserializeFromString (std::string value, Ptr<const AttributeChecker> checker) |
2405
17f406c71505
add ObjectVector value support.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
87 |
{ |
9134
7a750f032acd
Clean up function logging of core module.
Maja Grubišić <maja.grubisic@live.com>
parents:
8765
diff
changeset
|
88 |
NS_LOG_FUNCTION (this << value << checker); |
7884
963d5bfe9c52
Fixed bug 1352 (Object attribute map / vector issue)
Jaume Nin <jnin@cttc.cat>
parents:
7412
diff
changeset
|
89 |
NS_FATAL_ERROR ("cannot deserialize a set of object pointers."); |
2405
17f406c71505
add ObjectVector value support.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
90 |
return true; |
17f406c71505
add ObjectVector value support.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
91 |
} |
17f406c71505
add ObjectVector value support.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
92 |
|
17f406c71505
add ObjectVector value support.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
93 |
bool |
7412
d79278c6e51c
refactor ObjectVector generic code into a separate file and introduce ObjectMap.
Mathieu Lacage <mathieu.lacage@gmail.com>
parents:
7169
diff
changeset
|
94 |
ObjectPtrContainerAccessor::Set (ObjectBase * object, const AttributeValue & value) const |
2405
17f406c71505
add ObjectVector value support.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
95 |
{ |
17f406c71505
add ObjectVector value support.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
96 |
// not allowed. |
9134
7a750f032acd
Clean up function logging of core module.
Maja Grubišić <maja.grubisic@live.com>
parents:
8765
diff
changeset
|
97 |
NS_LOG_FUNCTION (this << object << &value); |
2405
17f406c71505
add ObjectVector value support.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
98 |
return false; |
17f406c71505
add ObjectVector value support.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
99 |
} |
17f406c71505
add ObjectVector value support.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
100 |
bool |
7412
d79278c6e51c
refactor ObjectVector generic code into a separate file and introduce ObjectMap.
Mathieu Lacage <mathieu.lacage@gmail.com>
parents:
7169
diff
changeset
|
101 |
ObjectPtrContainerAccessor::Get (const ObjectBase * object, AttributeValue &value) const |
2405
17f406c71505
add ObjectVector value support.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
102 |
{ |
9134
7a750f032acd
Clean up function logging of core module.
Maja Grubišić <maja.grubisic@live.com>
parents:
8765
diff
changeset
|
103 |
NS_LOG_FUNCTION (this << object << &value); |
7412
d79278c6e51c
refactor ObjectVector generic code into a separate file and introduce ObjectMap.
Mathieu Lacage <mathieu.lacage@gmail.com>
parents:
7169
diff
changeset
|
104 |
ObjectPtrContainerValue *v = dynamic_cast<ObjectPtrContainerValue *> (&value); |
2405
17f406c71505
add ObjectVector value support.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
105 |
if (v == 0) |
17f406c71505
add ObjectVector value support.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
106 |
{ |
17f406c71505
add ObjectVector value support.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
107 |
return false; |
17f406c71505
add ObjectVector value support.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
108 |
} |
2965
4b28e9740e3b
get rid of Attribute class. Use AttributeValue subclasses directly.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2950
diff
changeset
|
109 |
v->m_objects.clear (); |
2405
17f406c71505
add ObjectVector value support.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
110 |
uint32_t n; |
17f406c71505
add ObjectVector value support.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
111 |
bool ok = DoGetN (object, &n); |
17f406c71505
add ObjectVector value support.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
112 |
if (!ok) |
17f406c71505
add ObjectVector value support.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
113 |
{ |
17f406c71505
add ObjectVector value support.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
114 |
return false; |
17f406c71505
add ObjectVector value support.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
115 |
} |
17f406c71505
add ObjectVector value support.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
116 |
for (uint32_t i = 0; i < n; i++) |
17f406c71505
add ObjectVector value support.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
117 |
{ |
7884
963d5bfe9c52
Fixed bug 1352 (Object attribute map / vector issue)
Jaume Nin <jnin@cttc.cat>
parents:
7412
diff
changeset
|
118 |
uint32_t index; |
963d5bfe9c52
Fixed bug 1352 (Object attribute map / vector issue)
Jaume Nin <jnin@cttc.cat>
parents:
7412
diff
changeset
|
119 |
Ptr<Object> o = DoGet (object, i, &index); |
963d5bfe9c52
Fixed bug 1352 (Object attribute map / vector issue)
Jaume Nin <jnin@cttc.cat>
parents:
7412
diff
changeset
|
120 |
v->m_objects.insert (std::pair <uint32_t, Ptr<Object> > (index, o)); |
2405
17f406c71505
add ObjectVector value support.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
121 |
} |
17f406c71505
add ObjectVector value support.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
122 |
return true; |
17f406c71505
add ObjectVector value support.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
123 |
} |
2950
9e20fb862cd8
add AttributeAccessor::HasGetter/HasSetter and implement it.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2947
diff
changeset
|
124 |
bool |
7412
d79278c6e51c
refactor ObjectVector generic code into a separate file and introduce ObjectMap.
Mathieu Lacage <mathieu.lacage@gmail.com>
parents:
7169
diff
changeset
|
125 |
ObjectPtrContainerAccessor::HasGetter (void) const |
2950
9e20fb862cd8
add AttributeAccessor::HasGetter/HasSetter and implement it.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2947
diff
changeset
|
126 |
{ |
9134
7a750f032acd
Clean up function logging of core module.
Maja Grubišić <maja.grubisic@live.com>
parents:
8765
diff
changeset
|
127 |
NS_LOG_FUNCTION (this); |
2950
9e20fb862cd8
add AttributeAccessor::HasGetter/HasSetter and implement it.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2947
diff
changeset
|
128 |
return true; |
9e20fb862cd8
add AttributeAccessor::HasGetter/HasSetter and implement it.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2947
diff
changeset
|
129 |
} |
9e20fb862cd8
add AttributeAccessor::HasGetter/HasSetter and implement it.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2947
diff
changeset
|
130 |
bool |
7412
d79278c6e51c
refactor ObjectVector generic code into a separate file and introduce ObjectMap.
Mathieu Lacage <mathieu.lacage@gmail.com>
parents:
7169
diff
changeset
|
131 |
ObjectPtrContainerAccessor::HasSetter (void) const |
2950
9e20fb862cd8
add AttributeAccessor::HasGetter/HasSetter and implement it.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2947
diff
changeset
|
132 |
{ |
9134
7a750f032acd
Clean up function logging of core module.
Maja Grubišić <maja.grubisic@live.com>
parents:
8765
diff
changeset
|
133 |
NS_LOG_FUNCTION (this); |
2950
9e20fb862cd8
add AttributeAccessor::HasGetter/HasSetter and implement it.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2947
diff
changeset
|
134 |
return false; |
9e20fb862cd8
add AttributeAccessor::HasGetter/HasSetter and implement it.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2947
diff
changeset
|
135 |
} |
2599
fcc1728eb669
Add sufficient information to AttributeChecker to generate nice-looking doxygen documentation.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2473
diff
changeset
|
136 |
|
2405
17f406c71505
add ObjectVector value support.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
137 |
} // name |