From 0ea5fc66924303d1bf73ba283a383e2aadee02f2 Mon Sep 17 00:00:00 2001 From: neodarz Date: Sat, 11 Aug 2018 20:21:34 +0200 Subject: Initial commit --- docs/doxygen/nel/a03397.html | 151 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 151 insertions(+) create mode 100644 docs/doxygen/nel/a03397.html (limited to 'docs/doxygen/nel/a03397.html') diff --git a/docs/doxygen/nel/a03397.html b/docs/doxygen/nel/a03397.html new file mode 100644 index 00000000..c3783e21 --- /dev/null +++ b/docs/doxygen/nel/a03397.html @@ -0,0 +1,151 @@ + + +NeL: TemplateNLMISC::CSingleton< T > class Reference + + + +
+

NLMISC::CSingleton< T > Class Template Reference

#include <singelton.h> +

+

template<class T>
+ class NLMISC::CSingleton< T >

+ + + + + + + + + + + + + +

Static Public Member Functions

T & getInstance ()

Protected Member Functions

 CSingleton ()
 no public ctor to be sure that the user can't create an object


Static Protected Attributes

T * Instance = 0
+

Constructor & Destructor Documentation

+

+ + + + +
+ + + + + + + + + + + + +
+template<class T>
NLMISC::CSingleton< T >::CSingleton  )  [inline, protected]
+
+ + + + + +
+   + + +

+no public ctor to be sure that the user can't create an object +

+ +

+Definition at line 74 of file singelton.h. +

+

00075         {
+00076         }
+
+


Member Function Documentation

+

+ + + + +
+ + + + + + + + + + + + +
+template<class T>
T& NLMISC::CSingleton< T >::getInstance  )  [inline, static]
+
+ + + + + +
+   + + +

+returns a reference and not a pointer to be sure that the user doesn't have to test the return value and can directly access the class +

+Definition at line 61 of file singelton.h. +

+References nlassert. +

+

00062         {
+00063                 if(!Instance)
+00064                 {
+00065                         Instance = new T;
+00066                         nlassert(Instance);
+00067                 }
+00068                 return *Instance;
+00069         }
+
+


Field Documentation

+

+ + + + +
+ + + + + +
+template<class T>
T * NLMISC::CSingleton< T >::Instance = 0 [static, protected] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 82 of file singelton.h.

+


The documentation for this class was generated from the following file: +
Generated on Tue Mar 16 13:33:24 2004 for NeL by + +doxygen +1.3.6
+ + -- cgit v1.2.1