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>
Include dependency graph for main-ptr.cc: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. | |
| static Ptr< PtrExample > | StorePtr (Ptr< PtrExample > p) |
| Example Ptr manipulations. | |
Variables | |
| static Ptr< PtrExample > | g_ptr = nullptr |
| Example Ptr global variable. | |
Example program illustrating use of the ns3::Ptr smart pointer.
$ ./ns3 run "main-ptr"
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().