A Discrete-Event Network Simulator
API
ptr.h File Reference

ns3::Ptr smart pointer declaration and implementation. More...

#include <iostream>
#include <stdint.h>
#include "assert.h"
+ Include dependency graph for ptr.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  ns3::CallbackTraits< T >
 Trait class to convert a pointer into a reference, used by MemPtrCallBackImpl. More...
 
struct  ns3::CallbackTraits< Ptr< T > >
 Trait class to convert a pointer into a reference, used by MemPtrCallBackImpl. More...
 
struct  ns3::EventMemberImplObjTraits< T >
 Helper for the MakeEvent functions which take a class method. More...
 
struct  ns3::EventMemberImplObjTraits< Ptr< T > >
 Helper for the MakeEvent functions which take a class method. More...
 
class  ns3::Ptr< T >
 Smart pointer class similar to boost::intrusive_ptr. More...
 
class  ns3::Ptr< T >::Tester
 Helper to test for null pointer. More...
 

Namespaces

 ns3
 Every class exported by the ns3 library is enclosed in the ns3 namespace.
 

Functions

template<typename T1 , typename T2 >
Ptr< T1 > ns3::const_pointer_cast (Ptr< T2 > const &p)
 Return a copy of p with its stored pointer const casted from T2 to T1. More...
 
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 U >
U * ns3::GetPointer (const Ptr< U > &p)
 
template<typename T >
std::ostream & ns3::operator<< (std::ostream &os, const Ptr< T > &p)
 Output streamer. More...
 
template<typename U >
U * ns3::PeekPointer (const Ptr< U > &p)
 
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...
 
template<typename T1 , typename T2 >
Ptr< T1 > ns3::ConstCast (Ptr< T2 > const &p)
 Cast a Ptr. More...
 
template<typename T1 , typename T2 >
Ptr< T1 > ns3::DynamicCast (Ptr< T2 > const &p)
 Cast a Ptr. More...
 
template<typename T1 , typename T2 >
Ptr< T1 > ns3::StaticCast (Ptr< T2 > const &p)
 Cast a Ptr. More...
 
template<typename T >
Ptr< T > ns3::Copy (Ptr< T > object)
 Return a deep copy of a Ptr. More...
 

Detailed Description

ns3::Ptr smart pointer declaration and implementation.

Definition in file ptr.h.