Qt實現的C++框架:qtioccontainer

jopen 10年前發布 | 16K 次閱讀 C/C++開發 qtioccontainer

QtIOCContainer 是一個用Qt實現的C++框架 控制反轉概念靈感來自于Spring框架。他使用Qt的元對象系統和插件系統來實現C++的反射機制

#ifndef SHAPE_INTERFACE_H_
#define SHAPE_INTERFACE_H_

class ShapeInterface
{
public:
  // Define virtual destructor so that objects of derived classes 
  // can be deleted using pointer of ShapeInterface.
  virtual ~ShapeInterface() {}

  virtual void draw () = 0;
};

// Declare the interface.
Q_DECLARE_INTERFACE(ShapeInterface, "org.qic.test.ShapeInterface/1.0")

#endif

項目主頁:http://www.baiduhome.net/lib/view/home/1392515030147

 本文由用戶 jopen 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
 轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
 本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!