Commit bd0901ca authored by Jan Möbius's avatar Jan Möbius

overrides

parent 072919fa
Pipeline #10611 canceled with stage
in 108 minutes and 5 seconds
...@@ -87,16 +87,16 @@ public: ...@@ -87,16 +87,16 @@ public:
virtual ~_OBJReader_() { } virtual ~_OBJReader_() { }
std::string get_description() const { return "Alias/Wavefront"; } std::string get_description() const override { return "Alias/Wavefront"; }
std::string get_extensions() const { return "obj"; } std::string get_extensions() const override { return "obj"; }
bool read(const std::string& _filename, bool read(const std::string& _filename,
BaseImporter& _bi, BaseImporter& _bi,
Options& _opt); Options& _opt) override;
bool read(std::istream& _in, bool read(std::istream& _in,
BaseImporter& _bi, BaseImporter& _bi,
Options& _opt); Options& _opt) override;
private: private:
......
...@@ -118,17 +118,17 @@ public: ...@@ -118,17 +118,17 @@ public:
/// Destructor /// Destructor
virtual ~_OFFReader_() {}; virtual ~_OFFReader_() {};
std::string get_description() const { return "Object File Format"; } std::string get_description() const override { return "Object File Format"; }
std::string get_extensions() const { return "off"; } std::string get_extensions() const override { return "off"; }
std::string get_magic() const { return "OFF"; } std::string get_magic() const override { return "OFF"; }
bool read(const std::string& _filename, bool read(const std::string& _filename,
BaseImporter& _bi, BaseImporter& _bi,
Options& _opt); Options& _opt) override;
bool can_u_read(const std::string& _filename) const; bool can_u_read(const std::string& _filename) const override;
bool read(std::istream& _in, BaseImporter& _bi, Options& _opt ); bool read(std::istream& _in, BaseImporter& _bi, Options& _opt ) override;
private: private:
......
...@@ -89,20 +89,20 @@ public: ...@@ -89,20 +89,20 @@ public:
_OMReader_(); _OMReader_();
virtual ~_OMReader_() { } virtual ~_OMReader_() { }
std::string get_description() const { return "OpenMesh File Format"; } std::string get_description() const override { return "OpenMesh File Format"; }
std::string get_extensions() const { return "om"; } std::string get_extensions() const override { return "om"; }
std::string get_magic() const { return "OM"; } std::string get_magic() const override { return "OM"; }
bool read(const std::string& _filename, bool read(const std::string& _filename,
BaseImporter& _bi, BaseImporter& _bi,
Options& _opt ); Options& _opt ) override;
//! Stream Reader for std::istream input in binary format //! Stream Reader for std::istream input in binary format
bool read(std::istream& _is, bool read(std::istream& _is,
BaseImporter& _bi, BaseImporter& _bi,
Options& _opt ); Options& _opt ) override;
virtual bool can_u_read(const std::string& _filename) const; virtual bool can_u_read(const std::string& _filename) const override;
virtual bool can_u_read(std::istream& _is) const; virtual bool can_u_read(std::istream& _is) const;
......
...@@ -97,19 +97,19 @@ public: ...@@ -97,19 +97,19 @@ public:
_PLYReader_(); _PLYReader_();
std::string get_description() const { return "PLY polygon file format"; } std::string get_description() const override { return "PLY polygon file format"; }
std::string get_extensions() const { return "ply"; } std::string get_extensions() const override { return "ply"; }
std::string get_magic() const { return "PLY"; } std::string get_magic() const override { return "PLY"; }
bool read(const std::string& _filename, bool read(const std::string& _filename,
BaseImporter& _bi, BaseImporter& _bi,
Options& _opt); Options& _opt) override;
bool read(std::istream& _is, bool read(std::istream& _is,
BaseImporter& _bi, BaseImporter& _bi,
Options& _opt); Options& _opt) override;
bool can_u_read(const std::string& _filename) const; bool can_u_read(const std::string& _filename) const override;
enum ValueType { enum ValueType {
Unsupported, Unsupported,
......
...@@ -92,17 +92,17 @@ public: ...@@ -92,17 +92,17 @@ public:
virtual ~_STLReader_() {}; virtual ~_STLReader_() {};
std::string get_description() const std::string get_description() const override
{ return "Stereolithography Interface Format"; } { return "Stereolithography Interface Format"; }
std::string get_extensions() const { return "stl stla stlb"; } std::string get_extensions() const override { return "stl stla stlb"; }
bool read(const std::string& _filename, bool read(const std::string& _filename,
BaseImporter& _bi, BaseImporter& _bi,
Options& _opt); Options& _opt) override;
bool read(std::istream& _in, bool read(std::istream& _in,
BaseImporter& _bi, BaseImporter& _bi,
Options& _opt); Options& _opt) override;
/** Set the threshold to be used for considering two point to be equal. /** Set the threshold to be used for considering two point to be equal.
Can be used to merge small gaps */ Can be used to merge small gaps */
......
...@@ -88,14 +88,14 @@ public: ...@@ -88,14 +88,14 @@ public:
/// Destructor /// Destructor
virtual ~_OBJWriter_() {}; virtual ~_OBJWriter_() {};
std::string get_description() const { return "Alias/Wavefront"; } std::string get_description() const override { return "Alias/Wavefront"; }
std::string get_extensions() const { return "obj"; } std::string get_extensions() const override { return "obj"; }
bool write(const std::string&, BaseExporter&, Options, std::streamsize _precision = 6) const; bool write(const std::string&, BaseExporter&, Options, std::streamsize _precision = 6) const override;
bool write(std::ostream&, BaseExporter&, Options, std::streamsize _precision = 6) const; bool write(std::ostream&, BaseExporter&, Options, std::streamsize _precision = 6) const override;
size_t binary_size(BaseExporter&, Options) const { return 0; } size_t binary_size(BaseExporter&, Options) const override { return 0; }
private: private:
......
...@@ -97,14 +97,14 @@ public: ...@@ -97,14 +97,14 @@ public:
virtual ~_OFFWriter_() {}; virtual ~_OFFWriter_() {};
std::string get_description() const { return "no description"; } std::string get_description() const override { return "no description"; }
std::string get_extensions() const { return "off"; } std::string get_extensions() const override { return "off"; }
bool write(const std::string&, BaseExporter&, Options, std::streamsize _precision = 6) const; bool write(const std::string&, BaseExporter&, Options, std::streamsize _precision = 6) const override;
bool write(std::ostream&, BaseExporter&, Options, std::streamsize _precision = 6) const; bool write(std::ostream&, BaseExporter&, Options, std::streamsize _precision = 6) const override;
size_t binary_size(BaseExporter& _be, Options _opt) const; size_t binary_size(BaseExporter& _be, Options _opt) const override;
protected: protected:
......
...@@ -98,15 +98,15 @@ public: ...@@ -98,15 +98,15 @@ public:
/// Destructor /// Destructor
virtual ~_OMWriter_() {}; virtual ~_OMWriter_() {};
std::string get_description() const std::string get_description() const override
{ return "OpenMesh Format"; } { return "OpenMesh Format"; }
std::string get_extensions() const std::string get_extensions() const override
{ return "om"; } { return "om"; }
bool write(std::ostream&, BaseExporter&, Options, std::streamsize _precision = 6) const; bool write(std::ostream&, BaseExporter&, Options, std::streamsize _precision = 6) const override;
size_t binary_size(BaseExporter& _be, Options _opt) const; size_t binary_size(BaseExporter& _be, Options _opt) const override;
static OMFormat::uint8 get_version() { return version_; } static OMFormat::uint8 get_version() { return version_; }
...@@ -116,7 +116,7 @@ protected: ...@@ -116,7 +116,7 @@ protected:
static const OMFormat::uchar magic_[3]; static const OMFormat::uchar magic_[3];
static const OMFormat::uint8 version_; static const OMFormat::uint8 version_;
bool write(const std::string&, BaseExporter&, Options, std::streamsize _precision = 6) const; bool write(const std::string&, BaseExporter&, Options, std::streamsize _precision = 6) const override;
bool write_binary(std::ostream&, BaseExporter&, Options) const; bool write_binary(std::ostream&, BaseExporter&, Options) const;
......
...@@ -95,14 +95,14 @@ public: ...@@ -95,14 +95,14 @@ public:
/// Destructor /// Destructor
virtual ~_PLYWriter_() {}; virtual ~_PLYWriter_() {};
std::string get_description() const { return "PLY polygon file format"; } std::string get_description() const override { return "PLY polygon file format"; }
std::string get_extensions() const { return "ply"; } std::string get_extensions() const override { return "ply"; }
bool write(const std::string&, BaseExporter&, Options, std::streamsize _precision = 6) const; bool write(const std::string&, BaseExporter&, Options, std::streamsize _precision = 6) const override;
bool write(std::ostream&, BaseExporter&, Options, std::streamsize _precision = 6) const; bool write(std::ostream&, BaseExporter&, Options, std::streamsize _precision = 6) const override;
size_t binary_size(BaseExporter& _be, Options _opt) const; size_t binary_size(BaseExporter& _be, Options _opt) const override;
enum ValueType { enum ValueType {
Unsupported = 0, Unsupported = 0,
......
...@@ -88,14 +88,14 @@ public: ...@@ -88,14 +88,14 @@ public:
/// Destructor /// Destructor
virtual ~_STLWriter_() {}; virtual ~_STLWriter_() {};
std::string get_description() const { return "Stereolithography Format"; } std::string get_description() const override { return "Stereolithography Format"; }
std::string get_extensions() const { return "stl stla stlb"; } std::string get_extensions() const override { return "stl stla stlb"; }
bool write(const std::string&, BaseExporter&, Options, std::streamsize _precision = 6) const; bool write(const std::string&, BaseExporter&, Options, std::streamsize _precision = 6) const override;
bool write(std::ostream&, BaseExporter&, Options, std::streamsize _precision = 6) const; bool write(std::ostream&, BaseExporter&, Options, std::streamsize _precision = 6) const override;
size_t binary_size(BaseExporter&, Options) const; size_t binary_size(BaseExporter&, Options) const override;
private: private:
bool write_stla(const std::string&, BaseExporter&, Options) const; bool write_stla(const std::string&, BaseExporter&, Options) const;
......
...@@ -29,13 +29,13 @@ class OPENMESHDLLEXPORT _VTKWriter_ : public BaseWriter ...@@ -29,13 +29,13 @@ class OPENMESHDLLEXPORT _VTKWriter_ : public BaseWriter
public: public:
_VTKWriter_(); _VTKWriter_();
std::string get_description() const { return "VTK"; } std::string get_description() const override { return "VTK"; }
std::string get_extensions() const { return "vtk"; } std::string get_extensions() const override { return "vtk"; }
bool write(const std::string&, BaseExporter&, Options, std::streamsize _precision = 6) const; bool write(const std::string&, BaseExporter&, Options, std::streamsize _precision = 6) const override;
bool write(std::ostream&, BaseExporter&, Options, std::streamsize _precision = 6) const; bool write(std::ostream&, BaseExporter&, Options, std::streamsize _precision = 6) const override;
size_t binary_size(BaseExporter&, Options) const { return 0; } size_t binary_size(BaseExporter&, Options) const override { return 0; }
}; };
//== TYPE DEFINITION ========================================================== //== TYPE DEFINITION ==========================================================
......
...@@ -109,22 +109,22 @@ public: ...@@ -109,22 +109,22 @@ public:
public: // inherited from BaseProperty public: // inherited from BaseProperty
virtual void reserve(size_t _n) { data_.reserve(_n); } virtual void reserve(size_t _n) override { data_.reserve(_n); }
virtual void resize(size_t _n) { data_.resize(_n); } virtual void resize(size_t _n) override { data_.resize(_n); }
virtual void clear() { data_.clear(); vector_type().swap(data_); } virtual void clear() override { data_.clear(); vector_type().swap(data_); }
virtual void push_back() { data_.push_back(T()); } virtual void push_back() override { data_.push_back(T()); }
virtual void swap(size_t _i0, size_t _i1) virtual void swap(size_t _i0, size_t _i1) override
{ std::swap(data_[_i0], data_[_i1]); } { std::swap(data_[_i0], data_[_i1]); }
virtual void copy(size_t _i0, size_t _i1) virtual void copy(size_t _i0, size_t _i1) override
{ data_[_i1] = data_[_i0]; } { data_[_i1] = data_[_i0]; }
public: public:
virtual void set_persistent( bool _yn ) virtual void set_persistent( bool _yn ) override
{ check_and_set_persistent<T>( _yn ); } { check_and_set_persistent<T>( _yn ); }
virtual size_t n_elements() const { return data_.size(); } virtual size_t n_elements() const override { return data_.size(); }
virtual size_t element_size() const { return IO::size_of<T>(); } virtual size_t element_size() const override { return IO::size_of<T>(); }
#ifndef DOXY_IGNORE_THIS #ifndef DOXY_IGNORE_THIS
struct plus { struct plus {
...@@ -133,17 +133,17 @@ public: ...@@ -133,17 +133,17 @@ public:
}; };
#endif #endif
virtual size_t size_of(void) const virtual size_t size_of(void) const override
{ {
if (element_size() != IO::UnknownSize) if (element_size() != IO::UnknownSize)
return this->BaseProperty::size_of(n_elements()); return this->BaseProperty::size_of(n_elements());
return std::accumulate(data_.begin(), data_.end(), size_t(0), plus()); return std::accumulate(data_.begin(), data_.end(), size_t(0), plus());
} }
virtual size_t size_of(size_t _n_elem) const virtual size_t size_of(size_t _n_elem) const override
{ return this->BaseProperty::size_of(_n_elem); } { return this->BaseProperty::size_of(_n_elem); }
virtual size_t store( std::ostream& _ostr, bool _swap ) const virtual size_t store( std::ostream& _ostr, bool _swap ) const override
{ {
if ( IO::is_streamable<vector_type>() ) if ( IO::is_streamable<vector_type>() )
return IO::store(_ostr, data_, _swap ); return IO::store(_ostr, data_, _swap );
...@@ -153,7 +153,7 @@ public: ...@@ -153,7 +153,7 @@ public:
return bytes; return bytes;
} }
virtual size_t restore( std::istream& _istr, bool _swap ) virtual size_t restore( std::istream& _istr, bool _swap ) override
{ {
if ( IO::is_streamable<vector_type>() ) if ( IO::is_streamable<vector_type>() )
return IO::restore(_istr, data_, _swap ); return IO::restore(_istr, data_, _swap );
...@@ -199,7 +199,7 @@ public: // data access interface ...@@ -199,7 +199,7 @@ public: // data access interface
} }
/// Make a copy of self. /// Make a copy of self.
PropertyT<T>* clone() const PropertyT<T>* clone() const override
{ {
PropertyT<T>* p = new PropertyT<T>( *this ); PropertyT<T>* p = new PropertyT<T>( *this );
return p; return p;
...@@ -236,31 +236,31 @@ public: ...@@ -236,31 +236,31 @@ public:
public: // inherited from BaseProperty public: // inherited from BaseProperty
virtual void reserve(size_t _n) { data_.reserve(_n); } virtual void reserve(size_t _n) override { data_.reserve(_n); }
virtual void resize(size_t _n) { data_.resize(_n); } virtual void resize(size_t _n) override { data_.resize(_n); }
virtual void clear() { data_.clear(); vector_type().swap(data_); } virtual void clear() override { data_.clear(); vector_type().swap(data_); }
virtual void push_back() { data_.push_back(bool()); } virtual void push_back() override { data_.push_back(bool()); }
virtual void swap(size_t _i0, size_t _i1) virtual void swap(size_t _i0, size_t _i1) override
{ bool t(data_[_i0]); data_[_i0]=data_[_i1]; data_[_i1]=t; } { bool t(data_[_i0]); data_[_i0]=data_[_i1]; data_[_i1]=t; }
virtual void copy(size_t _i0, size_t _i1) virtual void copy(size_t _i0, size_t _i1) override
{ data_[_i1] = data_[_i0]; } { data_[_i1] = data_[_i0]; }
public: public:
virtual void set_persistent( bool _yn ) virtual void set_persistent( bool _yn ) override
{ {
check_and_set_persistent<bool>( _yn ); check_and_set_persistent<bool>( _yn );
} }
virtual size_t n_elements() const { return data_.size(); } virtual size_t n_elements() const override { return data_.size(); }
virtual size_t element_size() const { return UnknownSize; } virtual size_t element_size() const override { return UnknownSize; }
virtual size_t size_of() const { return size_of( n_elements() ); } virtual size_t size_of() const override { return size_of( n_elements() ); }
virtual size_t size_of(size_t _n_elem) const virtual size_t size_of(size_t _n_elem) const override
{ {
return _n_elem / 8 + ((_n_elem % 8)!=0); return _n_elem / 8 + ((_n_elem % 8)!=0);
} }
size_t store( std::ostream& _ostr, bool /* _swap */ ) const size_t store( std::ostream& _ostr, bool /* _swap */ ) const override
{ {
size_t bytes = 0; size_t bytes = 0;
...@@ -299,7 +299,7 @@ public: ...@@ -299,7 +299,7 @@ public:
return bytes; return bytes;
} }
size_t restore( std::istream& _istr, bool /* _swap */ ) size_t restore( std::istream& _istr, bool /* _swap */ ) override
{ {
size_t bytes = 0; size_t bytes = 0;
...@@ -400,34 +400,34 @@ public: ...@@ -400,34 +400,34 @@ public:
public: // inherited from BaseProperty public: // inherited from BaseProperty
virtual void reserve(size_t _n) { data_.reserve(_n); } virtual void reserve(size_t _n) override { data_.reserve(_n); }
virtual void resize(size_t _n) { data_.resize(_n); } virtual void resize(size_t _n) override { data_.resize(_n); }
virtual void clear() { data_.clear(); vector_type().swap(data_); } virtual void clear() override { data_.clear(); vector_type().swap(data_); }
virtual void push_back() { data_.push_back(std::string()); } virtual void push_back() override { data_.push_back(std::string()); }
virtual void swap(size_t _i0, size_t _i1) { virtual void swap(size_t _i0, size_t _i1) override {
std::swap(data_[_i0], data_[_i1]); std::swap(data_[_i0], data_[_i1]);
} }
virtual void copy(size_t _i0, size_t _i1) virtual void copy(size_t _i0, size_t _i1) override
{ data_[_i1] = data_[_i0]; } { data_[_i1] = data_[_i0]; }
public: public:
virtual void set_persistent( bool _yn ) virtual void set_persistent( bool _yn ) override
{ check_and_set_persistent<std::string>( _yn ); } { check_and_set_persistent<std::string>( _yn ); }
virtual size_t n_elements() const { return data_.size(); } virtual size_t n_elements() const override { return data_.size(); }
virtual size_t element_size() const { return UnknownSize; } virtual size_t element_size() const override { return UnknownSize; }
virtual size_t size_of() const virtual size_t size_of() const override
{ return IO::size_of( data_ ); } { return IO::size_of( data_ ); }
virtual size_t size_of(size_t /* _n_elem */) const virtual size_t size_of(size_t /* _n_elem */) const override
{ return UnknownSize; } { return UnknownSize; }
/// Store self as one binary block. Max. length of a string is 65535 bytes. /// Store self as one binary block. Max. length of a string is 65535 bytes.
size_t store( std::ostream& _ostr, bool _swap ) const size_t store( std::ostream& _ostr, bool _swap ) const override
{ return IO::store( _ostr, data_, _swap ); } { return IO::store( _ostr, data_, _swap ); }
size_t restore( std::istream& _istr, bool _swap ) size_t restore( std::istream& _istr, bool _swap ) override
{ return IO::restore( _istr, data_, _swap ); } { return IO::restore( _istr, data_, _swap ); }
public: public:
......
...@@ -100,11 +100,11 @@ public: ...@@ -100,11 +100,11 @@ public:
TimerImplWin32(void); TimerImplWin32(void);
~TimerImplWin32(void) { ; } ~TimerImplWin32(void) { ; }
virtual void reset(void); virtual void reset(void) override;
virtual void start(void); virtual void start(void) override;
virtual void stop(void); virtual void stop(void) override;
virtual void cont(void); virtual void cont(void) override;
virtual double seconds(void) const; virtual double seconds(void) const override;
}; };
TimerImplWin32::TimerImplWin32(void) TimerImplWin32::TimerImplWin32(void)
...@@ -198,10 +198,10 @@ public: ...@@ -198,10 +198,10 @@ public:
~TimerImplGToD() ~TimerImplGToD()
{ } { }
virtual void reset(void) { seconds_ = 0.0; } virtual void reset(void) override { seconds_ = 0.0; }
virtual void start(void) { seconds_ = 0.0; gettimeofday( &start_, &tz_ ); } virtual void start(void) override { seconds_ = 0.0; gettimeofday( &start_, &tz_ ); }
virtual void stop(void) virtual void stop(void) override
{ {
gettimeofday( &stop_, &tz_ ); gettimeofday( &stop_, &tz_ );
...@@ -209,9 +209,9 @@ public: ...@@ -209,9 +209,9 @@ public:
seconds_ += (double)(stop_.tv_usec- start_.tv_usec)*1e-6; seconds_ += (double)(stop_.tv_usec- start_.tv_usec)*1e-6;
} }
virtual void cont(void) { gettimeofday( &start_, &tz_); } virtual void cont(void) override { gettimeofday( &start_, &tz_); }
virtual double seconds() const { return seconds_; } virtual double seconds() const override { return seconds_; }
private: private:
...@@ -234,11 +234,11 @@ public: ...@@ -234,11 +234,11 @@ public:
TimerImplStd() : freq_(clockticks),count_(0),start_(0) { reset(); } TimerImplStd() : freq_(clockticks),count_(0),start_(0) { reset(); }
~TimerImplStd() { ; } ~TimerImplStd() { ; }
virtual void reset(void) { count_ = 0; } virtual void reset(void) override { count_ = 0; }
virtual void start(void) { count_ = 0; start_ = clock(); } virtual void start(void) override { count_ = 0; start_ = clock(); }
virtual void stop(void); virtual void stop(void) override;
virtual void cont(void) { start_ = clock(); } virtual void cont(void) override { start_ = clock(); }
virtual double seconds(void) const { return (double)count_/(double)freq_; } virtual double seconds(void) const override { return (double)count_/(double)freq_; }
protected: protected:
unsigned long freq_; unsigned long freq_;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment