高级会员
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
|
【转帖】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
|