+ need dummy class for FeaturePython class to work

This commit is contained in:
wmayer 2015-10-25 22:42:50 +01:00
parent a3cd03ac03
commit 15a6a463b3
3 changed files with 10 additions and 2 deletions

View File

@ -118,6 +118,7 @@ void AppFemExport initFem()
Fem::FemAnalysis ::init(); Fem::FemAnalysis ::init();
Fem::FemAnalysisPython ::init(); Fem::FemAnalysisPython ::init();
Fem::DocumentObject ::init();
Fem::FeaturePython ::init(); Fem::FeaturePython ::init();
Fem::FemMesh ::init(); Fem::FemMesh ::init();
Fem::FemMeshObject ::init(); Fem::FemMeshObject ::init();

View File

@ -69,6 +69,8 @@ void FemAnalysis::onChanged(const Property* prop)
} }
// Dummy class 'DocumentObject' in Fem namespace
PROPERTY_SOURCE_ABSTRACT(Fem::DocumentObject, App::DocumentObject)
// Python feature --------------------------------------------------------- // Python feature ---------------------------------------------------------
@ -95,7 +97,7 @@ template class AppFemExport FeaturePythonT<Fem::FemAnalysis>;
namespace App { namespace App {
/// @cond DOXERR /// @cond DOXERR
PROPERTY_SOURCE_TEMPLATE(Fem::FeaturePython, App::DocumentObject) PROPERTY_SOURCE_TEMPLATE(Fem::FeaturePython, Fem::DocumentObject)
template<> const char* Fem::FeaturePython::getViewProviderName(void) const { template<> const char* Fem::FeaturePython::getViewProviderName(void) const {
return "Gui::ViewProviderPythonFeature"; return "Gui::ViewProviderPythonFeature";
} }

View File

@ -64,8 +64,13 @@ protected:
virtual void onChanged (const App::Property* prop); virtual void onChanged (const App::Property* prop);
}; };
class AppFemExport DocumentObject : public App::DocumentObject
{
PROPERTY_HEADER(Fem::DocumentObject);
};
typedef App::FeaturePythonT<FemAnalysis> FemAnalysisPython; typedef App::FeaturePythonT<FemAnalysis> FemAnalysisPython;
typedef App::FeaturePythonT<App::DocumentObject> FeaturePython; typedef App::FeaturePythonT<DocumentObject> FeaturePython;
} //namespace Fem } //namespace Fem