Revert 'remove unnecessary template code from document group'

Reverts commit 06c683dcf3, because used
by the Arch module
This commit is contained in:
Yorik van Havre 2012-04-22 17:37:00 -03:00
parent 7c03a49dfe
commit 19b428f36e
3 changed files with 16 additions and 1 deletions

View File

@ -1022,6 +1022,7 @@ void Application::initTypes(void)
App ::GeometryPython ::init();
App ::Document ::init();
App ::DocumentObjectGroup ::init();
App ::DocumentObjectGroupPython ::init();
App ::DocumentObjectFileIncluded::init();
App ::InventorObject ::init();
App ::VRMLObject ::init();

View File

@ -179,4 +179,16 @@ PyObject *DocumentObjectGroup::getPyObject()
return Py::new_reference_to(PythonObject);
}
// Python feature ---------------------------------------------------------
namespace App {
/// @cond DOXERR
PROPERTY_SOURCE_TEMPLATE(App::DocumentObjectGroupPython, App::DocumentObjectGroup)
template<> const char* App::DocumentObjectGroupPython::getViewProviderName(void) const {
return "Gui::ViewProviderDocumentObjectGroupPython";
}
/// @endcond
// explicit template instantiation
template class AppExport FeaturePythonT<App::DocumentObjectGroup>;
}

View File

@ -24,7 +24,7 @@
#ifndef APP_DOCUMENTOBJECTGROUP_H
#define APP_DOCUMENTOBJECTGROUP_H
//#include "FeaturePython.h"
#include "FeaturePython.h"
#include "DocumentObject.h"
#include "PropertyLinks.h"
#include <vector>
@ -99,6 +99,8 @@ private:
void removeObjectFromDocument(DocumentObject*);
};
typedef App::FeaturePythonT<DocumentObjectGroup> DocumentObjectGroupPython;
} //namespace App