12.07.2015 Views

VisiBroker Edition

VisiBroker Edition

VisiBroker Edition

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

实 现 valuetypesC++:继 承 valuetype 基 础 类编 译 完 IDL 之 后 , 请 创 建 valuetype 实 现 。 实 现 类 将 继 承 基 础 类 。 该 类 包 含 在 值工 厂 中 被 调 用 的 构 建 器 , 并 包 含 在 IDL 中 声 明 的 所 有 变 量 和 方 法 。如 下 所 示 , 在 obv\PointImpl.java 中 , PointImpl 类 将 扩 展 从 IDL 中 生 成 的Point 类 。class PointImpl :public Map::OBV_Point, publicCORBA::DefaultValueRefCountBase {public:PointImpl(){}virtual ~PointImpl(){}CORBA_ValueBase* _copy_value() {return new PointImpl(x(), y(), new Map::Label(CORBA::string_dup(label())));}PointImpl( CORBA::Long x, CORBA::Long y, Map::Label_ptr label ): OBV_Point( x,y,label->_boxed_in()){}virtual void print() {cout

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!