查看单个帖子
旧 2009-05-05, 11:34 AM   #1
yang686526
高级会员
 
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
yang686526 向着好的方向发展
默认 【转帖】gettransformedcopy90 declaration not appropriate

gettransformedcopy() declaration not appropriate?
gettransformedcopy() declaration not appropriate?
i have some question about declaration of gettransformedcopy() virtual member function in the class oddbentity.
in odt 3.0.1(b), the second parameter is declared as 'oddbentity**'. but why?
in the objectarx, it is declared as 'acdbentity*&' which is seemed more smart.
but rather, for the odt's way, it should be 'oddbentityptr&'?
and in addition, generally this function may fail, but is declared 'void' as return value. why not odresult?
for example, if the first parameter (transformation matrix) is a non-uniform scaling matrix or non-orthogonal, or if a derived custom entity is not applicable for this operation, then this function cannot perform clone'ing, so it can fail.
or, is there some other reason for the current declaration?
thank you.

we'll change declaration of this function to
virtual oddbentityptr gettransformedcopy(const odgematrix3d& xform) const;
in case failure appropriate exception will be thrown.
sincerely yours,
george udov
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)