diff --git a/src/internfile/mimehandler.h b/src/internfile/mimehandler.h index dc867aa1..2627ee91 100644 --- a/src/internfile/mimehandler.h +++ b/src/internfile/mimehandler.h @@ -35,11 +35,11 @@ public: } virtual ~RecollFilter() {} - virtual void setConfig(RclConfig *config) { + virtual void setConfig(RclConfig *config) override { m_config = config; } - virtual bool set_property(Properties p, const std::string &v) { + virtual bool set_property(Properties p, const std::string &v) override { switch (p) { case DJF_UDI: m_udi = v; @@ -58,31 +58,26 @@ public: } // We don't use this for now - virtual bool set_document_uri(const std::string& mtype, - const std::string &) { + virtual bool set_document_uri(const std::string& mtype, const std::string &) override { m_mimeType = mtype; return false; } - virtual bool set_document_file(const std::string& mtype, - const std::string &file_path) { + virtual bool set_document_file(const std::string& mtype,const std::string &file_path) override { m_mimeType = mtype; return set_document_file_impl(mtype, file_path); } - virtual bool set_document_string(const std::string& mtype, - const std::string &contents) { + virtual bool set_document_string(const std::string& mtype,const std::string &contents) override{ m_mimeType = mtype; return set_document_string_impl(mtype, contents); } - virtual bool set_document_data(const std::string& mtype, - const char *cp, size_t sz) - { - return set_document_string(mtype, std::string(cp, sz)); - } + virtual bool set_document_data(const std::string& mtype, const char *cp, size_t sz) override { + return set_document_string(mtype, std::string(cp, sz)); + } - virtual void set_docsize(int64_t size) { + virtual void set_docsize(int64_t size) override { m_docsize = size; } @@ -90,24 +85,24 @@ public: return m_docsize; } - virtual bool has_documents() const { + virtual bool has_documents() const override { return m_havedoc; } // Most doc types are single-doc - virtual bool skip_to_document(const std::string& s) { + virtual bool skip_to_document(const std::string& s) override { if (s.empty()) return true; return false; } - virtual bool is_data_input_ok(DataInput input) const { + virtual bool is_data_input_ok(DataInput input) const override { if (input == DOCUMENT_FILE_NAME) return true; return false; } - virtual std::string get_error() const { + virtual std::string get_error() const override { return m_reason; } diff --git a/src/query/docseq.h b/src/query/docseq.h index dd998456..4e64c6d0 100644 --- a/src/query/docseq.h +++ b/src/query/docseq.h @@ -253,21 +253,21 @@ public: DocSource(RclConfig *config, std::shared_ptr iseq) : DocSeqModifier(iseq), m_config(config) {} - virtual bool canFilter() {return true;} - virtual bool canSort() {return true;} - virtual bool setFiltSpec(const DocSeqFiltSpec &); - virtual bool setSortSpec(const DocSeqSortSpec &); - virtual bool getDoc(int num, Rcl::Doc &doc, std::string *sh = 0) { + virtual bool canFilter() override {return true;} + virtual bool canSort() override {return true;} + virtual bool setFiltSpec(const DocSeqFiltSpec &) override; + virtual bool setSortSpec(const DocSeqSortSpec &) override; + virtual bool getDoc(int num, Rcl::Doc &doc, std::string *sh = 0) override { if (!m_seq) return false; return m_seq->getDoc(num, doc, sh); } - virtual int getResCnt() { + virtual int getResCnt() override { if (!m_seq) return 0; return m_seq->getResCnt(); } - virtual std::string title(); + virtual std::string title() override; private: bool buildStack(); void stripStack(); diff --git a/src/query/dynconf.h b/src/query/dynconf.h index fc0c4525..8c92f371 100644 --- a/src/query/dynconf.h +++ b/src/query/dynconf.h @@ -48,7 +48,7 @@ /** Interface for a stored object. */ class DynConfEntry { - public: +public: virtual ~DynConfEntry() {} /** Decode object-as-string coming out from storage */ virtual bool decode(const std::string &value) = 0; @@ -60,23 +60,23 @@ class DynConfEntry { /** Stored object specialization for generic string storage */ class RclSListEntry : public DynConfEntry { - public: +public: RclSListEntry() {} virtual ~RclSListEntry() {} RclSListEntry(const std::string& v) - : value(v) { + : value(v) { } - virtual bool decode(const std::string &enc) { - base64_decode(enc, value); - return true; + virtual bool decode(const std::string &enc) override { + base64_decode(enc, value); + return true; } - virtual bool encode(std::string& enc) { - base64_encode(value, enc); - return true; + virtual bool encode(std::string& enc) override { + base64_encode(value, enc); + return true; } - virtual bool equal(const DynConfEntry& other) { - const RclSListEntry& e = dynamic_cast(other); - return e.value == value; + virtual bool equal(const DynConfEntry& other) override { + const RclSListEntry& e = dynamic_cast(other); + return e.value == value; } std::string value; @@ -84,20 +84,20 @@ class RclSListEntry : public DynConfEntry { /** The dynamic configuration class */ class RclDynConf { - public: +public: RclDynConf(const std::string &fn); bool ro() { - return m_data.getStatus() == ConfSimple::STATUS_RO; + return m_data.getStatus() == ConfSimple::STATUS_RO; } bool rw() { - return m_data.getStatus() == ConfSimple::STATUS_RW; + return m_data.getStatus() == ConfSimple::STATUS_RW; } bool ok() { - return m_data.getStatus() != ConfSimple::STATUS_ERROR; + return m_data.getStatus() != ConfSimple::STATUS_ERROR; } std::string getFilename() { - return m_data.getFilename(); + return m_data.getFilename(); } // Generic methods @@ -125,38 +125,38 @@ class RclDynConf { int maxlen = -1); template