Engauge Digitizer  2
DocumentHashGenerator.cpp
Go to the documentation of this file.
1 /******************************************************************************************************
2  * (C) 2014 markummitchell@github.com. This file is part of Engauge Digitizer, which is released *
3  * under GNU General Public License version 2 (GPLv2) or (at your option) any later version. See file *
4  * LICENSE or go to gnu.org/licenses for details. Distribution requires prior written permission. *
5  ******************************************************************************************************/
6 
7 #include "CallbackDocumentHash.h"
8 #include "Document.h"
10 #include "Logger.h"
11 
13 {
14 }
15 
17 {
18  // LOG4CPP_INFO_S is below
19 
20  // Get hash by letting functor iterate through Document
22 
23  Functor2wRet<const QString &, const Point &, CallbackSearchReturn> ftorWithCallback = functor_ret (ftor,
25 
26  document.iterateThroughCurvePointsAxes (ftorWithCallback);
27  document.iterateThroughCurvesPointsGraphs (ftorWithCallback);
28 
29  LOG4CPP_INFO_S ((*mainCat)) << "DocumentHashGenerator::generator result=" << ftor.hash().data ();
30 
31  return ftor.hash ();
32 }
Document::documentAxesPointsRequired
DocumentAxesPointsRequired documentAxesPointsRequired() const
Get method for DocumentAxesPointsRequired.
Definition: Document.cpp:363
DocumentHashGenerator.h
CallbackDocumentHash.h
Document::iterateThroughCurvePointsAxes
void iterateThroughCurvePointsAxes(const Functor2wRet< const QString &, const Point &, CallbackSearchReturn > &ftorWithCallback)
See Curve::iterateThroughCurvePoints, for the axes curve.
Definition: Document.cpp:449
Document
Storage of one imported image and the data attached to that image.
Definition: Document.h:40
Document.h
DocumentHashGenerator::generate
DocumentHash generate(const Document &document) const
Generate the hash for external storage.
Definition: DocumentHashGenerator.cpp:16
DocumentHashGenerator::DocumentHashGenerator
DocumentHashGenerator()
Single constructor.
Definition: DocumentHashGenerator.cpp:12
DocumentHash
QByteArray DocumentHash
Definition: DocumentHash.h:11
Logger.h
LOG4CPP_INFO_S
#define LOG4CPP_INFO_S(logger)
Definition: convenience.h:18
mainCat
log4cpp::Category * mainCat
Definition: Logger.cpp:14
Document::iterateThroughCurvesPointsGraphs
void iterateThroughCurvesPointsGraphs(const Functor2wRet< const QString &, const Point &, CallbackSearchReturn > &ftorWithCallback)
See Curve::iterateThroughCurvePoints, for all the graphs curves.
Definition: Document.cpp:472
CallbackDocumentHash::callback
CallbackSearchReturn callback(const QString &curveName, const Point &point)
Callback method.
Definition: CallbackDocumentHash.cpp:25
CallbackDocumentHash
Callback for DocumentHash value for a Document.
Definition: CallbackDocumentHash.h:18