App: Fix header uniformity, trailing whitespace, and doxygen headers

This commit is contained in:
luz paz
2020-11-18 15:17:49 -05:00
committed by wwmayer
parent ad8d83a71b
commit 84553bf191
57 changed files with 886 additions and 850 deletions

View File

@@ -38,7 +38,7 @@
using namespace App;
FeaturePythonImp::FeaturePythonImp(App::DocumentObject* o)
FeaturePythonImp::FeaturePythonImp(App::DocumentObject* o)
: object(o), has__object__(false)
{
}
@@ -223,7 +223,7 @@ void FeaturePythonImp::onDocumentRestored()
}
}
bool FeaturePythonImp::getSubObject(DocumentObject *&ret, const char *subname,
bool FeaturePythonImp::getSubObject(DocumentObject *&ret, const char *subname,
PyObject **pyObj, Base::Matrix4D *_mat, bool transform, int depth) const
{
FC_PY_CALL_CHECK(getSubObject);
@@ -251,13 +251,13 @@ bool FeaturePythonImp::getSubObject(DocumentObject *&ret, const char *subname,
throw Py::TypeError("getSubObject expects return type of tuple");
Py::Sequence seq(res);
if(seq.length() < 2 ||
(!seq.getItem(0).isNone() &&
(!seq.getItem(0).isNone() &&
!PyObject_TypeCheck(seq.getItem(0).ptr(),&DocumentObjectPy::Type)) ||
!PyObject_TypeCheck(seq.getItem(1).ptr(),&Base::MatrixPy::Type))
{
throw Py::TypeError("getSubObject expects return type of (obj,matrix,pyobj)");
}
if(_mat)
if(_mat)
*_mat = *static_cast<Base::MatrixPy*>(seq.getItem(1).ptr())->getMatrixPtr();
if(pyObj) {
if(seq.length()>2)
@@ -315,7 +315,7 @@ bool FeaturePythonImp::getSubObjects(std::vector<std::string> &ret, int reason)
}
}
bool FeaturePythonImp::getLinkedObject(DocumentObject *&ret, bool recurse,
bool FeaturePythonImp::getLinkedObject(DocumentObject *&ret, bool recurse,
Base::Matrix4D *_mat, bool transform, int depth) const
{
FC_PY_CALL_CHECK(getLinkedObject);
@@ -339,13 +339,13 @@ bool FeaturePythonImp::getLinkedObject(DocumentObject *&ret, bool recurse,
throw Py::TypeError("getLinkedObject expects return type of (object,matrix)");
Py::Sequence seq(res);
if(seq.length() != 2 ||
(!seq.getItem(0).isNone() &&
(!seq.getItem(0).isNone() &&
!PyObject_TypeCheck(seq.getItem(0).ptr(),&DocumentObjectPy::Type)) ||
!PyObject_TypeCheck(seq.getItem(1).ptr(),&Base::MatrixPy::Type))
{
throw Py::TypeError("getLinkedObject expects return type of (object,matrix)");
}
if(_mat)
if(_mat)
*_mat = *static_cast<Base::MatrixPy*>(seq.getItem(1).ptr())->getMatrixPtr();
if(seq.getItem(0).isNone())
ret = object;
@@ -520,7 +520,7 @@ int FeaturePythonImp::canLoadPartial() const {
FeaturePythonImp::ValueT
FeaturePythonImp::redirectSubName(std::ostringstream &ss,
App::DocumentObject *topParent,
App::DocumentObject *child) const
App::DocumentObject *child) const
{
_FC_PY_CALL_CHECK(redirectSubName,return(NotImplemented));
Base::PyGILStateLocker lock;