public:\
typedef AnyCore::A##className##Ptr ObjectPtr;\
static className Null;\
className();\
className(int, bool);\
className(const className::ObjectPtr& implObject)\
{\
SetImpl(implObject);\
}\
virtual ~className(){}\
virtual bool IsNull() const { return className##Impl_ == 0; }\
bool IsValid() const { return !IsNull(); }\
private:\
ObjectPtr className##Impl_;\
public:\
const ObjectPtr& GetImpl() const { return className##Impl_; }\
void SetImpl(const ObjectPtr& impl) { className##Impl_ = impl; }