Base: Modernise ctors dtors defs etc

This commit is contained in:
berniev
2022-08-01 13:56:03 +10:00
committed by wwmayer
parent ea233be212
commit 15419982d4
60 changed files with 271 additions and 363 deletions

View File

@@ -26,10 +26,7 @@
using namespace Base;
Axis::Axis()
{
}
Axis::Axis() = default;
Axis::Axis(const Axis& that)
{

View File

@@ -40,7 +40,7 @@ public:
Axis(const Axis&);
Axis(const Vector3d& Orig, const Vector3d& Dir);
/// Destruction
~Axis () {}
~Axis () = default;
const Vector3d& getBase() const {return _base;}
const Vector3d& getDirection() const {return _dir;}

View File

@@ -42,18 +42,13 @@ Type BaseClass::classTypeId = Base::Type::badType();
* A constructor.
* A more elaborate description of the constructor.
*/
BaseClass::BaseClass()
{
}
BaseClass::BaseClass() = default;
/**
* A destructor.
* A more elaborate description of the destructor.
*/
BaseClass::~BaseClass()
{
}
BaseClass::~BaseClass() = default;
//**************************************************************************

View File

@@ -74,9 +74,7 @@ BindingManager::BindingManager()
{
}
BindingManager::~BindingManager()
{
}
BindingManager::~BindingManager() = default;
bool BindingManager::hasWrapper(const void *cptr)
{

View File

@@ -263,9 +263,7 @@ inline BoundBox3<_Precision>::BoundBox3 (const Vector3<_Precision> &rcVector, _P
}
template <class _Precision>
inline BoundBox3<_Precision>::~BoundBox3 ()
{
}
inline BoundBox3<_Precision>::~BoundBox3 () = default;
template <class _Precision>
inline BoundBox3<_Precision>& BoundBox3<_Precision>::operator = (const BoundBox3<_Precision> &rcBound)

View File

@@ -57,9 +57,7 @@ Builder3D::Builder3D()
* A destructor.
* A more elaborate description of the destructor.
*/
Builder3D::~Builder3D()
{
}
Builder3D::~Builder3D() = default;
//**************************************************************************

View File

@@ -55,9 +55,7 @@ public:
: QEvent(QEvent::User), msgtype(type), msg(msg)
{
}
~ConsoleEvent()
{
}
~ConsoleEvent() override = default;
};
class ConsoleOutput : public QObject // clazy:exclude=missing-qobject-macro
@@ -73,7 +71,7 @@ public:
instance = nullptr;
}
void customEvent(QEvent* ev) {
void customEvent(QEvent* ev) override {
if (ev->type() == QEvent::User) {
ConsoleEvent* ce = static_cast<ConsoleEvent*>(ev);
switch (ce->msgtype) {
@@ -94,12 +92,8 @@ public:
}
private:
ConsoleOutput()
{
}
~ConsoleOutput()
{
}
ConsoleOutput() = default;
~ConsoleOutput() override = default;
static ConsoleOutput* instance;
};
@@ -619,5 +613,4 @@ PyObject *ConsoleSingleton::sPyGetObservers(PyObject * /*self*/, PyObject *args)
PY_CATCH
}
Base::ILogger::~ILogger()
{}
Base::ILogger::~ILogger() = default;

View File

@@ -91,9 +91,7 @@ ConsoleObserverStd::ConsoleObserverStd() :
bLog = false;
}
ConsoleObserverStd::~ConsoleObserverStd()
{
}
ConsoleObserverStd::~ConsoleObserverStd() = default;
void ConsoleObserverStd::SendLog(const std::string& msg, LogStyle level)
{

View File

@@ -113,8 +113,8 @@ public:
RedirectStdOutput();
protected:
int overflow(int c = EOF);
int sync();
int overflow(int c = EOF) override;
int sync() override;
private:
std::string buffer;
@@ -126,8 +126,8 @@ public:
RedirectStdError();
protected:
int overflow(int c = EOF);
int sync();
int overflow(int c = EOF) override;
int sync() override;
private:
std::string buffer;
@@ -139,8 +139,8 @@ public:
RedirectStdLog();
protected:
int overflow(int c = EOF);
int sync();
int overflow(int c = EOF) override;
int sync() override;
private:
std::string buffer;

View File

@@ -35,9 +35,7 @@ CoordinateSystem::CoordinateSystem()
{
}
CoordinateSystem::~CoordinateSystem()
{
}
CoordinateSystem::~CoordinateSystem() = default;
void CoordinateSystem::setAxes(const Axis& v, const Vector3d& xd)
{

View File

@@ -38,9 +38,7 @@ Debugger::Debugger(QObject* parent)
{
}
Debugger::~Debugger()
{
}
Debugger::~Debugger() = default;
void Debugger::attach()
{

View File

@@ -59,11 +59,11 @@ class BaseExport Debugger : public QObject
public:
Debugger(QObject* parent=nullptr);
~Debugger();
~Debugger() override;
void attach();
void detach();
bool eventFilter(QObject*, QEvent*);
bool eventFilter(QObject*, QEvent*) override;
int exec();
public Q_SLOTS:

View File

@@ -41,7 +41,7 @@ public:
double re = 0.0;
double du = 0.0;
public:
DualNumber(){}
DualNumber() = default;
DualNumber(double re, double du = 0.0)
: re(re), du(du)
{}

View File

@@ -48,7 +48,7 @@ public:
DualNumber w;
public:
///default constructor: init with zeros
DualQuat(){}
DualQuat() = default;
DualQuat(DualNumber x, DualNumber y, DualNumber z, DualNumber w)
: x(x), y(y), z(z), w(w) {}
DualQuat(double x,double y,double z,double w,double dx,double dy,double dz,double dw)

View File

@@ -92,7 +92,7 @@ class BaseExport Exception : public BaseClass
TYPESYSTEM_HEADER();
public:
virtual ~Exception() throw() {}
~Exception() throw() override = default;
Exception &operator=(const Exception &inst);
@@ -121,9 +121,9 @@ public:
inline void setReported(bool reported) { _isReported = reported; }
/// returns a Python dictionary containing the exception data
virtual PyObject * getPyObject();
PyObject * getPyObject() override;
/// returns sets the exception data from a Python dictionary
virtual void setPyObject( PyObject * pydict);
void setPyObject( PyObject * pydict) override;
/// returns the corresponding python exception type
virtual PyObject * getPyExceptionType() const;
@@ -165,7 +165,7 @@ public:
AbortException();
/// Destruction
virtual ~AbortException() throw() {}
~AbortException() throw() override = default;
/// Description of the exception
const char* what() const throw() override;
/// returns the corresponding python exception type
@@ -185,7 +185,7 @@ public:
XMLBaseException(const std::string& sMessage);
/// Destruction
virtual ~XMLBaseException() throw() {}
~XMLBaseException() throw() override = default;
PyObject * getPyExceptionType() const override;
};
@@ -204,7 +204,7 @@ public:
XMLParseException();
/// Destruction
virtual ~XMLParseException() throw() {}
~XMLParseException() throw() override = default;
/// Description of the exception
const char* what() const throw() override;
PyObject * getPyExceptionType() const override;
@@ -225,7 +225,7 @@ public:
XMLAttributeError();
/// Destruction
virtual ~XMLAttributeError() throw() {}
~XMLAttributeError() throw() override = default;
/// Description of the exception
const char* what() const throw() override;
PyObject * getPyExceptionType() const override;
@@ -247,7 +247,7 @@ public:
/// Construction
FileException(const FileException &inst);
/// Destruction
virtual ~FileException() throw() {}
~FileException() throw() override = default;
/// Assignment operator
FileException &operator=(const FileException &inst);
/// Description of the exception
@@ -283,7 +283,7 @@ public:
FileSystemError(const char * sMessage);
FileSystemError(const std::string& sMessage);
/// Destruction
virtual ~FileSystemError() throw() {}
~FileSystemError() throw() override = default;
PyObject * getPyExceptionType() const override;
};
@@ -299,7 +299,7 @@ public:
BadFormatError(const char * sMessage);
BadFormatError(const std::string& sMessage);
/// Destruction
virtual ~BadFormatError() throw() {}
~BadFormatError() throw() override = default;
PyObject * getPyExceptionType() const override;
};
@@ -320,7 +320,7 @@ public:
/// Construction
MemoryException(const MemoryException &inst);
/// Destruction
virtual ~MemoryException() throw() {}
~MemoryException() throw() override = default;
/// Assignment operator
MemoryException &operator=(const MemoryException &inst);
#if defined (__GNUC__)
@@ -342,7 +342,7 @@ public:
AccessViolation(const char * sMessage);
AccessViolation(const std::string& sMessage);
/// Destruction
virtual ~AccessViolation() throw() {}
~AccessViolation() throw() override = default;
PyObject * getPyExceptionType() const override;
};
@@ -359,7 +359,7 @@ public:
AbnormalProgramTermination(const char * sMessage);
AbnormalProgramTermination(const std::string& sMessage);
/// Destruction
virtual ~AbnormalProgramTermination() throw() {}
~AbnormalProgramTermination() throw() override = default;
PyObject * getPyExceptionType() const override;
};
@@ -375,7 +375,7 @@ public:
UnknownProgramOption(const char * sMessage);
UnknownProgramOption(const std::string& sMessage);
/// Destruction
virtual ~UnknownProgramOption() throw() {}
~UnknownProgramOption() throw() override = default;
PyObject * getPyExceptionType() const override;
};
@@ -392,7 +392,7 @@ public:
ProgramInformation(const std::string& sMessage);
/// Destruction
virtual ~ProgramInformation() throw() {}
~ProgramInformation() throw() override = default;
};
/**
@@ -407,7 +407,7 @@ public:
TypeError(const char * sMessage);
TypeError(const std::string& sMessage);
/// Destruction
virtual ~TypeError() throw() {}
~TypeError() throw() override = default;
PyObject * getPyExceptionType() const override;
};
@@ -423,7 +423,7 @@ public:
ValueError(const char * sMessage);
ValueError(const std::string& sMessage);
/// Destruction
virtual ~ValueError() throw() {}
~ValueError() throw() override = default;
PyObject * getPyExceptionType() const override;
};
@@ -439,7 +439,7 @@ public:
IndexError(const char * sMessage);
IndexError(const std::string& sMessage);
/// Destruction
virtual ~IndexError() throw() {}
~IndexError() throw() override = default;
PyObject * getPyExceptionType() const override;
};
@@ -451,7 +451,7 @@ public:
NameError(const char * sMessage);
NameError(const std::string& sMessage);
/// Destruction
virtual ~NameError() throw() {}
~NameError() throw() override = default;
PyObject * getPyExceptionType() const override;
};
@@ -463,7 +463,7 @@ public:
ImportError(const char * sMessage);
ImportError(const std::string& sMessage);
/// Destruction
virtual ~ImportError() throw() {}
~ImportError() throw() override = default;
PyObject * getPyExceptionType() const override;
};
@@ -479,7 +479,7 @@ public:
AttributeError(const char * sMessage);
AttributeError(const std::string& sMessage);
/// Destruction
virtual ~AttributeError() throw() {}
~AttributeError() throw() override = default;
PyObject * getPyExceptionType() const override;
};
@@ -495,7 +495,7 @@ public:
RuntimeError(const char * sMessage);
RuntimeError(const std::string& sMessage);
/// Destruction
virtual ~RuntimeError() throw() {}
~RuntimeError() throw() override = default;
PyObject * getPyExceptionType() const override;
};
@@ -511,8 +511,8 @@ public:
BadGraphError(const char * sMessage);
BadGraphError(const std::string& sMessage);
/// Destruction
virtual ~BadGraphError() throw() {}
PyObject * getPyExceptionType() const;
~BadGraphError() throw() override = default;
PyObject * getPyExceptionType() const override;
};
/**
@@ -527,7 +527,7 @@ public:
NotImplementedError(const char * sMessage);
NotImplementedError(const std::string& sMessage);
/// Destruction
virtual ~NotImplementedError() throw() {}
~NotImplementedError() throw() override = default;
PyObject * getPyExceptionType() const override;
};
@@ -543,7 +543,7 @@ public:
ZeroDivisionError(const char * sMessage);
ZeroDivisionError(const std::string& sMessage);
/// Destruction
virtual ~ZeroDivisionError() throw() {}
~ZeroDivisionError() throw() override = default;
PyObject * getPyExceptionType() const override;
};
@@ -559,7 +559,7 @@ public:
ReferenceError(const char * sMessage);
ReferenceError(const std::string& sMessage);
/// Destruction
virtual ~ReferenceError() throw() {}
~ReferenceError() throw() override = default;
PyObject * getPyExceptionType() const override;
};
@@ -576,7 +576,7 @@ public:
ExpressionError(const char * sMessage);
ExpressionError(const std::string& sMessage);
/// Destruction
virtual ~ExpressionError() throw() {}
~ExpressionError() throw() override = default;
PyObject * getPyExceptionType() const override;
};
@@ -592,7 +592,7 @@ public:
ParserError(const char * sMessage);
ParserError(const std::string& sMessage);
/// Destruction
virtual ~ParserError() throw() {}
~ParserError() throw() override = default;
PyObject * getPyExceptionType() const override;
};
@@ -608,7 +608,7 @@ public:
UnicodeError(const char * sMessage);
UnicodeError(const std::string& sMessage);
/// Destruction
virtual ~UnicodeError() throw() {}
~UnicodeError() throw() override = default;
PyObject * getPyExceptionType() const override;
};
@@ -624,7 +624,7 @@ public:
OverflowError(const char * sMessage);
OverflowError(const std::string& sMessage);
/// Destruction
virtual ~OverflowError() throw() {}
~OverflowError() throw() override = default;
PyObject * getPyExceptionType() const override;
};
@@ -640,7 +640,7 @@ public:
UnderflowError(const char * sMessage);
UnderflowError(const std::string& sMessage);
/// Destruction
virtual ~UnderflowError() throw() {}
~UnderflowError() throw() override = default;
PyObject * getPyExceptionType() const override;
};
@@ -656,7 +656,7 @@ public:
UnitsMismatchError(const char * sMessage);
UnitsMismatchError(const std::string& sMessage);
/// Destruction
virtual ~UnitsMismatchError() throw() {}
~UnitsMismatchError() throw() override = default;
PyObject * getPyExceptionType() const override;
};
@@ -673,8 +673,8 @@ public:
CADKernelError(const char * sMessage);
CADKernelError(const std::string& sMessage);
/// Destruction
virtual ~CADKernelError() throw() {}
PyObject * getPyExceptionType() const;
~CADKernelError() throw() override = default;
PyObject * getPyExceptionType() const override;
};
/* The RestoreError can be used to try to do a best recovery effort when an error during restoring
@@ -692,7 +692,7 @@ public:
RestoreError(const char * sMessage);
RestoreError(const std::string& sMessage);
/// Destruction
virtual ~RestoreError() throw() {}
~RestoreError() throw() override = default;
PyObject * getPyExceptionType() const override;
};

View File

@@ -40,7 +40,7 @@ class BaseExport AbstractExceptionProducer : public AbstractProducer
public:
AbstractExceptionProducer () = default;
// just implement it
void* Produce () const {
void* Produce () const override {
return nullptr;
}
virtual void raiseException(PyObject * pydict) const = 0;
@@ -74,9 +74,9 @@ public:
ExceptionFactory::Instance().AddProducer(typeid(CLASS).name(), this);
}
virtual ~ExceptionProducer (){}
~ExceptionProducer () override = default;
void raiseException(PyObject * pydict) const
void raiseException(PyObject * pydict) const override
{
CLASS c;
c.setPyObject(pydict);

View File

@@ -40,8 +40,8 @@ namespace Base
class BaseExport AbstractProducer
{
public:
AbstractProducer() {}
virtual ~AbstractProducer() {}
AbstractProducer() = default;
virtual ~AbstractProducer() = default;
/// overwritten by a concrete producer to produce the needed object
virtual void* Produce () const = 0;
};
@@ -69,7 +69,7 @@ protected:
void* Produce (const char* sClassName) const;
std::map<const std::string, AbstractProducer*> _mpcProducers;
/// construction
Factory (){}
Factory () = default;
/// destruction
virtual ~Factory ();
};
@@ -89,8 +89,8 @@ public:
private:
static ScriptFactorySingleton* _pcSingleton;
ScriptFactorySingleton(){}
~ScriptFactorySingleton(){}
ScriptFactorySingleton() = default;
~ScriptFactorySingleton() override = default;
};
inline ScriptFactorySingleton& ScriptFactory()
@@ -113,10 +113,10 @@ public:
ScriptFactorySingleton::Instance().AddProducer(name, this);
}
virtual ~ScriptProducer (){}
~ScriptProducer () override = default;
/// Produce an instance
virtual void* Produce () const
void* Produce () const override
{
return const_cast<char*>(mScript);
}

View File

@@ -48,9 +48,7 @@ ClassTemplate::ClassTemplate()
* A destructor.
* A more elaborate description of the destructor.
*/
ClassTemplate::~ClassTemplate()
{
}
ClassTemplate::~ClassTemplate() = default;
//**************************************************************************

