几何尺寸与公差论坛------致力于产品几何量公差标准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)
-   -   【转帖】protocol extension (http://www.dimcax.com/hust/showthread.php?t=18249)

yang686526 2009-05-07 12:04 AM

【转帖】protocol extension
 
protocol extension
protocol extension
hi,
i am using the protocol extension and i have a few questions.
i see the odread example:
// extension protocol.
m_entitydumper = oddbentity_dumper::createobjet();
oddbentity::desc->addx(oddbentity_dumper::desc(), m_entitydumper);
// after
odsmartptr<oddbentity_dumpler> pent = pentity;
pent->dump(...);
1) if i haven磘 added oddbentity->addx then what happens?
2) i don't understand what do it exacty addx.
3) what do it exacty pent = pentity ?
thank you.
if you removed the addx() from the code, it would simply not 'dump' that object it was removed from.
if you do not call
oddbentity::desc->addx(oddbentity_dumper::desc(), m_entitydumper);
oddbentityptr pentity = .....
pentity->queryx(oddbentity_dumper::desc())
will return null
odsmartptr<oddbentity_dumpler> pent = pentity;
will throw an exception.
sergey slezkin


所有的时间均为北京时间。 现在的时间是 12:07 PM.