Example program illustrating use of the ns3::Ptr smart pointer. More...
#include "ns3/command-line.h"
#include "ns3/object.h"
#include "ns3/ptr.h"
#include <iostream>
Go to the source code of this file.
Classes | |
class | PtrExample |
Example class illustrating use of Ptr. More... | |
Functions | |
static void | ClearPtr () |
Set g_ptr to NULL. More... | |
static Ptr< PtrExample > | StorePtr (Ptr< PtrExample > p) |
Example Ptr manipulations. More... | |
Variables | |
static Ptr< PtrExample > | g_ptr = nullptr |
Example Ptr global variable. More... | |
Example program illustrating use of the ns3::Ptr smart pointer.
Definition in file main-ptr.cc.
|
static |
|
static |
Example Ptr manipulations.
This function stores it's argument in the global variable g_ptr
and returns the old value of g_ptr
.
[in] | p | A Ptr. |
g_ptr
. Definition at line 78 of file main-ptr.cc.
|
static |
Example Ptr global variable.
Definition at line 67 of file main-ptr.cc.
Referenced by ClearPtr(), and StorePtr().