![]() | InDesign SDK 20.5 |
#include <CPMUnknown.h>

Public Member Functions | |
| DirtyOptimizer (IPMUnknown *face) | |
| void | PreDirty (ImplementationID prop=kInvalidImpl, bool16 allowModification=kTrue) |
| void | PreDirtyNoMessage (ImplementationID prop=kInvalidImpl, bool16 allowModification=kTrue) |
CPMUnknown is provided as a simple way for your interface to implement QueryInterface, AddRef, and Release, which are required for all interfaces (they are pure virtual functions declared in IPMUnknown). In addition, it also declares and defines a helper function, PreDirty, which is used for persistent interfaces only. This class provides the same functionality as the macros in HelperInterface.h; it is intended to be a replacement for those macros. You should not need to call methods in CPMUnknown yourself directly. See below for an example of how to use CPMUnknown:
#include "CPMUnknown.h"
class Foo : public CPMUnknown<IFoo> {
Foo(IPMUnknown* boss);
virtual void SomeMethod();
private: MyStruct* fMyStruct; };
Foo:Foo(IPMUnknown* boss)
: CPMUnknown<IFoo>(boss),
fMyStruct(nil){
}