DesignPattern/31.PImplPattern/02.Code/demo.cpp

27 lines
356 B
C++
Raw Normal View History

2022-02-26 08:08:24 +00:00
#include "demo.h"
// include other necessary files
#include ....
class PAimpl
{
public:
void func1(int a, char* b)
{
// implementation
}
bool isEnabled()
{
// implementation
return true;
}
};
void A::func1(int a, char* b)
{
pimpl->func1(a, b);
}
bool A::isEnabled()
{
return pimpl->isEnabled();
}