From b6632e0754d6aa10c9c73ea9ec174682ff2a7764 Mon Sep 17 00:00:00 2001 From: Mike Kremer Date: Thu, 12 Mar 2009 07:38:04 +0000 Subject: [PATCH] Added virtual destructor to reader and writer classes in order to avoid compiler warnings. git-svn-id: http://www.openmesh.org/svnrepo/OpenMesh/trunk@84 fdac6126-5c0c-442c-9429-916003d36597 --- Core/IO/reader/BaseReader.hh | 3 +++ Core/IO/reader/OFFReader.hh | 3 +++ Core/IO/reader/STLReader.hh | 3 +++ Core/IO/writer/BaseWriter.hh | 3 +++ Core/IO/writer/OBJWriter.hh | 3 +++ Core/IO/writer/OFFWriter.hh | 2 ++ Core/IO/writer/OMWriter.hh | 5 ++++- Core/IO/writer/PLYWriter.hh | 3 +++ Core/IO/writer/STLWriter.hh | 3 +++ 9 files changed, 27 insertions(+), 1 deletion(-) diff --git a/Core/IO/reader/BaseReader.hh b/Core/IO/reader/BaseReader.hh index 8f385e7b..a0d87ad5 100644 --- a/Core/IO/reader/BaseReader.hh +++ b/Core/IO/reader/BaseReader.hh @@ -69,6 +69,9 @@ class BaseReader { public: + /// Destructor + virtual ~BaseReader() {}; + /// Returns a brief description of the file type that can be parsed. virtual std::string get_description() const = 0; diff --git a/Core/IO/reader/OFFReader.hh b/Core/IO/reader/OFFReader.hh index 072a2dd7..cd9bc6dd 100644 --- a/Core/IO/reader/OFFReader.hh +++ b/Core/IO/reader/OFFReader.hh @@ -101,6 +101,9 @@ public: _OFFReader_(); + /// Destructor + virtual ~_OFFReader_() {}; + std::string get_description() const { return "Object File Format"; } std::string get_extensions() const { return "off"; } std::string get_magic() const { return "OFF"; } diff --git a/Core/IO/reader/STLReader.hh b/Core/IO/reader/STLReader.hh index 6aca8dd0..32e56cd1 100644 --- a/Core/IO/reader/STLReader.hh +++ b/Core/IO/reader/STLReader.hh @@ -74,6 +74,9 @@ public: // constructor _STLReader_(); + /// Destructor + virtual ~_STLReader_() {}; + std::string get_description() const { return "Stereolithography Interface Format"; } diff --git a/Core/IO/writer/BaseWriter.hh b/Core/IO/writer/BaseWriter.hh index 4f45245a..26f7375d 100644 --- a/Core/IO/writer/BaseWriter.hh +++ b/Core/IO/writer/BaseWriter.hh @@ -67,6 +67,9 @@ class BaseWriter public: typedef unsigned int Option; + + /// Destructor + virtual ~BaseWriter() {}; /// Return short description of the supported file format. virtual std::string get_description() const = 0; diff --git a/Core/IO/writer/OBJWriter.hh b/Core/IO/writer/OBJWriter.hh index 491fe076..0540d747 100644 --- a/Core/IO/writer/OBJWriter.hh +++ b/Core/IO/writer/OBJWriter.hh @@ -67,6 +67,9 @@ public: _OBJWriter_(); + /// Destructor + virtual ~_OBJWriter_() {}; + std::string get_description() const { return "Alias/Wavefront"; } std::string get_extensions() const { return "obj"; } diff --git a/Core/IO/writer/OFFWriter.hh b/Core/IO/writer/OFFWriter.hh index fbd0d00c..bc22237e 100644 --- a/Core/IO/writer/OFFWriter.hh +++ b/Core/IO/writer/OFFWriter.hh @@ -79,6 +79,8 @@ public: _OFFWriter_(); + virtual ~_OFFWriter_() {}; + std::string get_description() const { return "no description"; } std::string get_extensions() const { return "off"; } diff --git a/Core/IO/writer/OMWriter.hh b/Core/IO/writer/OMWriter.hh index 78235520..a8deef81 100644 --- a/Core/IO/writer/OMWriter.hh +++ b/Core/IO/writer/OMWriter.hh @@ -74,9 +74,12 @@ class _OMWriter_ : public BaseWriter { public: - // constructor + /// Constructor _OMWriter_(); + /// Destructor + virtual ~_OMWriter_() {}; + std::string get_description() const { return "OpenMesh Format"; } diff --git a/Core/IO/writer/PLYWriter.hh b/Core/IO/writer/PLYWriter.hh index 342bbef2..ec15c825 100644 --- a/Core/IO/writer/PLYWriter.hh +++ b/Core/IO/writer/PLYWriter.hh @@ -73,6 +73,9 @@ public: _PLYWriter_(); + /// Destructor + virtual ~_PLYWriter_() {}; + std::string get_description() const { return "PLY polygon file format"; } std::string get_extensions() const { return "ply"; } diff --git a/Core/IO/writer/STLWriter.hh b/Core/IO/writer/STLWriter.hh index 8b161e0e..dc61af14 100644 --- a/Core/IO/writer/STLWriter.hh +++ b/Core/IO/writer/STLWriter.hh @@ -70,6 +70,9 @@ class _STLWriter_ : public BaseWriter public: _STLWriter_(); + + /// Destructor + virtual ~_STLWriter_() {}; std::string get_description() const { return "Stereolithography Format"; } std::string get_extensions() const { return "stla stlb"; }