class PubApi {
public:
virtual void doSomething() = 0;
static PubApi* Instance;
}
#include "api.h"
class Impl: public PubApi {
private:
void doSomethingPrivately();
}
#include "impl.h"
PubApi* PubApi::Instance = new Impl();
void PubApi::doSomething() {
doSomethingPrivately();
}
void PubApi::doSomethingPrivately() {
// TODO
}