![]() |
【转帖】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. |