Probably null change: make sure that all classes with destructors also have copy constructors and assignment operators
This commit is contained in:
@@ -61,8 +61,7 @@ public:
|
||||
EXEDocFetcher::EXEDocFetcher(const EXEDocFetcher::Internal& _m)
|
||||
{
|
||||
m = new Internal(_m);
|
||||
LOGDEB("EXEDocFetcher::EXEDocFetcher: fetch is " <<
|
||||
stringsToString(m->sfetch) << "\n");
|
||||
LOGDEB("EXEDocFetcher::EXEDocFetcher: fetch is " << stringsToString(m->sfetch) << "\n");
|
||||
}
|
||||
|
||||
bool EXEDocFetcher::fetch(RclConfig*, const Rcl::Doc& idoc, RawDoc& out)
|
||||
@@ -77,8 +76,7 @@ bool EXEDocFetcher::makesig(RclConfig*, const Rcl::Doc& idoc, string& sig)
|
||||
}
|
||||
|
||||
// Lookup bckid in the config and create an appropriate fetcher.
|
||||
std::unique_ptr<EXEDocFetcher> exeDocFetcherMake(RclConfig *config,
|
||||
const string& bckid)
|
||||
std::unique_ptr<EXEDocFetcher> exeDocFetcherMake(RclConfig *config, const string& bckid)
|
||||
{
|
||||
// The config we only read once, not gonna change.
|
||||
static ConfSimple *bconf;
|
||||
|
||||
@@ -40,6 +40,8 @@ public:
|
||||
class Internal;
|
||||
EXEDocFetcher(const Internal&);
|
||||
virtual ~EXEDocFetcher() {}
|
||||
EXEDocFetcher(const EXEDocFetcher&) = delete;
|
||||
EXEDocFetcher& operator=(const EXEDocFetcher&) = delete;
|
||||
|
||||
virtual bool fetch(RclConfig* cnf, const Rcl::Doc& idoc, RawDoc& out);
|
||||
/** Calls stat to retrieve file signature data */
|
||||
@@ -51,7 +53,6 @@ private:
|
||||
};
|
||||
|
||||
// Lookup bckid in the config and create an appropriate fetcher.
|
||||
std::unique_ptr<EXEDocFetcher> exeDocFetcherMake(RclConfig *config,
|
||||
const std::string& bckid);
|
||||
std::unique_ptr<EXEDocFetcher> exeDocFetcherMake(RclConfig *config, const std::string& bckid);
|
||||
|
||||
#endif /* _EXEFETCHER_H_INCLUDED_ */
|
||||
|
||||
+6
-6
@@ -72,18 +72,18 @@ public:
|
||||
* @param idoc the data gathered from the index for this doc (udi/ipath)
|
||||
* @param sig output.
|
||||
*/
|
||||
virtual bool makesig(RclConfig* cnf, const Rcl::Doc& idoc,
|
||||
std::string& sig) = 0;
|
||||
virtual bool makesig(RclConfig* cnf, const Rcl::Doc& idoc, std::string& sig) = 0;
|
||||
enum Reason{FetchOk, FetchNotExist, FetchNoPerm, FetchOther};
|
||||
virtual Reason testAccess(RclConfig*, const Rcl::Doc&) {
|
||||
return FetchOther;
|
||||
}
|
||||
DocFetcher() {}
|
||||
virtual ~DocFetcher() {}
|
||||
DocFetcher(const DocFetcher&) = delete;
|
||||
DocFetcher& operator=(const DocFetcher&) = delete;
|
||||
};
|
||||
|
||||
/** Return an appropriate fetcher object given the backend string
|
||||
* identifier inside idoc*/
|
||||
std::unique_ptr<DocFetcher> docFetcherMake(RclConfig *config,
|
||||
const Rcl::Doc& idoc);
|
||||
/** Return an appropriate fetcher object given the backend string identifier inside idoc*/
|
||||
std::unique_ptr<DocFetcher> docFetcherMake(RclConfig *config, const Rcl::Doc& idoc);
|
||||
|
||||
#endif /* _FETCHER_H_INCLUDED_ */
|
||||
|
||||
@@ -23,14 +23,18 @@
|
||||
/**
|
||||
* The file-system fetcher:
|
||||
*/
|
||||
class FSDocFetcher : public DocFetcher{
|
||||
class FSDocFetcher : public DocFetcher {
|
||||
public:
|
||||
/** FSDocFetcher::fetch always returns a file name */
|
||||
virtual bool fetch(RclConfig* cnf, const Rcl::Doc& idoc, RawDoc& out);
|
||||
|
||||
/** Calls stat to retrieve file signature data */
|
||||
virtual bool makesig(RclConfig* cnf,const Rcl::Doc& idoc, std::string& sig);
|
||||
virtual DocFetcher::Reason testAccess(RclConfig* cnf, const Rcl::Doc& idoc);
|
||||
FSDocFetcher() {}
|
||||
virtual ~FSDocFetcher() {}
|
||||
FSDocFetcher(const FSDocFetcher&) = delete;
|
||||
FSDocFetcher& operator=(const FSDocFetcher&) = delete;
|
||||
};
|
||||
|
||||
extern void fsmakesig(const struct PathStat *stp, std::string& out);
|
||||
|
||||
@@ -55,6 +55,8 @@ public:
|
||||
*/
|
||||
FsIndexer(RclConfig *cnf, Rcl::Db *db);
|
||||
virtual ~FsIndexer();
|
||||
FsIndexer(const FsIndexer&) = delete;
|
||||
FsIndexer& operator=(const FsIndexer&) = delete;
|
||||
|
||||
/**
|
||||
* Top level file system tree index method for updating a given database.
|
||||
|
||||
@@ -57,6 +57,8 @@ class DbIxStatusUpdater {
|
||||
public:
|
||||
DbIxStatusUpdater(const RclConfig *config, bool nox11monitor);
|
||||
virtual ~DbIxStatusUpdater(){}
|
||||
DbIxStatusUpdater(const DbIxStatusUpdater&) = delete;
|
||||
DbIxStatusUpdater& operator=(const DbIxStatusUpdater&) = delete;
|
||||
|
||||
enum Incr {IncrNone, IncrDocsDone = 0x1, IncrFilesDone = 0x2, IncrFileErrors = 0x4};
|
||||
// Change phase/fn and update
|
||||
|
||||
@@ -41,6 +41,8 @@ public:
|
||||
enum runStatus {IndexerOk, IndexerError};
|
||||
ConfIndexer(RclConfig *cnf);
|
||||
virtual ~ConfIndexer();
|
||||
ConfIndexer(const ConfIndexer&) = delete;
|
||||
ConfIndexer& operator=(const ConfIndexer&) = delete;
|
||||
|
||||
// Indexer types. Maybe we'll have something more dynamic one day
|
||||
enum ixType {IxTNone, IxTFs=1, IxTWebQueue=2,
|
||||
|
||||
@@ -79,6 +79,8 @@ class RclMonEventQueue {
|
||||
public:
|
||||
RclMonEventQueue();
|
||||
~RclMonEventQueue();
|
||||
RclMonEventQueue(const RclMonEventQueue&) = delete;
|
||||
RclMonEventQueue& operator=(const RclMonEventQueue&) = delete;
|
||||
/** Wait for event or timeout. Returns with the queue locked */
|
||||
std::unique_lock<std::mutex> wait(int secs = -1, bool *timedout = 0);
|
||||
/** Add event. */
|
||||
|
||||
@@ -41,6 +41,8 @@ class WebQueueIndexer : public FsTreeWalkerCB {
|
||||
public:
|
||||
WebQueueIndexer(RclConfig *cnf, Rcl::Db *db);
|
||||
~WebQueueIndexer();
|
||||
WebQueueIndexer(const WebQueueIndexer&) = delete;
|
||||
WebQueueIndexer& operator=(const WebQueueIndexer&) = delete;
|
||||
|
||||
/** This is called by the top indexer in recollindex.
|
||||
* Does the walking and the talking */
|
||||
|
||||
@@ -22,11 +22,14 @@
|
||||
/**
|
||||
* The WEB queue cache fetcher:
|
||||
*/
|
||||
class WQDocFetcher : public DocFetcher{
|
||||
class WQDocFetcher : public DocFetcher {
|
||||
public:
|
||||
virtual bool fetch(RclConfig* cnf, const Rcl::Doc& idoc, RawDoc& out);
|
||||
virtual bool makesig(RclConfig* cnf, const Rcl::Doc& idoc,
|
||||
std::string& sig);
|
||||
virtual bool makesig(RclConfig* cnf, const Rcl::Doc& idoc, std::string& sig);
|
||||
WQDocFetcher() {}
|
||||
virtual ~WQDocFetcher() {}
|
||||
WQDocFetcher(const WQDocFetcher&) = delete;
|
||||
WQDocFetcher& operator=(const WQDocFetcher&) = delete;
|
||||
};
|
||||
|
||||
#endif /* _WEBQUEUEFETCHER_H_INCLUDED_ */
|
||||
|
||||
Reference in New Issue
Block a user