Hello All!
This is example of code:
//////////////////////////////////////////////////////////////////////////////////////////////////
#ifndef A_H_
#define A_H_
#include <Loki/Singleton.h>
#include <Loki/SmartPtr.h>
#include <iostream>
class A
{
public:
A() { std::cout << "A constructor" << std::endl;}
~A() { std::cout << "A destructor" << std::endl;}
};
typedef Loki::Singleton Holder<
Loki::SmartPtr< A>,
Loki::CreateUsi ngNew,
Loki::NoDestroy ,
Loki::SingleThr eaded[color=blue]
> APtrSingleton_t ;[/color]
#endif
//////////////////////////////////////////////////////////////////////////////////////////////////
I can use APtrSingleton_t ::Instance() in my program, but it's very
uneasily.
How to define (short) alternative name of APtrSingleton_t ::Instance()?
Thanks!
This is example of code:
//////////////////////////////////////////////////////////////////////////////////////////////////
#ifndef A_H_
#define A_H_
#include <Loki/Singleton.h>
#include <Loki/SmartPtr.h>
#include <iostream>
class A
{
public:
A() { std::cout << "A constructor" << std::endl;}
~A() { std::cout << "A destructor" << std::endl;}
};
typedef Loki::Singleton Holder<
Loki::SmartPtr< A>,
Loki::CreateUsi ngNew,
Loki::NoDestroy ,
Loki::SingleThr eaded[color=blue]
> APtrSingleton_t ;[/color]
#endif
//////////////////////////////////////////////////////////////////////////////////////////////////
I can use APtrSingleton_t ::Instance() in my program, but it's very
uneasily.
How to define (short) alternative name of APtrSingleton_t ::Instance()?
Thanks!
Comment