A template singleton. More...
#include <singleton.h>
Static Public Member Functions | |
static T * | Get (void) |
Get a pointer to the singleton instance. More... | |
Private Member Functions | |
Singleton pattern | |
Private constructor, copy and assignment operator. Note these do not have to be implemented, since they are never called. | |
Singleton (void) | |
Default constructor. More... | |
Singleton (const Singleton< T > &) | |
Copy constructor. More... | |
Singleton< T > | operator= (const Singleton< T > &) |
Assignment. More... | |
A template singleton.
This template class can be used to implement the singleton pattern. The underlying object will be destroyed automatically when the process exits.
For a singleton whose lifetime is bounded by the simulation run, not the process, see SimulationSingleton.
Definition at line 49 of file singleton.h.
|
private |
Default constructor.
|
private |
Copy constructor.
|
static |
Get a pointer to the singleton instance.
The instance will be automatically deleted when the process exits.
Definition at line 97 of file singleton.h.
Referenced by ns3::TypeId::AddAttribute(), ns3::TypeId::AddTraceSource(), ns3::Config::Connect(), ns3::Config::ConnectWithoutContext(), ns3::Config::Disconnect(), ns3::Config::DisconnectWithoutContext(), ns3::TypeId::DoAddConstructor(), ns3::TypeId::GetAttribute(), ns3::TypeId::GetAttributeN(), ns3::TypeId::GetConstructor(), ns3::TypeId::GetGroupName(), ns3::TypeId::GetHash(), ns3::TypeId::GetName(), ns3::TypeId::GetParent(), ns3::TypeId::GetRegisteredN(), ns3::Config::GetRootNamespaceObject(), ns3::Config::GetRootNamespaceObjectN(), ns3::TypeId::GetSize(), ns3::TypeId::GetTraceSource(), ns3::TypeId::GetTraceSourceN(), ns3::TypeId::HasConstructor(), ns3::TypeId::HasParent(), ns3::TypeId::HideFromDocumentation(), ns3::TypeId::LookupByHash(), ns3::TypeId::LookupByHashFailSafe(), ns3::TypeId::LookupByName(), ns3::TypeId::LookupByNameFailSafe(), ns3::Config::LookupMatches(), ns3::TypeId::MustHideFromDocumentation(), ns3::Config::RegisterRootNamespaceObject(), ns3::Config::Set(), ns3::TypeId::SetAttributeInitialValue(), ns3::TypeId::SetGroupName(), ns3::TypeId::SetParent(), ns3::TypeId::SetSize(), ns3::TypeId::TypeId(), and ns3::Config::UnregisterRootNamespaceObject().
|
private |
Assignment.