几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量

几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量 (http://www.dimcax.com/hust/index.php)
-   DirectDWG (http://www.dimcax.com/hust/forumdisplay.php?f=89)
-   -   【转帖】gettransformedcopy90 declaration not appropriate (http://www.dimcax.com/hust/showthread.php?t=16425)

yang686526 2009-05-05 11:34 AM

【转帖】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


所有的时间均为北京时间。 现在的时间是 01:55 AM.