+ need dummy class for FeaturePython class to work

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

View File

@@ -118,6 +118,7 @@ void AppFemExport initFem()
Fem::FemAnalysis ::init();
Fem::FemAnalysisPython ::init();
Fem::DocumentObject ::init();
Fem::FeaturePython ::init();
Fem::FemMesh ::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 ---------------------------------------------------------
@@ -95,7 +97,7 @@ template class AppFemExport FeaturePythonT<Fem::FemAnalysis>;
namespace App {
/// @cond DOXERR
PROPERTY_SOURCE_TEMPLATE(Fem::FeaturePython, App::DocumentObject)
PROPERTY_SOURCE_TEMPLATE(Fem::FeaturePython, Fem::DocumentObject)
template<> const char* Fem::FeaturePython::getViewProviderName(void) const {
return "Gui::ViewProviderPythonFeature";
}

View File

@@ -64,8 +64,13 @@ protected:
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<App::DocumentObject> FeaturePython;
typedef App::FeaturePythonT<DocumentObject> FeaturePython;
} //namespace Fem