Engauge Digitizer  2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | List of all members
DocumentHashGenerator Class Reference

Generates a DocumentHash value representing the state of the entire Document. More...

#include <DocumentHashGenerator.h>

Collaboration diagram for DocumentHashGenerator:
Collaboration graph

Public Member Functions

 DocumentHashGenerator ()
 Single constructor. More...
 
DocumentHash generate (const Document &document) const
 Generate the hash for external storage. More...
 

Detailed Description

Generates a DocumentHash value representing the state of the entire Document.

Definition at line 15 of file DocumentHashGenerator.h.

Constructor & Destructor Documentation

DocumentHashGenerator::DocumentHashGenerator ( )

Single constructor.

Definition at line 12 of file DocumentHashGenerator.cpp.

13 {
14 }

Member Function Documentation

DocumentHash DocumentHashGenerator::generate ( const Document document) const

Generate the hash for external storage.

Definition at line 16 of file DocumentHashGenerator.cpp.

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 }
DocumentAxesPointsRequired documentAxesPointsRequired() const
Get method for DocumentAxesPointsRequired.
Definition: Document.cpp:363
CallbackSearchReturn callback(const QString &curveName, const Point &point)
Callback method.
void iterateThroughCurvePointsAxes(const Functor2wRet< const QString &, const Point &, CallbackSearchReturn > &ftorWithCallback)
See Curve::iterateThroughCurvePoints, for the axes curve.
Definition: Document.cpp:449
Callback for DocumentHash value for a Document.
#define LOG4CPP_INFO_S(logger)
Definition: convenience.h:18
log4cpp::Category * mainCat
Definition: Logger.cpp:14
void iterateThroughCurvesPointsGraphs(const Functor2wRet< const QString &, const Point &, CallbackSearchReturn > &ftorWithCallback)
See Curve::iterateThroughCurvePoints, for all the graphs curves.
Definition: Document.cpp:472

The documentation for this class was generated from the following files: