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
This commit is contained in:
Mike Kremer
2009-03-12 07:38:04 +00:00
parent 3996aade01
commit b6632e0754
9 changed files with 27 additions and 1 deletions

View File

@@ -69,6 +69,9 @@ class BaseReader
{ {
public: public:
/// Destructor
virtual ~BaseReader() {};
/// Returns a brief description of the file type that can be parsed. /// Returns a brief description of the file type that can be parsed.
virtual std::string get_description() const = 0; virtual std::string get_description() const = 0;

View File

@@ -101,6 +101,9 @@ public:
_OFFReader_(); _OFFReader_();
/// Destructor
virtual ~_OFFReader_() {};
std::string get_description() const { return "Object File Format"; } std::string get_description() const { return "Object File Format"; }
std::string get_extensions() const { return "off"; } std::string get_extensions() const { return "off"; }
std::string get_magic() const { return "OFF"; } std::string get_magic() const { return "OFF"; }

View File

@@ -74,6 +74,9 @@ public:
// constructor // constructor
_STLReader_(); _STLReader_();
/// Destructor
virtual ~_STLReader_() {};
std::string get_description() const std::string get_description() const
{ return "Stereolithography Interface Format"; } { return "Stereolithography Interface Format"; }

View File

@@ -68,6 +68,9 @@ public:
typedef unsigned int Option; typedef unsigned int Option;
/// Destructor
virtual ~BaseWriter() {};
/// Return short description of the supported file format. /// Return short description of the supported file format.
virtual std::string get_description() const = 0; virtual std::string get_description() const = 0;

View File

@@ -67,6 +67,9 @@ public:
_OBJWriter_(); _OBJWriter_();
/// Destructor
virtual ~_OBJWriter_() {};
std::string get_description() const { return "Alias/Wavefront"; } std::string get_description() const { return "Alias/Wavefront"; }
std::string get_extensions() const { return "obj"; } std::string get_extensions() const { return "obj"; }

View File

@@ -79,6 +79,8 @@ public:
_OFFWriter_(); _OFFWriter_();
virtual ~_OFFWriter_() {};
std::string get_description() const { return "no description"; } std::string get_description() const { return "no description"; }
std::string get_extensions() const { return "off"; } std::string get_extensions() const { return "off"; }

View File

@@ -74,9 +74,12 @@ class _OMWriter_ : public BaseWriter
{ {
public: public:
// constructor /// Constructor
_OMWriter_(); _OMWriter_();
/// Destructor
virtual ~_OMWriter_() {};
std::string get_description() const std::string get_description() const
{ return "OpenMesh Format"; } { return "OpenMesh Format"; }

View File

@@ -73,6 +73,9 @@ public:
_PLYWriter_(); _PLYWriter_();
/// Destructor
virtual ~_PLYWriter_() {};
std::string get_description() const { return "PLY polygon file format"; } std::string get_description() const { return "PLY polygon file format"; }
std::string get_extensions() const { return "ply"; } std::string get_extensions() const { return "ply"; }

View File

@@ -71,6 +71,9 @@ public:
_STLWriter_(); _STLWriter_();
/// Destructor
virtual ~_STLWriter_() {};
std::string get_description() const { return "Stereolithography Format"; } std::string get_description() const { return "Stereolithography Format"; }
std::string get_extensions() const { return "stla stlb"; } std::string get_extensions() const { return "stla stlb"; }