Adding python capabilities to the Result objects

This commit is contained in:
jriegel 2013-11-28 19:50:39 +01:00
parent 96514385e5
commit 7a1a8051aa
7 changed files with 55 additions and 0 deletions

View File

@ -139,8 +139,11 @@ void AppFemExport initFem()
Fem::ConstraintPulley ::init();
Fem::FemResultObject ::init();
Fem::FemResultPython ::init();
Fem::FemResultValue ::init();
Fem::FemResultValuePython ::init();
Fem::FemResultVector ::init();
Fem::FemResultVectorPython ::init();
}
} // extern "C"

View File

@ -59,3 +59,17 @@ PyObject *FemResultObject::getPyObject()
return Py::new_reference_to(PythonObject);
}
// Python feature ---------------------------------------------------------
namespace App {
/// @cond DOXERR
PROPERTY_SOURCE_TEMPLATE(Fem::FemResultPython, Fem::FemResultObject)
template<> const char* Fem::FemResultPython::getViewProviderName(void) const {
return "FemGui::ViewProviderFemResultPython";
}
/// @endcond
// explicit template instantiation
template class AppFemExport FeaturePythonT<Fem::FemResultObject>;
}

View File

@ -26,6 +26,7 @@
#include <App/DocumentObject.h>
#include <App/PropertyUnits.h>
#include <App/FeaturePython.h>
#include "FemResultObject.h"
namespace Fem
@ -58,6 +59,9 @@ public:
};
typedef App::FeaturePythonT<FemResultObject> FemResultPython;
} //namespace Fem

View File

@ -58,3 +58,17 @@ PyObject *FemResultValue::getPyObject()
return Py::new_reference_to(PythonObject);
}
// Python feature ---------------------------------------------------------
namespace App {
/// @cond DOXERR
PROPERTY_SOURCE_TEMPLATE(Fem::FemResultValuePython, Fem::FemResultValue)
template<> const char* Fem::FemResultValuePython::getViewProviderName(void) const {
return "FemGui::ViewProviderFemResultValuePython";
}
/// @endcond
// explicit template instantiation
template class AppFemExport FeaturePythonT<Fem::FemResultValue>;
}

View File

@ -26,6 +26,7 @@
#include <App/PropertyStandard.h>
#include <App/FeaturePython.h>
#include "FemResultObject.h"
@ -57,6 +58,8 @@ public:
};
typedef App::FeaturePythonT<FemResultValue> FemResultValuePython;
} //namespace Fem

View File

@ -58,3 +58,17 @@ PyObject *FemResultVector::getPyObject()
return Py::new_reference_to(PythonObject);
}
// Python feature ---------------------------------------------------------
namespace App {
/// @cond DOXERR
PROPERTY_SOURCE_TEMPLATE(Fem::FemResultVectorPython, Fem::FemResultVector)
template<> const char* Fem::FemResultVectorPython::getViewProviderName(void) const {
return "FemGui::ViewProviderFemResultVectorPython";
}
/// @endcond
// explicit template instantiation
template class AppFemExport FeaturePythonT<Fem::FemResultVector>;
}

View File

@ -25,6 +25,7 @@
#define Fem_FemResultVector_H
#include <App/PropertyGeo.h>
#include <App/FeaturePython.h>
#include "FemResultObject.h"
namespace Fem
@ -55,6 +56,8 @@ public:
};
typedef App::FeaturePythonT<FemResultVector> FemResultVectorPython;
} //namespace Fem