K
Krivenok Dmitry
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::SingletonHolder<
Loki::SmartPtr<A>,
Loki::CreateUsingNew,
Loki::NoDestroy,
Loki::SingleThreaded
//////////////////////////////////////////////////////////////////////////////////////////////////
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::SingletonHolder<
Loki::SmartPtr<A>,
Loki::CreateUsingNew,
Loki::NoDestroy,
Loki::SingleThreaded
#endif> APtrSingleton_t;
//////////////////////////////////////////////////////////////////////////////////////////////////
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!