Heap memory management. More...
 Collaboration diagram for Smart Pointer:
 Collaboration diagram for Smart Pointer:| Files | |
| file | default-deleter.h | 
| ns3::DefaultDeleter declaration and template implementation, for reference-counted smart pointers. | |
| file | fatal-example.cc | 
| Example program illustrating use of the NS_FATAL error handlers. | |
| file | ptr-test-suite.cc | 
| Smart pointer test suite. | |
| file | ptr.h | 
| ns3::Ptr smart pointer declaration and implementation. | |
| file | ref-count-base.cc | 
| ns3::RefCountBase implementation. | |
| file | ref-count-base.h | 
| ns3::RefCountBase declaration. | |
| file | simple-ref-count.h | 
| ns3::SimpleRefCount declaration and template implementation. | |
| Classes | |
| struct | ns3::DefaultDeleter< T > | 
| A template used to delete objects by the ns3::SimpleRefCount templates when the last reference to an object they manage disappears.  More... | |
| struct | ns3::ObjectDeleter | 
| Standard Object deleter, used by SimpleRefCount to delete an Object when the reference count drops to zero.  More... | |
| class | ns3::Ptr< T > | 
| Smart pointer class similar to boost::intrusive_ptr.  More... | |
| class | ns3::SimpleRefCount< T, PARENT, DELETER > | 
| A template-based reference counting class.  More... | |
| Functions | |
| template<typename T , typename... Ts> | |
| Ptr< T > | ns3::Create (Ts... args) | 
| Create class instances by constructors with varying numbers of arguments and return them by Ptr.  More... | |
| template<typename T > | |
| std::ostream & | ns3::operator<< (std::ostream &os, const Ptr< T > &p) | 
| Output streamer.  More... | |
| template<typename T1 , typename T2 > | |
| bool | ns3::operator== (Ptr< T1 > const &lhs, T2 const *rhs) | 
| Equality operator.  More... | |
| template<typename T1 , typename T2 > | |
| bool | ns3::operator== (T1 const *lhs, Ptr< T2 > &rhs) | 
| Equality operator.  More... | |
| template<typename T1 , typename T2 > | |
| bool | ns3::operator== (Ptr< T1 > const &lhs, Ptr< T2 > const &rhs) | 
| Equality operator.  More... | |
| template<typename T1 , typename T2 > | |
| bool | ns3::operator!= (Ptr< T1 > const &lhs, T2 const *rhs) | 
| Inequality operator.  More... | |
| template<typename T1 , typename T2 > | |
| bool | ns3::operator!= (T1 const *lhs, Ptr< T2 > &rhs) | 
| Inequality operator.  More... | |
| template<typename T1 , typename T2 > | |
| bool | ns3::operator!= (Ptr< T1 > const &lhs, Ptr< T2 > const &rhs) | 
| Inequality operator.  More... | |
| template<typename T > | |
| bool | ns3::operator< (const Ptr< T > &lhs, const Ptr< T > &rhs) | 
| Comparison operator applied to the underlying pointers.  More... | |
| template<typename T > | |
| bool | ns3::operator<= (const Ptr< T > &lhs, const Ptr< T > &rhs) | 
| Comparison operator applied to the underlying pointers.  More... | |
| template<typename T > | |
| bool | ns3::operator> (const Ptr< T > &lhs, const Ptr< T > &rhs) | 
| Comparison operator applied to the underlying pointers.  More... | |
| template<typename T > | |
| bool | ns3::operator>= (const Ptr< T > &lhs, const Ptr< T > &rhs) | 
| Comparison operator applied to the underlying pointers.  More... | |
Heap memory management.
See ns3::Ptr for implementation details.
See main-ptr.cc for example usage.
| Ptr< T > ns3::Create | ( | Ts... | args | ) | 
Create class instances by constructors with varying numbers of arguments and return them by Ptr.
This template work for any class T derived from ns3::SimpleRefCount
| T | [explicit] The type of class object to create. | 
| Ts | [deduced] Types of the constructor arguments. | 
| [in] | args | Constructor arguments. | 
T. Definition at line 405 of file ptr.h.
Referenced by ns3::internal::MakeDoubleChecker(), ns3::internal::MakeIntegerChecker(), ns3::MakeSimpleAttributeChecker(), ns3::MakeTimeChecker(), and ns3::internal::MakeUintegerChecker().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| bool ns3::operator!= | ( | Ptr< T1 > const & | lhs, | 
| T2 const * | rhs | ||
| ) | 
Inequality operator.
This enables code such as
Note that either p or q could also be ordinary pointers to the underlying object.
| T1 | [deduced] Type of the object on the lhs. | 
| T2 | [deduced] Type of the object on the rhs. | 
| [in] | lhs | The left operand. | 
| [in] | rhs | The right operand. | 
true if the operands point to the same underlying object. Definition at line 446 of file ptr.h.
References ns3::PeekPointer().
 Here is the call graph for this function:
 Here is the call graph for this function:| bool ns3::operator!= | ( | T1 const * | lhs, | 
| Ptr< T2 > & | rhs | ||
| ) | 
Inequality operator.
This enables code such as
Note that either p or q could also be ordinary pointers to the underlying object.
| T1 | [deduced] Type of the object on the lhs. | 
| T2 | [deduced] Type of the object on the rhs. | 
| [in] | lhs | The left operand. | 
| [in] | rhs | The right operand. | 
true if the operands point to the same underlying object. Definition at line 453 of file ptr.h.
References ns3::PeekPointer().
 Here is the call graph for this function:
 Here is the call graph for this function:| bool ns3::operator!= | ( | Ptr< T1 > const & | lhs, | 
| Ptr< T2 > const & | rhs | ||
| ) | 
Inequality operator.
This enables code such as
Note that either p or q could also be ordinary pointers to the underlying object.
| T1 | [deduced] Type of the object on the lhs. | 
| T2 | [deduced] Type of the object on the rhs. | 
| [in] | lhs | The left operand. | 
| [in] | rhs | The right operand. | 
true if the operands point to the same underlying object. Definition at line 467 of file ptr.h.
References ns3::PeekPointer().
 Here is the call graph for this function:
 Here is the call graph for this function:| std::ostream & ns3::operator<< | ( | std::ostream & | os, | 
| const Ptr< T > & | p | ||
| ) | 
Output streamer.
| T | [deduced] The type of the underlying Object. | 
| [in,out] | os | The output stream. | 
| [in] | p | The Ptr. | 
Definition at line 424 of file ptr.h.
References ns3::PeekPointer().
 Here is the call graph for this function:
 Here is the call graph for this function:| bool ns3::operator== | ( | Ptr< T1 > const & | lhs, | 
| T2 const * | rhs | ||
| ) | 
Equality operator.
This enables code such as
Note that either p or q could also be ordinary pointers to the underlying object.
| T1 | [deduced] Type of the object on the lhs. | 
| T2 | [deduced] Type of the object on the rhs. | 
| [in] | lhs | The left operand. | 
| [in] | rhs | The right operand. | 
true if the operands point to the same underlying object. Definition at line 432 of file ptr.h.
References ns3::PeekPointer().
 Here is the call graph for this function:
 Here is the call graph for this function:| bool ns3::operator== | ( | T1 const * | lhs, | 
| Ptr< T2 > & | rhs | ||
| ) | 
Equality operator.
This enables code such as
Note that either p or q could also be ordinary pointers to the underlying object.
| T1 | [deduced] Type of the object on the lhs. | 
| T2 | [deduced] Type of the object on the rhs. | 
| [in] | lhs | The left operand. | 
| [in] | rhs | The right operand. | 
true if the operands point to the same underlying object. Definition at line 439 of file ptr.h.
References ns3::PeekPointer().
 Here is the call graph for this function:
 Here is the call graph for this function:| bool ns3::operator== | ( | Ptr< T1 > const & | lhs, | 
| Ptr< T2 > const & | rhs | ||
| ) | 
Equality operator.
This enables code such as
Note that either p or q could also be ordinary pointers to the underlying object.
| T1 | [deduced] Type of the object on the lhs. | 
| T2 | [deduced] Type of the object on the rhs. | 
| [in] | lhs | The left operand. | 
| [in] | rhs | The right operand. | 
true if the operands point to the same underlying object. Definition at line 460 of file ptr.h.
References ns3::PeekPointer().
 Here is the call graph for this function:
 Here is the call graph for this function: