A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
type-id.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2008 INRIA
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 * Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
18 */
19#ifndef TYPE_ID_H
20#define TYPE_ID_H
21
23#include "attribute-helper.h"
24#include "attribute.h"
25#include "callback.h"
26#include "hash.h"
28
29#include <stdint.h>
30#include <string>
31
32/**
33 * \file
34 * \ingroup object
35 * ns3::TypeId declaration; inline and template implementations.
36 */
37
38namespace ns3
39{
40
41class ObjectBase;
42
43/**
44 * \ingroup object
45 * \brief a unique identifier for an interface.
46 *
47 * This class records a lot of meta-information about a
48 * subclass of the Object base class:
49 * - the base class of the subclass
50 * - the set of accessible constructors in the subclass
51 * - the set of 'attributes' accessible in the subclass
52 *
53 * \see attribute_TypeId
54 *
55 * \internal
56 * See the discussion in IidManager about hash chaining of TypeId's.
57 */
58class TypeId
59{
60 public:
61 /** Flags describing when a given attribute can be read or written. */
63 {
64 ATTR_GET = 1 << 0, /**< The attribute can be read */
65 ATTR_SET = 1 << 1, /**< The attribute can be written */
66 ATTR_CONSTRUCT = 1 << 2, /**< The attribute can be written at construction-time */
68 ATTR_CONSTRUCT, /**< The attribute can be read, and written at any time */
69 };
70
71 /** The level of support or deprecation for attributes or trace sources. */
73 {
74 SUPPORTED, /**< Attribute or trace source is currently used. */
75 DEPRECATED, /**< Attribute or trace source is deprecated; user is warned. */
76 OBSOLETE /**< Attribute or trace source is not used anymore; simulation fails. */
77 };
78
79 /** Attribute implementation. */
81 {
82 /** Attribute name. */
83 std::string name;
84 /** Attribute help string. */
85 std::string help;
86 /** AttributeFlags value. */
88 /** Default initial value. */
90 /** Configured initial value. */
92 /** Accessor object. */
94 /** Checker object. */
96 /** Support level/deprecation. */
98 /** Support message. */
99 std::string supportMsg;
100 };
101
102 /** TraceSource implementation. */
104 {
105 /** Trace name. */
106 std::string name;
107 /** Trace help string. */
108 std::string help;
109 /** Callback function signature type. */
110 std::string callback;
111 /** Trace accessor. */
113 /** Support level/deprecation. */
115 /** Support message. */
116 std::string supportMsg;
117 };
118
119 /** Type of hash values. */
121
122 /**
123 * Get a TypeId by name.
124 *
125 * \param [in] name The name of the requested TypeId
126 * \returns The unique id associated with the requested name.
127 *
128 * This method cannot fail: it will crash if the input
129 * name is not a valid TypeId name.
130 */
131 static TypeId LookupByName(std::string name);
132 /**
133 * Get a TypeId by name.
134 *
135 * \param [in] name The name of the requested TypeId
136 * \param [out] tid A pointer to the TypeId instance where the
137 * result of this function should be stored.
138 * \returns \c true if the requested name was found.
139 */
140 static bool LookupByNameFailSafe(std::string name, TypeId* tid);
141 /**
142 * Get a TypeId by hash.
143 *
144 * \param [in] hash The hash to lookup
145 * \returns The unique id associated with the requested hash.
146 *
147 * This method cannot fail: it will crash if the input
148 * hash does not match an existing TypeId.
149 */
150 static TypeId LookupByHash(hash_t hash);
151 /**
152 * Get a TypeId by hash.
153 *
154 * \param [in] hash The hash of the requested TypeId
155 * \param [out] tid A pointer to the TypeId instance where the
156 * result of this function should be stored.
157 * \returns \c true if the requested hash was found.
158 */
159 static bool LookupByHashFailSafe(hash_t hash, TypeId* tid);
160
161 /**
162 * Get the number of registered TypeIds.
163 *
164 * \returns The number of TypeId instances registered.
165 */
166 static uint16_t GetRegisteredN();
167 /**
168 * Get a TypeId by index.
169 *
170 * \param [in] i Index of the TypeId.
171 * \returns The TypeId instance whose index is \c i.
172 */
173 static TypeId GetRegistered(uint16_t i);
174
175 /**
176 * Constructor.
177 *
178 * \param [in] name The name of the interface to construct.
179 *
180 * No two instances can share the same name. The name is expected to be
181 * the full c++ typename of associated c++ object.
182 */
183 explicit TypeId(const std::string& name);
184
185 /**
186 * Get the parent of this TypeId.
187 *
188 * \returns The parent of this TypeId
189 *
190 * This method cannot fail. It will return itself
191 * if this TypeId has no parent. i.e., it is at the top
192 * of the TypeId hierarchy. Currently, this is the
193 * case for the TypeId associated to the ns3::ObjectBase class
194 * only.
195 */
196 TypeId GetParent() const;
197
198 /**
199 * Check if this TypeId has a parent.
200 *
201 * \return \c true if this TypeId has a parent.
202 */
203 bool HasParent() const;
204
205 /**
206 * Check if this TypeId is a child of another.
207 *
208 * \param [in] other A parent TypeId
209 * \returns \c true if the input TypeId is really a parent of this TypeId.
210 *
211 * Calling this method is roughly similar to calling dynamic_cast
212 * except that you do not need object instances: you can do the check
213 * with TypeId instances instead.
214 */
215 bool IsChildOf(TypeId other) const;
216
217 /**
218 * Get the group name.
219 *
220 * \returns The name of the group associated to this TypeId.
221 */
222 std::string GetGroupName() const;
223
224 /**
225 * Get the name.
226 *
227 * \returns The name of this interface.
228 */
229 std::string GetName() const;
230
231 /**
232 * Get the hash.
233 *
234 * \returns The hash of this interface.
235 */
236 hash_t GetHash() const;
237
238 /**
239 * Get the size of this object.
240 *
241 * \returns The size of this interface.
242 */
243 std::size_t GetSize() const;
244
245 /**
246 * Check if this TypeId has a constructor.
247 *
248 * \returns \c true if this TypeId has a constructor
249 */
250 bool HasConstructor() const;
251
252 /**
253 * Get the number of attributes.
254 *
255 * \returns The number of attributes associated to this TypeId
256 */
257 std::size_t GetAttributeN() const;
258 /**
259 * Get Attribute information by index.
260 *
261 * \param [in] i Index into attribute array
262 * \returns The information associated to attribute whose index is \pname{i}.
263 */
264 TypeId::AttributeInformation GetAttribute(std::size_t i) const;
265 /**
266 * Get the Attribute name by index.
267 *
268 * \param [in] i Index into attribute array
269 * \returns The full name associated to the attribute whose index is \pname{i}.
270 */
271 std::string GetAttributeFullName(std::size_t i) const;
272
273 /**
274 * Get the constructor callback.
275 *
276 * \returns A callback which can be used to instantiate an object
277 * of this type.
278 */
280
281 /**
282 * Check if this TypeId should not be listed in documentation.
283 *
284 * \returns \c true if this TypeId should be hidden from the user.
285 */
286 bool MustHideFromDocumentation() const;
287
288 /**
289 * Get the number of Trace sources.
290 *
291 * \returns The number of trace sources defined in this TypeId.
292 */
293 std::size_t GetTraceSourceN() const;
294 /**
295 * Get the trace source by index.
296 *
297 * \param [in] i Index into trace source array.
298 * \returns Detailed information about the requested trace source.
299 */
301
302 /**
303 * Set the parent TypeId.
304 *
305 * \param [in] tid The TypeId of the base class.
306 * \return This TypeId instance.
307 *
308 * Record in this TypeId which TypeId is the TypeId
309 * of the base class of the subclass.
310 */
312 /**
313 * Set the parent TypeId.
314 *
315 * \tparam T \explicit The parent TypeID type.
316 * \return This TypeId instance.
317 *
318 * Record in this TypeId which TypeId is the TypeId
319 * of the base class of the subclass.
320 */
321 template <typename T>
323
324 /**
325 * Set the group name.
326 *
327 * \param [in] groupName The name of the group this TypeId belongs to.
328 * \returns This TypeId instance.
329 *
330 * The group name is purely an advisory information used to
331 * group together types according to a user-specific grouping
332 * scheme.
333 */
334 TypeId SetGroupName(std::string groupName);
335
336 /**
337 * Set the size of this type.
338 *
339 * Call this way:
340 * \code
341 * SetSize (sizeof (<typename>));
342 * \endcode
343 * This is done automatically by NS_LOG_ENSURE_REGISTERED()
344 * A ridiculously large reported size is a symptom that the
345 * type hasn't been registered.
346 *
347 * \param [in] size The size of the object, in bytes.
348 * \returns This TypeId instance.
349 */
350 TypeId SetSize(std::size_t size);
351
352 /**
353 * Record in this TypeId the fact that the default constructor
354 * is accessible.
355 *
356 * \tparam T \explicit The class name represented by this TypeId.
357 * \returns This TypeId instance
358 */
359 template <typename T>
361
362 /**
363 * Record in this TypeId the fact that a new attribute exists.
364 *
365 * \param [in] name The name of the new attribute
366 * \param [in] help Some help text which describes the purpose of this
367 * attribute.
368 * \param [in] initialValue The initial value for this attribute.
369 * \param [in] accessor An instance of the associated AttributeAccessor
370 * subclass.
371 * \param [in] checker An instance of the associated AttributeChecker
372 * subclass.
373 * \param [in] supportLevel Support/deprecation status of the attribute.
374 * \param [in] supportMsg Upgrade hint if this attribute is no longer
375 * supported. If the attribute is \c DEPRECATED the attribute
376 * behavior still exists, but user code should be updated
377 * following guidance in the hint.
378 * If the attribute is \c OBSOLETE, the hint should indicate
379 * which class the attribute functional has been moved to,
380 * or that the functionality is no longer supported.
381 * See test file type-id-test-suite.cc for examples.
382 * \returns This TypeId instance
383 */
384 TypeId AddAttribute(std::string name,
385 std::string help,
386 const AttributeValue& initialValue,
389 SupportLevel supportLevel = SUPPORTED,
390 const std::string& supportMsg = "");
391
392 /**
393 * Set the initial value of an Attribute.
394 *
395 * \param [in] i The attribute to manipulate
396 * \param [in] initialValue The new initial value to use for this attribute.
397 * \returns \c true if the call was successfully.
398 */
399 bool SetAttributeInitialValue(std::size_t i, Ptr<const AttributeValue> initialValue);
400
401 /**
402 * Record in this TypeId the fact that a new attribute exists.
403 *
404 * \param [in] name The name of the new attribute
405 * \param [in] help Some help text which describes the purpose of this
406 * attribute
407 * \param [in] flags Flags which describe how this attribute can be read and/or written.
408 * \param [in] initialValue The initial value for this attribute.
409 * \param [in] accessor An instance of the associated AttributeAccessor
410 * subclass.
411 * \param [in] checker An instance of the associated AttributeChecker
412 * subclass.
413 * \param [in] supportLevel Support/deprecation status of the attribute.
414 * \param [in] supportMsg Upgrade hint if this attribute is no longer
415 * supported. If the attribute is \c DEPRECATED the attribute
416 * behavior still exists, but user code should be updated
417 * following guidance in the hint..
418 * If the attribute is \c OBSOLETE, the hint should indicate
419 * which class the attribute functional has been moved to,
420 * or that the functionality is no longer supported.
421 * \returns This TypeId instance
422 */
423 TypeId AddAttribute(std::string name,
424 std::string help,
425 uint32_t flags,
426 const AttributeValue& initialValue,
429 SupportLevel supportLevel = SUPPORTED,
430 const std::string& supportMsg = "");
431
432 /**
433 * Record a new TraceSource.
434 *
435 * \param [in] name The name of the new trace source
436 * \param [in] help Some help text which describes the purpose of this
437 * trace source.
438 * \param [in] accessor A pointer to a TraceSourceAccessor which can be
439 * used to connect/disconnect sinks to this trace source.
440 * \param [in] callback Fully qualified typedef name for the callback
441 * signature. Generally this should begin with the
442 * "ns3::" namespace qualifier.
443 * \param [in] supportLevel Support/deprecation status of the attribute.
444 * \param [in] supportMsg Upgrade hint if this attribute is no longer
445 * supported. If the attribute is \c DEPRECATED the attribute
446 * behavior still exists, but user code should be updated
447 * following guidance in the hint..
448 * If the attribute is \c OBSOLETE, the hint should indicate
449 * which class the attribute functional has been moved to,
450 * or that the functionality is no longer supported.
451 * See test file type-id-test-suite.cc for examples.
452 * \returns This TypeId instance.
453 */
454 TypeId AddTraceSource(std::string name,
455 std::string help,
457 std::string callback,
458 SupportLevel supportLevel = SUPPORTED,
459 const std::string& supportMsg = "");
460
461 /**
462 * Hide this TypeId from documentation.
463 * \returns This TypeId instance.
464 */
466
467 /**
468 * Find an Attribute by name, retrieving the associated AttributeInformation.
469 *
470 * \param [in] name The name of the requested attribute
471 * \param [in,out] info A pointer to the TypeId::AttributeInformation
472 * data structure where the result value of this method
473 * will be stored.
474 * \returns \c true if the requested attribute could be found.
475 */
476 bool LookupAttributeByName(std::string name, AttributeInformation* info) const;
477 /**
478 * Find a TraceSource by name.
479 *
480 * If no matching trace source is found, this method returns zero.
481 *
482 * \param [in] name The name of the requested trace source
483 * \return The trace source accessor which can be used to connect
484 * and disconnect trace sinks with the requested trace source on
485 * an object instance.
486 */
488 /**
489 * Find a TraceSource by name, retrieving the associated TraceSourceInformation.
490 *
491 * \param [in] name The name of the requested trace source.
492 * \param [out] info A pointer to the TypeId::TraceSourceInformation
493 * data structure where the result value of this method
494 * will be stored.
495 * \return The trace source accessor which can be used to connect
496 * and disconnect trace sinks with the requested trace source on
497 * an object instance.
498 */
500 TraceSourceInformation* info) const;
501
502 /**
503 * Get the internal id of this TypeId.
504 *
505 * \returns The internal integer which uniquely identifies this TypeId.
506 *
507 * This is really an internal method which users are not expected
508 * to use.
509 */
510 uint16_t GetUid() const;
511 /**
512 * Set the internal id of this TypeId.
513 *
514 * \param [in] uid The internal integer which uniquely identifies
515 * this TypeId. This TypeId should already have been registered.
516 *
517 * Typically this is used in serialization/deserialization.
518 *
519 * This method is even more internal than GetUid(). Use
520 * at your own risk and don't be surprised that it eats raw
521 * babies on full-moon nights.
522 */
523 void SetUid(uint16_t uid);
524
525 /** Default constructor. This produces an invalid TypeId. */
526 inline TypeId();
527 /**
528 * Copy constructor.
529 * \param [in] o The other TypeId.
530 */
531 inline TypeId(const TypeId& o);
532 /**
533 * Assignment.
534 * \param [in] o The other TypeId.
535 * \returns The copied TypeId.
536 */
537 inline TypeId& operator=(const TypeId& o);
538 /** Destructor. */
539 inline ~TypeId();
540
541 private:
542 /**
543 * \name Comparison operators.
544 * Standard comparison operators.
545 * @{
546 */
547 friend inline bool operator==(TypeId a, TypeId b);
548 friend inline bool operator!=(TypeId a, TypeId b);
549 friend bool operator<(TypeId a, TypeId b);
550 /**@}*/
551
552 /**
553 * Construct from an integer value.
554 * \param [in] tid The TypeId value as an integer.
555 */
556 explicit TypeId(uint16_t tid);
557 /**
558 * Implementation for AddConstructor().
559 *
560 * \param [in] callback Callback which constructs an instance of this TypeId.
561 */
563
564 /** The TypeId value. */
565 uint16_t m_tid;
566};
567
568/**
569 * \relates TypeId
570 * Output streamer.
571 *
572 * \param [in,out] os The output stream.
573 * \param [in] tid The TypeId.
574 * \returns The output stream.
575 */
576std::ostream& operator<<(std::ostream& os, TypeId tid);
577/**
578 * \relates TypeId
579 * Input Streamer.
580 * \param [in,out] is The input stream.
581 * \param [out] tid The TypeId to set from the stream.
582 * \returns The input stream.
583 */
584std::istream& operator>>(std::istream& is, TypeId& tid);
585
586/**
587 * Comparison operator.
588 * \param [in] a One value.
589 * \param [in] b The other value.
590 * \returns The result of the comparison.
591 * @{
592 */
593inline bool operator==(TypeId a, TypeId b);
594inline bool operator!=(TypeId a, TypeId b);
595bool operator<(TypeId a, TypeId b);
596/** @} */
597
599
600} // namespace ns3
601
602namespace ns3
603{
604
606 : m_tid(0)
607{
608}
609
611 : m_tid(o.m_tid)
612{
613}
614
615TypeId&
617{
618 m_tid = o.m_tid;
619 return *this;
620}
621
623{
624}
625
626inline bool
628{
629 return a.m_tid == b.m_tid;
630}
631
632inline bool
634{
635 return a.m_tid != b.m_tid;
636}
637
638/*************************************************************************
639 * The TypeId implementation which depends on templates
640 *************************************************************************/
641
642template <typename T>
643TypeId
645{
646 return SetParent(T::GetTypeId());
647}
648
649template <typename T>
650TypeId
652{
653 struct Maker
654 {
655 static ObjectBase* Create()
656 {
657 ObjectBase* base = new T();
658 return base;
659 }
660 };
661
662 Callback<ObjectBase*> cb = MakeCallback(&Maker::Create);
664 return *this;
665}
666
667} // namespace ns3
668
669#endif /* TYPE_ID_H */
ns3::MakeAccessorHelper declarations and template implementations.
Attribute helper (ATTRIBUTE_ )macros definition.
ns3::AttributeValue, ns3::AttributeAccessor and ns3::AttributeChecker declarations.
Declaration of the various callback functions.
Hold a value for an Attribute.
Definition: attribute.h:70
Callback template class.
Definition: callback.h:438
Anchor the ns-3 type and attribute system.
Definition: object-base.h:173
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:77
a unique identifier for an interface.
Definition: type-id.h:59
bool IsChildOf(TypeId other) const
Check if this TypeId is a child of another.
Definition: type-id.cc:972
friend bool operator!=(TypeId a, TypeId b)
Comparison operator.
Definition: type-id.h:633
std::size_t GetTraceSourceN() const
Get the number of Trace sources.
Definition: type-id.cc:1124
bool SetAttributeInitialValue(std::size_t i, Ptr< const AttributeValue > initialValue)
Set the initial value of an Attribute.
Definition: type-id.cc:1077
static TypeId LookupByName(std::string name)
Get a TypeId by name.
Definition: type-id.cc:836
bool HasParent() const
Check if this TypeId has a parent.
Definition: type-id.cc:964
TypeId SetSize(std::size_t size)
Set the size of this type.
Definition: type-id.cc:948
hash_t GetHash() const
Get the hash.
Definition: type-id.cc:1000
TypeId AddTraceSource(std::string name, std::string help, Ptr< const TraceSourceAccessor > accessor, std::string callback, SupportLevel supportLevel=SUPPORTED, const std::string &supportMsg="")
Record a new TraceSource.
Definition: type-id.cc:1138
bool MustHideFromDocumentation() const
Check if this TypeId should not be listed in documentation.
Definition: type-id.cc:1093
AttributeFlag
Flags describing when a given attribute can be read or written.
Definition: type-id.h:63
@ ATTR_GET
The attribute can be read.
Definition: type-id.h:64
@ ATTR_SGC
The attribute can be read, and written at any time.
Definition: type-id.h:67
@ ATTR_SET
The attribute can be written.
Definition: type-id.h:65
@ ATTR_CONSTRUCT
The attribute can be written at construction-time.
Definition: type-id.h:66
static bool LookupByHashFailSafe(hash_t hash, TypeId *tid)
Get a TypeId by hash.
Definition: type-id.cc:868
TypeId::TraceSourceInformation GetTraceSource(std::size_t i) const
Get the trace source by index.
Definition: type-id.cc:1131
std::string GetGroupName() const
Get the group name.
Definition: type-id.cc:984
TypeId HideFromDocumentation()
Hide this TypeId from documentation.
Definition: type-id.cc:1152
Callback< ObjectBase * > GetConstructor() const
Get the constructor callback.
Definition: type-id.cc:1085
static uint16_t GetRegisteredN()
Get the number of registered TypeIds.
Definition: type-id.cc:880
std::string GetAttributeFullName(std::size_t i) const
Get the Attribute name by index.
Definition: type-id.cc:1116
bool HasConstructor() const
Check if this TypeId has a constructor.
Definition: type-id.cc:1015
std::size_t GetAttributeN() const
Get the number of attributes.
Definition: type-id.cc:1101
TypeId GetParent() const
Get the parent of this TypeId.
Definition: type-id.cc:956
TypeId AddConstructor()
Record in this TypeId the fact that the default constructor is accessible.
Definition: type-id.h:651
void SetUid(uint16_t uid)
Set the internal id of this TypeId.
Definition: type-id.cc:1213
uint16_t m_tid
The TypeId value.
Definition: type-id.h:565
TypeId SetGroupName(std::string groupName)
Set the group name.
Definition: type-id.cc:940
static TypeId LookupByHash(hash_t hash)
Get a TypeId by hash.
Definition: type-id.cc:858
static TypeId GetRegistered(uint16_t i)
Get a TypeId by index.
Definition: type-id.cc:887
friend bool operator==(TypeId a, TypeId b)
Comparison operator.
Definition: type-id.h:627
std::size_t GetSize() const
Get the size of this object.
Definition: type-id.cc:1007
Ptr< const TraceSourceAccessor > LookupTraceSourceByName(std::string name) const
Find a TraceSource by name.
Definition: type-id.cc:1199
TypeId & operator=(const TypeId &o)
Assignment.
Definition: type-id.h:616
~TypeId()
Destructor.
Definition: type-id.h:622
friend bool operator<(TypeId a, TypeId b)
Comparison operator.
Definition: type-id.cc:1254
uint32_t hash_t
Type of hash values.
Definition: type-id.h:120
TypeId()
Default constructor.
Definition: type-id.h:605
TypeId::AttributeInformation GetAttribute(std::size_t i) const
Get Attribute information by index.
Definition: type-id.cc:1109
uint16_t GetUid() const
Get the internal id of this TypeId.
Definition: type-id.cc:1206
static bool LookupByNameFailSafe(std::string name, TypeId *tid)
Get a TypeId by name.
Definition: type-id.cc:845
SupportLevel
The level of support or deprecation for attributes or trace sources.
Definition: type-id.h:73
@ SUPPORTED
Attribute or trace source is currently used.
Definition: type-id.h:74
@ OBSOLETE
Attribute or trace source is not used anymore; simulation fails.
Definition: type-id.h:76
@ DEPRECATED
Attribute or trace source is deprecated; user is warned.
Definition: type-id.h:75
TypeId AddAttribute(std::string name, std::string help, const AttributeValue &initialValue, Ptr< const AttributeAccessor > accessor, Ptr< const AttributeChecker > checker, SupportLevel supportLevel=SUPPORTED, const std::string &supportMsg="")
Record in this TypeId the fact that a new attribute exists.
Definition: type-id.cc:1030
bool LookupAttributeByName(std::string name, AttributeInformation *info) const
Find an Attribute by name, retrieving the associated AttributeInformation.
Definition: type-id.cc:894
std::string GetName() const
Get the name.
Definition: type-id.cc:992
TypeId SetParent()
Set the parent TypeId.
Definition: type-id.h:644
void DoAddConstructor(Callback< ObjectBase * > callback)
Implementation for AddConstructor().
Definition: type-id.cc:1023
#define ATTRIBUTE_HELPER_HEADER(type)
Declare the attribute value, accessor and checkers for class type
Ptr< T > Create(Ts &&... args)
Create class instances by constructors with varying numbers of arguments and return them by Ptr.
Definition: ptr.h:447
ns3::Hasher, ns3::Hash32() and ns3::Hash64() function declarations.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
bool operator!=(Callback< R, Args... > a, Callback< R, Args... > b)
Inequality test.
Definition: callback.h:680
Callback< R, Args... > MakeCallback(R(T::*memPtr)(Args...), OBJ objPtr)
Build Callbacks for class method members which take varying numbers of arguments and potentially retu...
Definition: callback.h:706
bool operator==(const EventId &a, const EventId &b)
Definition: event-id.h:157
std::ostream & operator<<(std::ostream &os, const Angles &a)
Definition: angles.cc:159
std::istream & operator>>(std::istream &is, Angles &a)
Definition: angles.cc:183
bool operator<(const EventId &a, const EventId &b)
Definition: event-id.h:170
Attribute implementation.
Definition: type-id.h:81
Ptr< const AttributeValue > originalInitialValue
Default initial value.
Definition: type-id.h:89
TypeId::SupportLevel supportLevel
Support level/deprecation.
Definition: type-id.h:97
std::string name
Attribute name.
Definition: type-id.h:83
Ptr< const AttributeAccessor > accessor
Accessor object.
Definition: type-id.h:93
uint32_t flags
AttributeFlags value.
Definition: type-id.h:87
Ptr< const AttributeChecker > checker
Checker object.
Definition: type-id.h:95
std::string supportMsg
Support message.
Definition: type-id.h:99
Ptr< const AttributeValue > initialValue
Configured initial value.
Definition: type-id.h:91
std::string help
Attribute help string.
Definition: type-id.h:85
TraceSource implementation.
Definition: type-id.h:104
std::string name
Trace name.
Definition: type-id.h:106
std::string supportMsg
Support message.
Definition: type-id.h:116
std::string help
Trace help string.
Definition: type-id.h:108
Ptr< const TraceSourceAccessor > accessor
Trace accessor.
Definition: type-id.h:112
std::string callback
Callback function signature type.
Definition: type-id.h:110
TypeId::SupportLevel supportLevel
Support level/deprecation.
Definition: type-id.h:114
ns3::TraceSourceAccessor and ns3::MakeTraceSourceAccessor declarations.