VA2059 vs2005 Win7 64bit
all code below located inside one cpp file.
class SDbPluginImp
{
public:
XPoint getNameLoc()const;//has body
XPoint getMidPt(); //trigger createImpementation
private:
CString m_name;
int m_num;
XPoint m_pt;//leftBot
}
XPoint SDbPluginImp::getNameLoc() const
{
//left-middle align
XPoint pt(m_pt);
pt.x += nameMargin;
pt.y += getHeight()- nameMargin;
return pt;
}
//-----before-------//
ENT_VERSION_IMP(SDbPlugin,1)
IMPLEMENT_ENTBASE(SDbPlugin)
//-----after-------//
ENT_VERSION_IMP(SDbPlugin,1)
XPoint SDbPluginImp::getMidPt()//new create!
{
}
IMPLEMENT_ENTBASE(SDbPlugin)
BTW.Both ENT_VERSION_IMP & IMPLEMENT_ENTBASE are macro!
#define ENT_VERSION_IMP(classname,version) \const Adesk::UInt8 classname::entVersion_s(){return version;}
#define IMPLEMENT_ENTBASE(ClassName) \ void ClassName::InitMatchProtocol(BOOL bTrue) { \ }
So why put the new function body between the 2 macros?
I hope to put it above ENT_VERSION_IMP(SDbPlugin,1)
.
regards!