Elements  5.8
A C++ base framework for the Euclid Software.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
ElementsServices::DataSync::DataSynchronizer Class Referenceabstract

Base class to synchronize test data. More...

#include <DataSynchronizer.h>

Inheritance diagram for ElementsServices::DataSync::DataSynchronizer:
[legend]
Collaboration diagram for ElementsServices::DataSync::DataSynchronizer:
[legend]

Public Member Functions

virtual ~DataSynchronizer ()=default
 
 DataSynchronizer (const ConnectionConfiguration &connection, const DependencyConfiguration &dependency)
 
void downloadAllFiles () const
 

Protected Member Functions

bool fileShouldBeWritten (path localFile) const
 
bool fileAlreadyExists (path localFile) const
 
void downloadOneFile (path distantFile, path localFile) const
 
bool hasBeenDownloaded (path distantFile, path localFile) const
 
virtual std::string createDownloadCommand (path distantFile, path localFile) const =0
 

Protected Attributes

ConnectionConfiguration m_connection
 
std::map< path, pathm_fileMap
 

Detailed Description

Base class to synchronize test data.

Child classes should provide their synchronization command line.

Definition at line 58 of file DataSynchronizer.h.

Constructor & Destructor Documentation

virtual ElementsServices::DataSync::DataSynchronizer::~DataSynchronizer ( )
virtualdefault
ElementsServices::DataSync::DataSynchronizer::DataSynchronizer ( const ConnectionConfiguration connection,
const DependencyConfiguration dependency 
)

Definition at line 28 of file DataSynchronizer.cpp.

Member Function Documentation

virtual std::string ElementsServices::DataSync::DataSynchronizer::createDownloadCommand ( path  distantFile,
path  localFile 
) const
protectedpure virtual
void ElementsServices::DataSync::DataSynchronizer::downloadAllFiles ( ) const

Definition at line 34 of file DataSynchronizer.cpp.

References downloadOneFile(), fileShouldBeWritten(), and m_fileMap.

Here is the call graph for this function:

void ElementsServices::DataSync::DataSynchronizer::downloadOneFile ( path  distantFile,
path  localFile 
) const
protected

Definition at line 55 of file DataSynchronizer.cpp.

References createDownloadCommand(), ElementsServices::DataSync::createLocalDirOf(), hasBeenDownloaded(), and ElementsServices::DataSync::runCommandAndCaptureOutErr().

Referenced by downloadAllFiles().

Here is the call graph for this function:

bool ElementsServices::DataSync::DataSynchronizer::fileAlreadyExists ( path  localFile) const
protected

Definition at line 51 of file DataSynchronizer.cpp.

Referenced by fileShouldBeWritten().

bool ElementsServices::DataSync::DataSynchronizer::fileShouldBeWritten ( path  localFile) const
protected

Definition at line 44 of file DataSynchronizer.cpp.

References fileAlreadyExists(), m_connection, and ElementsServices::DataSync::ConnectionConfiguration::overwritingAllowed().

Referenced by downloadAllFiles().

Here is the call graph for this function:

bool ElementsServices::DataSync::DataSynchronizer::hasBeenDownloaded ( path  distantFile,
path  localFile 
) const
protected

Definition at line 66 of file DataSynchronizer.cpp.

Referenced by downloadOneFile().

Member Data Documentation

ConnectionConfiguration ElementsServices::DataSync::DataSynchronizer::m_connection
protected
std::map<path, path> ElementsServices::DataSync::DataSynchronizer::m_fileMap
protected

Definition at line 91 of file DataSynchronizer.h.

Referenced by downloadAllFiles().


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