在arx中自定义实体遇到的问题
在arx中自定义实体遇到的问题
我在arx中自定义了一个类,但在加到数据库的时候发生错误,想问一下是否需要什么注册的操作?是否只能在dbx中写啊?谢谢
头文件
class eobject

ublic acdbentity
{
protected:
char *m_name;
adesk::int32 m_id;
char *m_location;
acgepoint3d m_center;
public:
eobject();
virtual ~eobject(){}
virtual adesk::boolean worlddraw (acgiworlddraw *mode);
virtual acad::errorstatus getgeomextents(acdbextents & extents);
virtual acad::errorstatus transformby(const acgefasttransform& xform);
virtual acad::errorstatus gettransformedcopy(const acgematrix3d &xform, acdbentity *&pent);
virtual acad::errorstatus getgrippoints(acgepoint3darray & grippoints,acdbintarray &osnapmodes,acdbintarray & geomids) const;
virtual acad::errorstatus movegrippointsat(const acdbintarray &indices,const acgevector3d &offset);
cpp文件
eobject::eobject()
{
m_id = -1;
m_location = m_name = null;
m_center = acgepoint3d::korigin;
acutprintf("1eee\n");
}
adesk::boolean eobject::worlddraw(acgiworlddraw *mode)
{
return (adesk::ktrue) ;
}
acad::errorstatus eobject::getgeomextents(acdbextents & extents)
{
return acad::eok;
}
acad::errorstatus eobject::transformby(const acgefasttransform& xform)
{
assertwriteenabled(adesk::kfalse, adesk::kfalse);
return acad::enotapplicable;
}
acad::errorstatus eobject::gettransformedcopy(const acgematrix3d &xform, acdbentity *&pent)
{
assertreadenabled();
acad::errorstatus es = acad::eok;
return es;
}
acad::errorstatus eobject::getgrippoints(acgepoint3darray & grippoints,acdbintarray &osnapmodes,acdbintarray & geomids) const
{
return acad::enotimplemented;
}
acad::errorstatus eobject::movegrippointsat(const acdbintarray &indices,const acgevector3d &offset)
{
return acad::enotimplemented;
}