I have C++ singleton implementation like this:
#include "DoingSomething.hpp"
class DoingSomething
{
static DoingSomething *shareInstance;
public:
int doSomething()
{
/*
*/
return someValue;
}
static DoingSomething *instance()
{
if (!shareInstance)
shareInstance = new DoingSomething;
return shareInstance;
}
};
But I want to access the singleton and the public functions inside of the singleton on my viewController using Objective-C. Any of you knows how can this be done?
I'll really appreciate your help.