Base: Fix header uniformity, whitespace, and doxygen

[skip ci]
This commit is contained in:
luz paz
2020-11-22 12:00:16 -05:00
committed by wwmayer
parent 810a8dc643
commit 01b21e0d06
77 changed files with 511 additions and 433 deletions

View File

@@ -1,3 +1,24 @@
/***************************************************************************
* Copyright (c) 2013 Jürgen Riegel <juergen.riegel@web.de> *
* *
* This file is part of the FreeCAD CAx development system. *
* *
* This library is free software; you can redistribute it and/or *
* modify it under the terms of the GNU Library General Public *
* License as published by the Free Software Foundation; either *
* version 2 of the License, or (at your option) any later version. *
* *
* This library is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU Library General Public License for more details. *
* *
* You should have received a copy of the GNU Library General Public *
* License along with this library; see the file COPYING.LIB. If not, *
* write to the Free Software Foundation, Inc., 59 Temple Place, *
* Suite 330, Boston, MA 02111-1307, USA *
* *
***************************************************************************/
#include "PreCompiled.h"
@@ -15,7 +36,7 @@ std::string UnitPy::representation(void) const
{
const UnitSignature & Sig = getUnitPtr()->getSignature();
std::stringstream ret;
ret << "Unit: ";
ret << "Unit: ";
ret << getUnitPtr()->getString().toUtf8().constData() << " (";
ret << Sig.Length << ",";
ret << Sig.Mass << ",";
@@ -24,7 +45,7 @@ std::string UnitPy::representation(void) const
ret << Sig.ThermodynamicTemperature << ",";
ret << Sig.AmountOfSubstance << ",";
ret << Sig.LuminousIntensity << ",";
ret << Sig.Angle << ")";
ret << Sig.Angle << ")";
std::string type = getUnitPtr()->getTypeString().toUtf8().constData();
if (! type.empty())
ret << " [" << type << "]";
@@ -34,7 +55,7 @@ std::string UnitPy::representation(void) const
PyObject *UnitPy::PyMake(struct _typeobject *, PyObject *, PyObject *) // Python wrapper
{
// create a new instance of UnitPy and the Twin object
// create a new instance of UnitPy and the Twin object
return new UnitPy(new Unit);
}
@@ -152,7 +173,7 @@ PyObject* UnitPy::number_multiply_handler(PyObject *self, PyObject *other)
if (PyObject_TypeCheck(other, &(UnitPy::Type))) {
Base::Unit *a = static_cast<UnitPy*>(self) ->getUnitPtr();
Base::Unit *b = static_cast<UnitPy*>(other)->getUnitPtr();
return new UnitPy(new Unit( (*a) * (*b) ) );
}
else {
@@ -221,7 +242,7 @@ PyObject *UnitPy::getCustomAttributes(const char* /*attr*/) const
int UnitPy::setCustomAttributes(const char* /*attr*/, PyObject* /*obj*/)
{
return 0;
return 0;
}
PyObject * UnitPy::number_divide_handler (PyObject* /*self*/, PyObject* /*other*/)