View File

@@ -32,9 +32,7 @@ FutureWatcherProgress::FutureWatcherProgress(const char* text, unsigned int step
{
}
FutureWatcherProgress::~FutureWatcherProgress()
{
}
FutureWatcherProgress::~FutureWatcherProgress() = default;
void FutureWatcherProgress::progressValueChanged(int v)
{

View File

@@ -37,7 +37,7 @@ class BaseExport FutureWatcherProgress : public QObject
public:
FutureWatcherProgress(const char* text, unsigned int steps);
~FutureWatcherProgress();
~FutureWatcherProgress() override;
private Q_SLOTS:
void progressValueChanged(int v);

View File

@@ -133,9 +133,7 @@ Vector2dPy::Vector2dPy(Py::PythonClassInstance *self, Py::Tuple &args, Py::Dict
v.y = y;
}
Vector2dPy::~Vector2dPy()
{
}
Vector2dPy::~Vector2dPy() = default;
Py::Object Vector2dPy::repr()
{

View File

@@ -58,12 +58,12 @@ public:
static Py::PythonClassObject<Vector2dPy> create(const Vector2d&);
static Py::PythonClassObject<Vector2dPy> create(double x, double y);
Vector2dPy(Py::PythonClassInstance *self, Py::Tuple &args, Py::Dict &kwds);
virtual ~Vector2dPy();
~Vector2dPy() override;
static void init_type();
Py::Object getattro(const Py::String &name_);
int setattro(const Py::String &name_, const Py::Object &value);
virtual Py::Object repr();
Py::Object getattro(const Py::String &name_) override;
int setattro(const Py::String &name_, const Py::Object &value) override;
Py::Object repr() override;
inline const Vector2d& value() const {
return v;
}
@@ -77,24 +77,24 @@ public:
/** @name methods for group handling */
//@{
virtual Py::Object number_negative();
virtual Py::Object number_positive();
virtual Py::Object number_absolute();
virtual Py::Object number_invert();
virtual Py::Object number_int();
virtual Py::Object number_float();
virtual Py::Object number_long();
virtual Py::Object number_add( const Py::Object & );
virtual Py::Object number_subtract( const Py::Object & );
virtual Py::Object number_multiply( const Py::Object & );
virtual Py::Object number_remainder( const Py::Object & );
virtual Py::Object number_divmod( const Py::Object & );
virtual Py::Object number_lshift( const Py::Object & );
virtual Py::Object number_rshift( const Py::Object & );
virtual Py::Object number_and( const Py::Object & );
virtual Py::Object number_xor( const Py::Object & );
virtual Py::Object number_or( const Py::Object & );
virtual Py::Object number_power( const Py::Object &, const Py::Object & );
Py::Object number_negative() override;
Py::Object number_positive() override;
Py::Object number_absolute() override;
Py::Object number_invert() override;
Py::Object number_int() override;
Py::Object number_float() override;
Py::Object number_long() override;
Py::Object number_add( const Py::Object & ) override;
Py::Object number_subtract( const Py::Object & ) override;
Py::Object number_multiply( const Py::Object & ) override;
Py::Object number_remainder( const Py::Object & ) override;
Py::Object number_divmod( const Py::Object & ) override;
Py::Object number_lshift( const Py::Object & ) override;
Py::Object number_rshift( const Py::Object & ) override;
Py::Object number_and( const Py::Object & ) override;
Py::Object number_xor( const Py::Object & ) override;
Py::Object number_or( const Py::Object & ) override;
Py::Object number_power( const Py::Object &, const Py::Object & ) override;
//@}
Py::Object isNull(const Py::Tuple&);
@@ -144,7 +144,7 @@ public:
explicit Vector (const Base::Vector3d&);
explicit Vector (const Base::Vector3f&);
virtual bool accepts (PyObject *pyob) const;
bool accepts (PyObject *pyob) const override;
Vector(const Object& other): Object(other.ptr()) {
validate();
@@ -203,7 +203,7 @@ public:
GeometryT(const Object& other): Object(other.ptr()) {
validate();
}
virtual bool accepts (PyObject *pyob) const {
bool accepts (PyObject *pyob) const override {
return pyob && Geometry_TypeCheck (pyob);
}
GeometryT& operator= (const Object& rhs)

View File

@@ -44,9 +44,7 @@ StdInputStream::StdInputStream( std::istream& Stream, XERCES_CPP_NAMESPACE_QUALI
}
StdInputStream::~StdInputStream()
{
}
StdInputStream::~StdInputStream() = default;
// ---------------------------------------------------------------------------
@@ -135,9 +133,7 @@ StdInputSource::StdInputSource ( std::istream& Stream, const char* filePath, XER
}
StdInputSource::~StdInputSource()
{
}
StdInputSource::~StdInputSource() = default;
// ---------------------------------------------------------------------------

View File

@@ -45,7 +45,7 @@ class BaseExport StdInputStream : public XERCES_CPP_NAMESPACE_QUALIFIER BinInput
{
public :
StdInputStream ( std::istream& Stream, XERCES_CPP_NAMESPACE_QUALIFIER MemoryManager* const manager = XERCES_CPP_NAMESPACE_QUALIFIER XMLPlatformUtils::fgMemoryManager );
virtual ~StdInputStream();
~StdInputStream() override;
// -----------------------------------------------------------------------
// Implementation of the input stream interface
@@ -54,9 +54,9 @@ public :
virtual unsigned int curPos() const;
virtual unsigned int readBytes( XMLByte* const toFill, const unsigned int maxToRead );
#else
virtual XMLFilePos curPos() const;
virtual XMLSize_t readBytes( XMLByte* const toFill, const XMLSize_t maxToRead );
virtual const XMLCh* getContentType() const {return nullptr;}
XMLFilePos curPos() const override;
XMLSize_t readBytes( XMLByte* const toFill, const XMLSize_t maxToRead ) override;
const XMLCh* getContentType() const override {return nullptr;}
#endif
private :
@@ -83,9 +83,9 @@ class BaseExport StdInputSource : public XERCES_CPP_NAMESPACE_QUALIFIER InputSou
{
public :
StdInputSource ( std::istream& Stream, const char* filePath, XERCES_CPP_NAMESPACE_QUALIFIER MemoryManager* const manager = XERCES_CPP_NAMESPACE_QUALIFIER XMLPlatformUtils::fgMemoryManager );
~StdInputSource();
~StdInputSource() override;
virtual XERCES_CPP_NAMESPACE_QUALIFIER BinInputStream* makeStream() const;
XERCES_CPP_NAMESPACE_QUALIFIER BinInputStream* makeStream() const override;
private:
StdInputSource(const StdInputSource&);

View File

@@ -93,9 +93,7 @@ PyException::PyException()
PyErr_Clear(); // must be called to keep Python interpreter in a valid state (Werner)
}
PyException::~PyException() throw()
{
}
PyException::~PyException() throw() = default;
void PyException::ThrowException()
{
@@ -203,12 +201,8 @@ public:
add_varargs_method("flush",&PythonStdOutput::flush,"flush()");
}
PythonStdOutput()
{
}
~PythonStdOutput()
{
}
PythonStdOutput() = default;
~PythonStdOutput() override = default;
Py::Object write(const Py::Tuple&)
{
@@ -227,10 +221,7 @@ InterpreterSingleton::InterpreterSingleton()
this->_global = nullptr;
}
InterpreterSingleton::~InterpreterSingleton()
{
}
InterpreterSingleton::~InterpreterSingleton() = default;
std::string InterpreterSingleton::runString(const char *sCmd)

View File

@@ -93,7 +93,7 @@ public:
/// constructor does the whole job
PyException();
PyException(const Py::Object &obj);
~PyException() throw();
~PyException() throw() override;
void raiseException();
@@ -105,10 +105,10 @@ public:
/// this function returns the stack trace
const std::string &getStackTrace() const {return _stackTrace;}
const std::string &getErrorType() const {return _errorType;}
virtual PyObject *getPyExceptionType() const override {return _exceptionType;}
PyObject *getPyExceptionType() const override {return _exceptionType;}
void ReportException () const override;
/// Sets the Python error indicator and an error message
virtual void setPyException() const override;
void setPyException() const override;
protected:
std::string _stackTrace;
@@ -139,7 +139,7 @@ class BaseExport SystemExitException : public Exception
{
public:
SystemExitException();
virtual ~SystemExitException() throw() {}
~SystemExitException() throw() override = default;
long getExitCode() const { return _exitCode;}
protected:

View File

@@ -72,7 +72,7 @@ public:
Matrix4D (const Vector3f& rclBase, const Vector3f& rclDir, float fAngle);
Matrix4D (const Vector3d& rclBase, const Vector3d& rclDir, double fAngle);
/// Destruction
~Matrix4D () {}
~Matrix4D () = default;
/** @name Operators */
//@{

View File

@@ -54,13 +54,13 @@ public:
* A constructor.
* No special function so far.
*/
Observer(){}
Observer() = default;
/**
* A destructor.
* No special function so far.
*/
virtual ~Observer(){}
virtual ~Observer() = default;
/**
* This method need to be reimplemented from the concrete Observer
@@ -108,7 +108,7 @@ public:
* A constructor.
* No special function so far.
*/
Subject(){}
Subject() = default;
/**
* A destructor.

View File

@@ -84,17 +84,16 @@ public:
fSawErrors(false) {
}
~DOMTreeErrorReporter() {
}
~DOMTreeErrorReporter() override = default;
// -----------------------------------------------------------------------
// Implementation of the error handler interface
// -----------------------------------------------------------------------
void warning(const SAXParseException& toCatch);
void error(const SAXParseException& toCatch);
void fatalError(const SAXParseException& toCatch);
void resetErrors();
void warning(const SAXParseException& toCatch) override;
void error(const SAXParseException& toCatch) override;
void fatalError(const SAXParseException& toCatch) override;
void resetErrors() override;
// -----------------------------------------------------------------------
// Getter methods
@@ -156,20 +155,20 @@ public:
//@{
/** @name Destructors */
~DOMPrintFilter() {}
~DOMPrintFilter() override = default;
//@{
/** @ interface from DOMWriterFilter */
virtual FilterAction acceptNode(const XERCES_CPP_NAMESPACE_QUALIFIER DOMNode*) const;
FilterAction acceptNode(const XERCES_CPP_NAMESPACE_QUALIFIER DOMNode*) const override;
//@{
virtual ShowType getWhatToShow() const {
ShowType getWhatToShow() const override {
return fWhatToShow;
}
private:
// unimplemented copy ctor and assignment operator
DOMPrintFilter(const DOMPrintFilter&);
DOMPrintFilter(const DOMPrintFilter&) = delete;
DOMPrintFilter & operator = (const DOMPrintFilter&);
ShowType fWhatToShow;
@@ -179,11 +178,11 @@ class DOMPrintErrorHandler : public DOMErrorHandler
{
public:
DOMPrintErrorHandler() {}
~DOMPrintErrorHandler() {}
DOMPrintErrorHandler() = default;
~DOMPrintErrorHandler() override = default;
/** @name The error handler interface */
bool handleError(const DOMError& domError);
bool handleError(const DOMError& domError) override;
void resetErrors() {}
private :
@@ -222,9 +221,7 @@ ParameterGrp::ParameterGrp(XERCES_CPP_NAMESPACE_QUALIFIER DOMElement *GroupNode,
/** Destruction
* complete destruction of the object
*/
ParameterGrp::~ParameterGrp()
{
}
ParameterGrp::~ParameterGrp() = default;
//**************************************************************************
// Access methods
@@ -1072,9 +1069,7 @@ ParameterSerializer::ParameterSerializer(const std::string& fn)
{
}
ParameterSerializer::~ParameterSerializer()
{
}
ParameterSerializer::~ParameterSerializer() = default;
void ParameterSerializer::SaveDocument(const ParameterManager& mgr)
{

View File

@@ -85,7 +85,7 @@ class ParameterManager;
* and exporting groups of parameters and enables streaming
* to a persistent medium via XML.
* \par
* Its main task is making user parameter persistent, saving
* Its main task is making user parameter persistent, saving
* last used values in dialog boxes, setting and retrieving all
* kind of preferences and so on.
* @see ParameterManager
@@ -230,7 +230,7 @@ protected:
/// constructor is protected (handle concept)
ParameterGrp(XERCES_CPP_NAMESPACE_QUALIFIER DOMElement *GroupNode=nullptr,const char* sName=nullptr);
/// destructor is protected (handle concept)
~ParameterGrp();
~ParameterGrp() override;
/// helper function for GetGroup
Base::Reference<ParameterGrp> _GetGroup(const char* Name);
bool ShouldRemove() const;
@@ -295,7 +295,7 @@ class BaseExport ParameterManager : public ParameterGrp
{
public:
ParameterManager();
~ParameterManager();
~ParameterManager() override;
static void Init();
static void Terminate();

View File

@@ -52,12 +52,12 @@ public:
{
inst = obj;
}
virtual ~ParameterGrpObserver()
~ParameterGrpObserver() override
{
Base::PyGILStateLocker lock;
inst = Py::None();
}
virtual void OnChange(ParameterGrp::SubjectType &rCaller,ParameterGrp::MessageType Reason)
void OnChange(ParameterGrp::SubjectType &rCaller,ParameterGrp::MessageType Reason) override
{
Base::PyGILStateLocker lock;
try {
@@ -93,9 +93,9 @@ public:
static void init_type(); // announce properties and methods
ParameterGrpPy(const Base::Reference<ParameterGrp> &rcParamGrp);
~ParameterGrpPy();
~ParameterGrpPy() override;
Py::Object repr();
Py::Object repr() override;
Py::Object getGroup(const Py::Tuple&);
Py::Object getGroupName(const Py::Tuple&);

View File

@@ -29,10 +29,7 @@
using namespace Base;
Placement::Placement()
{
}
Placement::Placement() = default;
Placement::Placement(const Base::Matrix4D& matrix)
{

View File

@@ -51,7 +51,7 @@ public:
//@}
/// Destruction
~Placement () {}
~Placement () = default;
Matrix4D toMatrix() const;
void fromMatrix(const Matrix4D& m);

View File

@@ -116,7 +116,7 @@ public:
explicit Quantity(double value, const Unit& unit=Unit());
explicit Quantity(double value, const QString& unit);
/// Destruction
~Quantity () {}
~Quantity () = default;
/** Operators. */
//@{

View File

@@ -125,7 +125,7 @@ public:
};
/// open the file and read the first element
XMLReader(const char* FileName, std::istream&);
~XMLReader();
~XMLReader() override;
bool isValid() const { return _valid; }
bool isVerbose() const { return _verbose; }
@@ -223,28 +223,28 @@ protected:
// -----------------------------------------------------------------------
/** @name Content handler */
//@{
virtual void startDocument();
virtual void endDocument();
virtual void startElement(const XMLCh* const uri, const XMLCh* const localname, const XMLCh* const qname, const XERCES_CPP_NAMESPACE_QUALIFIER Attributes& attrs);
virtual void endElement (const XMLCh* const uri, const XMLCh *const localname, const XMLCh *const qname);
void startDocument() override;
void endDocument() override;
void startElement(const XMLCh* const uri, const XMLCh* const localname, const XMLCh* const qname, const XERCES_CPP_NAMESPACE_QUALIFIER Attributes& attrs) override;
void endElement (const XMLCh* const uri, const XMLCh *const localname, const XMLCh *const qname) override;
#if (XERCES_VERSION_MAJOR == 2)
virtual void characters (const XMLCh* const chars, const unsigned int length);
virtual void ignorableWhitespace(const XMLCh* const chars, const unsigned int length);
#else
virtual void characters (const XMLCh* const chars, const XMLSize_t length);
virtual void ignorableWhitespace(const XMLCh* const chars, const XMLSize_t length);
void characters (const XMLCh* const chars, const XMLSize_t length) override;
void ignorableWhitespace(const XMLCh* const chars, const XMLSize_t length) override;
#endif
//@}
/** @name Lexical handler */
//@{
virtual void startCDATA ();
virtual void endCDATA ();
void startCDATA () override;
void endCDATA () override;
//@}
/** @name Document handler */
//@{
virtual void resetDocument();
void resetDocument() override;
//@}
@@ -253,10 +253,10 @@ protected:
// -----------------------------------------------------------------------
/** @name Error handler */
//@{
void warning(const XERCES_CPP_NAMESPACE_QUALIFIER SAXParseException& exc);
void error(const XERCES_CPP_NAMESPACE_QUALIFIER SAXParseException& exc);
void fatalError(const XERCES_CPP_NAMESPACE_QUALIFIER SAXParseException& exc);
void resetErrors();
void warning(const XERCES_CPP_NAMESPACE_QUALIFIER SAXParseException& exc) override;
void error(const XERCES_CPP_NAMESPACE_QUALIFIER SAXParseException& exc) override;
void fatalError(const XERCES_CPP_NAMESPACE_QUALIFIER SAXParseException& exc) override;
void resetErrors() override;
//@}

View File

@@ -310,13 +310,9 @@ PyObject *ProgressIndicatorPy::PyMake(struct _typeobject *, PyObject *, PyObject
return new ProgressIndicatorPy();
}
ProgressIndicatorPy::ProgressIndicatorPy()
{
}
ProgressIndicatorPy::ProgressIndicatorPy() = default;
ProgressIndicatorPy::~ProgressIndicatorPy()
{
}
ProgressIndicatorPy::~ProgressIndicatorPy() = default;
Py::Object ProgressIndicatorPy::repr()
{

View File

@@ -269,15 +269,15 @@ public:
protected:
/** Starts the sequencer */
void startStep();
void startStep() override;
/** Writes the current progress to the console window. */
void nextStep(bool canAbort);
void nextStep(bool canAbort) override;
private:
/** Puts text to the console window */
void setText (const char* pszTxt);
void setText (const char* pszTxt) override;
/** Resets the sequencer */
void resetData();
void resetData() override;
};
/** The SequencerLauncher class is provided for convenience. It allows you to run an instance of the
@@ -390,9 +390,9 @@ public:
static void init_type(); // announce properties and methods
ProgressIndicatorPy();
~ProgressIndicatorPy();
~ProgressIndicatorPy() override;
Py::Object repr();
Py::Object repr() override;
Py::Object start(const Py::Tuple&);
Py::Object next(const Py::Tuple&);

View File

@@ -44,9 +44,7 @@ Stream::Stream() : _swap(false)
{
}
Stream::~Stream()
{
}
Stream::~Stream() = default;
Stream::ByteOrder Stream::byteOrder() const
{
@@ -62,9 +60,7 @@ OutputStream::OutputStream(std::ostream &rout) : _out(rout)
{
}
OutputStream::~OutputStream()
{
}
OutputStream::~OutputStream() = default;
OutputStream& OutputStream::operator << (bool b)
{
@@ -144,9 +140,7 @@ InputStream::InputStream(std::istream &rin) : _in(rin)
{
}
InputStream::~InputStream()
{
}
InputStream::~InputStream() = default;
InputStream& InputStream::operator >> (bool& b)
{
@@ -297,9 +291,7 @@ ByteArrayIStreambuf::ByteArrayIStreambuf(const QByteArray& data) : _buffer(data)
_cur = 0;
}
ByteArrayIStreambuf::~ByteArrayIStreambuf()
{
}
ByteArrayIStreambuf::~ByteArrayIStreambuf() = default;
ByteArrayIStreambuf::int_type ByteArrayIStreambuf::underflow()
{
@@ -367,9 +359,7 @@ IODeviceOStreambuf::IODeviceOStreambuf(QIODevice* dev) : device(dev)
{
}
IODeviceOStreambuf::~IODeviceOStreambuf()
{
}
IODeviceOStreambuf::~IODeviceOStreambuf() = default;
std::streambuf::int_type
IODeviceOStreambuf::overflow(std::streambuf::int_type c)
@@ -433,9 +423,7 @@ IODeviceIStreambuf::IODeviceIStreambuf(QIODevice* dev) : device(dev), buffer{}
buffer+pbSize); // end position
}
IODeviceIStreambuf::~IODeviceIStreambuf()
{
}
IODeviceIStreambuf::~IODeviceIStreambuf() = default;
std::streambuf::int_type
IODeviceIStreambuf::underflow()
@@ -746,9 +734,7 @@ Streambuf::Streambuf(const std::string& data)
_cur = _beg;
}
Streambuf::~Streambuf()
{
}
Streambuf::~Streambuf() = default;
Streambuf::int_type Streambuf::underflow()
{

View File

@@ -67,7 +67,7 @@ class BaseExport OutputStream : public Stream
{
public:
OutputStream(std::ostream &rout);
~OutputStream();
~OutputStream() override;
OutputStream& operator << (bool b);
OutputStream& operator << (int8_t ch);
@@ -97,7 +97,7 @@ class BaseExport InputStream : public Stream
{
public:
InputStream(std::istream &rin);
~InputStream();
~InputStream() override;
InputStream& operator >> (bool& b);
InputStream& operator >> (int8_t& ch);
@@ -136,18 +136,18 @@ class BaseExport ByteArrayOStreambuf : public std::streambuf
{
public:
explicit ByteArrayOStreambuf(QByteArray& ba);
~ByteArrayOStreambuf();
~ByteArrayOStreambuf() override;
protected:
virtual int_type overflow(std::streambuf::int_type v);
virtual std::streamsize xsputn (const char* s, std::streamsize num);
virtual pos_type seekoff(std::streambuf::off_type off,
int_type overflow(std::streambuf::int_type v) override;
std::streamsize xsputn (const char* s, std::streamsize num) override;
pos_type seekoff(std::streambuf::off_type off,
std::ios_base::seekdir way,
std::ios_base::openmode which =
std::ios::in | std::ios::out);
virtual pos_type seekpos(std::streambuf::pos_type sp,
std::ios::in | std::ios::out) override;
pos_type seekpos(std::streambuf::pos_type sp,
std::ios_base::openmode which =
std::ios::in | std::ios::out);
std::ios::in | std::ios::out) override;
private:
ByteArrayOStreambuf(const ByteArrayOStreambuf&);
@@ -166,20 +166,20 @@ class BaseExport ByteArrayIStreambuf : public std::streambuf
{
public:
explicit ByteArrayIStreambuf(const QByteArray& buf);
~ByteArrayIStreambuf();
~ByteArrayIStreambuf() override;
protected:
virtual int_type uflow();
virtual int_type underflow();
virtual int_type pbackfail(int_type ch);
virtual std::streamsize showmanyc();
virtual pos_type seekoff(std::streambuf::off_type off,
int_type uflow() override;
int_type underflow() override;
int_type pbackfail(int_type ch) override;
std::streamsize showmanyc() override;
pos_type seekoff(std::streambuf::off_type off,
std::ios_base::seekdir way,
std::ios_base::openmode which =
std::ios::in | std::ios::out);
virtual pos_type seekpos(std::streambuf::pos_type pos,
std::ios::in | std::ios::out) override;
pos_type seekpos(std::streambuf::pos_type pos,
std::ios_base::openmode which =
std::ios::in | std::ios::out);
std::ios::in | std::ios::out) override;
private:
ByteArrayIStreambuf(const ByteArrayIStreambuf&);
ByteArrayIStreambuf& operator=(const ByteArrayIStreambuf&);
@@ -198,18 +198,18 @@ class BaseExport IODeviceOStreambuf : public std::streambuf
{
public:
IODeviceOStreambuf(QIODevice* dev);
~IODeviceOStreambuf();
~IODeviceOStreambuf() override;
protected:
virtual int_type overflow(std::streambuf::int_type v);
virtual std::streamsize xsputn (const char* s, std::streamsize num);
virtual pos_type seekoff(std::streambuf::off_type off,
int_type overflow(std::streambuf::int_type v) override;
std::streamsize xsputn (const char* s, std::streamsize num) override;
pos_type seekoff(std::streambuf::off_type off,
std::ios_base::seekdir way,
std::ios_base::openmode which =
std::ios::in | std::ios::out);
virtual pos_type seekpos(std::streambuf::pos_type sp,
std::ios::in | std::ios::out) override;
pos_type seekpos(std::streambuf::pos_type sp,
std::ios_base::openmode which =
std::ios::in | std::ios::out);
std::ios::in | std::ios::out) override;
private:
IODeviceOStreambuf(const IODeviceOStreambuf&);
IODeviceOStreambuf& operator=(const IODeviceOStreambuf&);
@@ -227,17 +227,17 @@ class BaseExport IODeviceIStreambuf : public std::streambuf
{
public:
IODeviceIStreambuf(QIODevice* dev);
~IODeviceIStreambuf();
~IODeviceIStreambuf() override;
protected:
virtual int_type underflow();
virtual pos_type seekoff(std::streambuf::off_type off,
int_type underflow() override;
pos_type seekoff(std::streambuf::off_type off,
std::ios_base::seekdir way,
std::ios_base::openmode which =
std::ios::in | std::ios::out);
virtual pos_type seekpos(std::streambuf::pos_type sp,
std::ios::in | std::ios::out) override;
pos_type seekpos(std::streambuf::pos_type sp,
std::ios_base::openmode which =
std::ios::in | std::ios::out);
std::ios::in | std::ios::out) override;
private:
IODeviceIStreambuf(const IODeviceIStreambuf&);
IODeviceIStreambuf& operator=(const IODeviceIStreambuf&);
@@ -269,18 +269,18 @@ public:
};
PyStreambuf(PyObject* o, std::size_t buf_size = 256, std::size_t put_back = 8);
virtual ~PyStreambuf();
~PyStreambuf() override;
void setType(Type t) {
type = t;
}
protected:
int_type underflow();
int_type overflow(int_type c = EOF);
std::streamsize xsputn (const char* s, std::streamsize num);
int sync();
pos_type seekoff(off_type offset, seekdir dir, openmode);
pos_type seekpos(pos_type offset, openmode mode);
int_type underflow() override;
int_type overflow(int_type c = EOF) override;
std::streamsize xsputn (const char* s, std::streamsize num) override;
int sync() override;
pos_type seekoff(off_type offset, seekdir dir, openmode) override;
pos_type seekpos(pos_type offset, openmode mode) override;
private:
bool flushBuffer();
@@ -301,20 +301,20 @@ class BaseExport Streambuf : public std::streambuf
{
public:
explicit Streambuf(const std::string& data);
~Streambuf();
~Streambuf() override;
protected:
virtual int_type uflow();
virtual int_type underflow();
virtual int_type pbackfail(int_type ch);
virtual std::streamsize showmanyc();
virtual pos_type seekoff(std::streambuf::off_type off,
int_type uflow() override;
int_type underflow() override;
int_type pbackfail(int_type ch) override;
std::streamsize showmanyc() override;
pos_type seekoff(std::streambuf::off_type off,
std::ios_base::seekdir way,
std::ios_base::openmode which =
std::ios::in | std::ios::out);
virtual pos_type seekpos(std::streambuf::pos_type pos,
std::ios::in | std::ios::out) override;
pos_type seekpos(std::streambuf::pos_type pos,
std::ios_base::openmode which =
std::ios::in | std::ios::out);
std::ios::in | std::ios::out) override;
private:
Streambuf(const Streambuf&);
@@ -348,9 +348,7 @@ public:
#endif
{
}
virtual ~ofstream()
{
}
~ofstream() override = default;
};
/**
@@ -371,9 +369,7 @@ public:
#endif
{
}
virtual ~ifstream()
{
}
~ifstream() override = default;
};
} // namespace Base

View File

@@ -50,9 +50,7 @@ TimeInfo::TimeInfo()
* A destructor.
* A more elaborate description of the destructor.
*/
TimeInfo::~TimeInfo()
{
}
TimeInfo::~TimeInfo() = default;
//**************************************************************************

View File

@@ -236,8 +236,7 @@ class ConnectionBlocker {
public:
ConnectionBlocker(Connection& c) : blocker(c) {
}
~ConnectionBlocker() {
}
~ConnectionBlocker() = default;
};
// ----------------------------------------------------------------------------

View File

@@ -139,7 +139,7 @@ class BaseExport Line2d
public:
Vector2d clV1, clV2;
Line2d () {}
Line2d () = default;
inline Line2d (const Line2d &rclLine);
inline Line2d (const Vector2d &rclV1, const Vector2d &rclV2);
@@ -167,9 +167,9 @@ public:
class BaseExport Polygon2d
{
public:
Polygon2d () {}
Polygon2d () = default;
inline Polygon2d (const Polygon2d &rclPoly);
virtual ~Polygon2d () {}
virtual ~Polygon2d () = default;
inline Polygon2d& operator = (const Polygon2d &rclP);

View File

@@ -72,10 +72,7 @@ Translate::Translate()
initialize("This module is the Translate module"); // register with Python
}
Translate::~Translate()
{
}
Translate::~Translate() = default;
Py::Object Translate::translate(const Py::Tuple& args)
{

View File

@@ -40,7 +40,7 @@ class BaseExport Translate : public Py::ExtensionModule<Translate>
{
public:
Translate();
virtual ~Translate();
~Translate() override;
private:
Py::Object translate(const Py::Tuple& args);

View File

@@ -78,9 +78,7 @@ Type::Type(const Type& type)
* A destructor.
* A more elaborate description of the destructor.
*/
Type::~Type()
{
}
Type::~Type() = default;
void *Type::createInstance()
{

View File

@@ -64,7 +64,7 @@ public:
Unit(const Unit&);
explicit Unit(const QString& expr);
/// Destruction
~Unit () {}
~Unit () = default;
/** Operators. */

View File

@@ -52,7 +52,7 @@ enum class UnitSystem {
class UnitsSchema
{
public:
virtual ~UnitsSchema(){}
virtual ~UnitsSchema() = default;
/** Gets called if this schema gets activated.
* Here it's theoretically possible that you can change the static factors
* for certain units (e.g. mi = 1,8km instead of mi=1.6km).

View File

@@ -36,7 +36,7 @@ namespace Base {
class UnitsSchemaCentimeters: public UnitsSchema
{
public:
virtual QString schemaTranslate(const Base::Quantity& quant, double &factor, QString &unitString);
QString schemaTranslate(const Base::Quantity& quant, double &factor, QString &unitString) override;
};
} // namespace Base

View File

@@ -41,7 +41,7 @@ namespace Base {
class UnitsSchemaFemMilliMeterNewton: public UnitsSchema
{
public:
virtual QString schemaTranslate(const Base::Quantity& quant, double &factor, QString &unitString);
QString schemaTranslate(const Base::Quantity& quant, double &factor, QString &unitString) override;
};

View File

@@ -40,7 +40,7 @@ class UnitsSchemaImperial1: public UnitsSchema
public:
//virtual void setSchemaUnits(void);
//virtual void resetSchemaUnits(void);
virtual QString schemaTranslate(const Base::Quantity& quant, double &factor, QString &unitString);
QString schemaTranslate(const Base::Quantity& quant, double &factor, QString &unitString) override;
};
/** The schema class for the imperial unit system
@@ -52,7 +52,7 @@ class UnitsSchemaImperialDecimal: public UnitsSchema
public:
//virtual void setSchemaUnits(void);
//virtual void resetSchemaUnits(void);
virtual QString schemaTranslate(const Base::Quantity& quant, double &factor, QString &unitString);
QString schemaTranslate(const Base::Quantity& quant, double &factor, QString &unitString) override;
};
/** The schema class for the imperial unit system
@@ -64,7 +64,7 @@ class UnitsSchemaImperialBuilding: public UnitsSchema
public:
//virtual void setSchemaUnits(void);
//virtual void resetSchemaUnits(void);
virtual QString schemaTranslate(const Base::Quantity& quant, double &factor, QString &unitString);
QString schemaTranslate(const Base::Quantity& quant, double &factor, QString &unitString) override;
};
/** The schema class for Civil Engineering in the imperial unit system
@@ -76,7 +76,7 @@ class UnitsSchemaImperialCivil: public UnitsSchema
public:
//virtual void setSchemaUnits(void);
//virtual void resetSchemaUnits(void);
virtual QString schemaTranslate(const Base::Quantity& quant, double &factor, QString &unitString);
QString schemaTranslate(const Base::Quantity& quant, double &factor, QString &unitString) override;
};

View File

@@ -39,7 +39,7 @@ namespace Base {
class UnitsSchemaInternal: public UnitsSchema
{
public:
virtual QString schemaTranslate(const Base::Quantity& quant, double &factor, QString &unitString);
QString schemaTranslate(const Base::Quantity& quant, double &factor, QString &unitString) override;
};

View File

@@ -37,7 +37,7 @@ namespace Base {
class UnitsSchemaMKS: public UnitsSchema
{
public:
virtual QString schemaTranslate(const Base::Quantity& quant, double &factor, QString &unitString);
QString schemaTranslate(const Base::Quantity& quant, double &factor, QString &unitString) override;
};

View File

@@ -39,7 +39,7 @@ namespace Base {
class UnitsSchemaMmMin: public UnitsSchema
{
public:
virtual QString schemaTranslate(const Base::Quantity& quant, double &factor, QString &unitString);
QString schemaTranslate(const Base::Quantity& quant, double &factor, QString &unitString) override;
};

View File

@@ -51,9 +51,7 @@ Uuid::Uuid()
* A destructor.
* A more elaborate description of the destructor.
*/
Uuid::~Uuid()
{
}
Uuid::~Uuid() = default;
//**************************************************************************
//**************************************************************************

View File

@@ -78,12 +78,12 @@ class BaseExport ViewProjMatrix : public ViewProjMethod
public:
ViewProjMatrix (const Matrix4D &rclMtx);
Vector3f operator()(const Vector3f &rclPt) const;
Vector3d operator()(const Vector3d &rclPt) const;
Vector3f inverse (const Vector3f &rclPt) const;
Vector3d inverse (const Vector3d &rclPt) const;
Vector3f operator()(const Vector3f &rclPt) const override;
Vector3d operator()(const Vector3d &rclPt) const override;
Vector3f inverse (const Vector3f &rclPt) const override;
Vector3d inverse (const Vector3d &rclPt) const override;
Matrix4D getProjectionMatrix () const;
Matrix4D getProjectionMatrix () const override;
protected:
bool isOrthographic;
@@ -101,12 +101,12 @@ class BaseExport ViewOrthoProjMatrix : public ViewProjMethod
public:
ViewOrthoProjMatrix (const Matrix4D &rclMtx);
Vector3f operator()(const Vector3f &rclPt) const;
Vector3d operator()(const Vector3d &rclPt) const;
Vector3f inverse (const Vector3f &rclPt) const;
Vector3d inverse (const Vector3d &rclPt) const;
Vector3f operator()(const Vector3f &rclPt) const override;
Vector3d operator()(const Vector3d &rclPt) const override;
Vector3f inverse (const Vector3f &rclPt) const override;
Vector3d inverse (const Vector3d &rclPt) const override;
Matrix4D getProjectionMatrix () const;
Matrix4D getProjectionMatrix () const override;
protected:
Matrix4D _clMtx, _clMtxInv;

View File

@@ -53,9 +53,7 @@ Writer::Writer()
indBuf[0] = '\0';
}
Writer::~Writer()
{
}
Writer::~Writer() = default;
void Writer::insertAsciiFile(const char* FileName)
{
@@ -286,9 +284,7 @@ FileWriter::FileWriter(const char* DirName) : DirName(DirName)
{
}
FileWriter::~FileWriter()
{
}
FileWriter::~FileWriter() = default;
void FileWriter::putNextEntry(const char* file)
{

View File

@@ -152,11 +152,11 @@ class BaseExport ZipWriter : public Writer
public:
ZipWriter(const char* FileName);
ZipWriter(std::ostream&);
virtual ~ZipWriter();
~ZipWriter() override;
virtual void writeFiles();
void writeFiles() override;
virtual std::ostream &Stream(){return ZipStream;}
std::ostream &Stream() override{return ZipStream;}
void setComment(const char* str){ZipStream.setComment(str);}
void setLevel(int level){ZipStream.setLevel( level );}
@@ -176,9 +176,9 @@ class BaseExport StringWriter : public Writer
{
public:
virtual std::ostream &Stream(){return StrStream;}
std::ostream &Stream() override{return StrStream;}
std::string getString() const {return StrStream.str();}
virtual void writeFiles(){}
void writeFiles() override{}
private:
std::stringstream StrStream;
@@ -193,12 +193,12 @@ class BaseExport FileWriter : public Writer
{
public:
FileWriter(const char* DirName);
virtual ~FileWriter();
~FileWriter() override;
void putNextEntry(const char* file);
virtual void writeFiles();
void writeFiles() override;
virtual std::ostream &Stream(){return FileStream;}
std::ostream &Stream() override{return FileStream;}
void close() {FileStream.close();}
/*!
This method can be re-implemented in sub-classes to avoid

View File

@@ -198,9 +198,7 @@ inline XUTF8Str::XUTF8Str(const char* const fromTranscode)
str = XMLTools::toXMLString(fromTranscode);
}
inline XUTF8Str::~XUTF8Str()
{
}
inline XUTF8Str::~XUTF8Str() = default;
// -----------------------------------------------------------------------

View File

@@ -62,7 +62,7 @@ class fdoutbuf : public std::streambuf {
}
protected:
// write one character
virtual int_type overflow (int_type c) {
int_type overflow (int_type c) override {
if (c != EOF) {
char z = c;
#ifdef _MSC_VER
@@ -76,9 +76,9 @@ class fdoutbuf : public std::streambuf {
return c;
}
// write multiple characters
virtual
std::streamsize xsputn (const char* s,
std::streamsize num) {
std::streamsize num) override {
#ifdef _MSC_VER
return _write(fd,s,num);
#else
@@ -129,7 +129,7 @@ class fdinbuf : public std::streambuf {
protected:
// insert new characters into the buffer
virtual int_type underflow () {
int_type underflow () override {
#ifndef _MSC_VER
using std::memcpy;
#endif

View File

@@ -71,11 +71,11 @@ public:
int is_open() { return opened; }
gzstreambuf* open( const char* name, int open_mode, int comp);
gzstreambuf* close();
~gzstreambuf() { close(); }
~gzstreambuf() override { close(); }
virtual int overflow( int c = EOF);
virtual int underflow();
virtual int sync();
int overflow( int c = EOF) override;
int underflow() override;
int sync() override;
};
class BaseExport gzstreambase : virtual public std::ios {
@@ -84,7 +84,7 @@ protected:
public:
gzstreambase() { init(&buf); }
gzstreambase( const char* name, int open_mode, int comp);
~gzstreambase();
~gzstreambase() override;
void open( const char* name, int open_mode, int comp);
void close();
gzstreambuf* rdbuf() { return &buf; }