LEFT | RIGHT |
(no file at all) | |
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ | 1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ |
2 /* | 2 /* |
3 * Copyright (c) 2008 INRIA | 3 * Copyright (c) 2008 INRIA |
4 * | 4 * |
5 * This program is free software; you can redistribute it and/or modify | 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 | 6 * it under the terms of the GNU General Public License version 2 as |
7 * published by the Free Software Foundation; | 7 * published by the Free Software Foundation; |
8 * | 8 * |
9 * This program is distributed in the hope that it will be useful, | 9 * This program is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 * result of this function should be stored. | 149 * result of this function should be stored. |
150 * \returns \c true if the requested hash was found. | 150 * \returns \c true if the requested hash was found. |
151 */ | 151 */ |
152 static bool LookupByHashFailSafe (hash_t hash, TypeId *tid); | 152 static bool LookupByHashFailSafe (hash_t hash, TypeId *tid); |
153 | 153 |
154 /** | 154 /** |
155 * Get the number of registered TypeIds. | 155 * Get the number of registered TypeIds. |
156 * | 156 * |
157 * \returns The number of TypeId instances registered. | 157 * \returns The number of TypeId instances registered. |
158 */ | 158 */ |
159 static uint32_t GetRegisteredN (void); | 159 static uint16_t GetRegisteredN (void); |
160 /** | 160 /** |
161 * Get a TypeId by index. | 161 * Get a TypeId by index. |
162 * | 162 * |
163 * \param [in] i Index of the TypeId. | 163 * \param [in] i Index of the TypeId. |
164 * \returns The TypeId instance whose index is \c i. | 164 * \returns The TypeId instance whose index is \c i. |
165 */ | 165 */ |
166 static TypeId GetRegistered (uint32_t i); | 166 static TypeId GetRegistered (uint16_t i); |
167 | 167 |
168 /** | 168 /** |
169 * Constructor. | 169 * Constructor. |
170 * | 170 * |
171 * \param [in] name The name of the interface to construct. | 171 * \param [in] name The name of the interface to construct. |
172 * | 172 * |
173 * No two instances can share the same name. The name is expected to be | 173 * No two instances can share the same name. The name is expected to be |
174 * the full c++ typename of associated c++ object. | 174 * the full c++ typename of associated c++ object. |
175 */ | 175 */ |
176 explicit TypeId (const char * name); | 176 explicit TypeId (const char * name); |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
240 * | 240 * |
241 * \returns \c true if this TypeId has a constructor | 241 * \returns \c true if this TypeId has a constructor |
242 */ | 242 */ |
243 bool HasConstructor (void) const; | 243 bool HasConstructor (void) const; |
244 | 244 |
245 /** | 245 /** |
246 * Get the number of attributes. | 246 * Get the number of attributes. |
247 * | 247 * |
248 * \returns The number of attributes associated to this TypeId | 248 * \returns The number of attributes associated to this TypeId |
249 */ | 249 */ |
250 uint32_t GetAttributeN (void) const; | 250 std::size_t GetAttributeN (void) const; |
251 /** | 251 /** |
252 * Get Attribute information by index. | 252 * Get Attribute information by index. |
253 * | 253 * |
254 * \param [in] i Index into attribute array | 254 * \param [in] i Index into attribute array |
255 * \returns The information associated to attribute whose index is \p i. | 255 * \returns The information associated to attribute whose index is \p i. |
256 */ | 256 */ |
257 struct TypeId::AttributeInformation GetAttribute(uint32_t i) const; | 257 struct TypeId::AttributeInformation GetAttribute (std::size_t i) const; |
258 /** | 258 /** |
259 * Get the Attribute name by index. | 259 * Get the Attribute name by index. |
260 * | 260 * |
261 * \param [in] i Index into attribute array | 261 * \param [in] i Index into attribute array |
262 * \returns The full name associated to the attribute whose index is \p i. | 262 * \returns The full name associated to the attribute whose index is \p i. |
263 */ | 263 */ |
264 std::string GetAttributeFullName (uint32_t i) const; | 264 std::string GetAttributeFullName (std::size_t i) const; |
265 | 265 |
266 /** | 266 /** |
267 * Get the constructor callback. | 267 * Get the constructor callback. |
268 * | 268 * |
269 * \returns A callback which can be used to instanciate an object | 269 * \returns A callback which can be used to instanciate an object |
270 * of this type. | 270 * of this type. |
271 */ | 271 */ |
272 Callback<ObjectBase *> GetConstructor (void) const; | 272 Callback<ObjectBase *> GetConstructor (void) const; |
273 | 273 |
274 /** | 274 /** |
275 * Check if this TypeId should not be listed in documentation. | 275 * Check if this TypeId should not be listed in documentation. |
276 * | 276 * |
277 * \returns \c true if this TypeId should be hidden from the user. | 277 * \returns \c true if this TypeId should be hidden from the user. |
278 */ | 278 */ |
279 bool MustHideFromDocumentation (void) const; | 279 bool MustHideFromDocumentation (void) const; |
280 | 280 |
281 | 281 |
282 /** | 282 /** |
283 * Get the number of Trace sources. | 283 * Get the number of Trace sources. |
284 * | 284 * |
285 * \returns The number of trace sources defined in this TypeId. | 285 * \returns The number of trace sources defined in this TypeId. |
286 */ | 286 */ |
287 uint32_t GetTraceSourceN (void) const; | 287 std::size_t GetTraceSourceN (void) const; |
288 /** | 288 /** |
289 * Get the trace source by index. | 289 * Get the trace source by index. |
290 * | 290 * |
291 * \param [in] i Index into trace source array. | 291 * \param [in] i Index into trace source array. |
292 * \returns Detailed information about the requested trace source. | 292 * \returns Detailed information about the requested trace source. |
293 */ | 293 */ |
294 struct TypeId::TraceSourceInformation GetTraceSource(uint32_t i) const; | 294 struct TypeId::TraceSourceInformation GetTraceSource (std::size_t i) const; |
295 | 295 |
296 /** | 296 /** |
297 * Set the parent TypeId. | 297 * Set the parent TypeId. |
298 * | 298 * |
299 * \param [in] tid The TypeId of the base class. | 299 * \param [in] tid The TypeId of the base class. |
300 * \return This TypeId instance. | 300 * \return This TypeId instance. |
301 * | 301 * |
302 * Record in this TypeId which TypeId is the TypeId | 302 * Record in this TypeId which TypeId is the TypeId |
303 * of the base class of the subclass. | 303 * of the base class of the subclass. |
304 */ | 304 */ |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
383 SupportLevel supportLevel = SUPPORTED, | 383 SupportLevel supportLevel = SUPPORTED, |
384 const std::string &supportMsg = ""); | 384 const std::string &supportMsg = ""); |
385 | 385 |
386 /** | 386 /** |
387 * Set the initial value of an Attribute. | 387 * Set the initial value of an Attribute. |
388 * | 388 * |
389 * \param [in] i The attribute to manipulate | 389 * \param [in] i The attribute to manipulate |
390 * \param [in] initialValue The new initial value to use for this attribute. | 390 * \param [in] initialValue The new initial value to use for this attribute. |
391 * \returns \c true if the call was successfuly. | 391 * \returns \c true if the call was successfuly. |
392 */ | 392 */ |
393 bool SetAttributeInitialValue(uint32_t i,· | 393 bool SetAttributeInitialValue (std::size_t i, |
394 Ptr<const AttributeValue> initialValue); | 394 Ptr<const AttributeValue> initialValue); |
395 | 395 |
396 /** | 396 /** |
397 * Record in this TypeId the fact that a new attribute exists. | 397 * Record in this TypeId the fact that a new attribute exists. |
398 * | 398 * |
399 * \param [in] name The name of the new attribute | 399 * \param [in] name The name of the new attribute |
400 * \param [in] help Some help text which describes the purpose of this | 400 * \param [in] help Some help text which describes the purpose of this |
401 * attribute | 401 * attribute |
402 * \param [in] flags Flags which describe how this attribute can be read and/o
r written. | 402 * \param [in] flags Flags which describe how this attribute can be read and/o
r written. |
403 * \param [in] initialValue The initial value for this attribute. | 403 * \param [in] initialValue The initial value for this attribute. |
404 * \param [in] accessor An instance of the associated AttributeAccessor | 404 * \param [in] accessor An instance of the associated AttributeAccessor |
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
658 } | 658 } |
659 }; | 659 }; |
660 Callback<ObjectBase *> cb = MakeCallback (&Maker::Create); | 660 Callback<ObjectBase *> cb = MakeCallback (&Maker::Create); |
661 DoAddConstructor (cb); | 661 DoAddConstructor (cb); |
662 return *this; | 662 return *this; |
663 } | 663 } |
664 | 664 |
665 } // namespace ns3 | 665 } // namespace ns3 |
666 | 666 |
667 #endif /* TYPE_ID_H */ | 667 #endif /* TYPE_ID_H */ |
LEFT | RIGHT |