1 // File: ModelAPI_Interface.hxx
2 // Created: 20 Mar 2014
3 // Author: Mikhail PONIKAROV
5 #ifndef ModelAPI_Interface_HeaderFile
6 #define ModelAPI_Interface_HeaderFile
8 #include <ModelAPI.hxx>
10 /**\class ModelAPI_Interface
12 * \brief General base class for all interfaces in this package
15 class MODELAPI_EXPORT ModelAPI_Interface
17 void* myImpl; ///< pointer to the internal implementation object
20 /// None - constructor
21 virtual ModelAPI_Interface() {myImpl = 0;}
23 /// Constructor by the implementation pointer (used for internal needs)
24 virtual ModelAPI_Interface(void* theImpl) {myImpl = theImpl;}
27 virtual ModelAPI_Interface(ModelAPI_Interface& theOrig)
28 {myImpl = theOrig.theImpl; Duplicate();}
30 virtual ModelAPI_Interface& operator=(ModelAPI_Interface& const theOrig)
31 {myImpl = theOrig.theImpl; Duplicate(); return *this;}
33 /// Duplicates the objet pointed by myImpl (loosing the old one)
34 virtual void Duplicate() = 0;