Elements 6.3.3
A C++ base framework for the Euclid Software.
Loading...
Searching...
No Matches
Elements::Services::DataSync::DataSynchronizer Class Referenceabstract

Base class to synchronize test data. More...

#include <DataSynchronizer.h>

Inheritance diagram for Elements::Services::DataSync::DataSynchronizer:
Collaboration diagram for Elements::Services::DataSync::DataSynchronizer:

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 61 of file DataSynchronizer.h.

Constructor & Destructor Documentation

◆ ~DataSynchronizer()

virtual Elements::Services::DataSync::DataSynchronizer::~DataSynchronizer ( )
virtualdefault

◆ DataSynchronizer()

Elements::Services::DataSync::DataSynchronizer::DataSynchronizer ( const ConnectionConfiguration & connection,
const DependencyConfiguration & dependency )

Member Function Documentation

◆ createDownloadCommand()

virtual std::string Elements::Services::DataSync::DataSynchronizer::createDownloadCommand ( path distantFile,
path localFile ) const
protectedpure virtual

◆ downloadAllFiles()

void Elements::Services::DataSync::DataSynchronizer::downloadAllFiles ( ) const

Definition at line 40 of file DataSynchronizer.cpp.

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

Referenced by ~DataSynchronizer().

Here is the call graph for this function:

◆ downloadOneFile()

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

◆ fileAlreadyExists()

bool Elements::Services::DataSync::DataSynchronizer::fileAlreadyExists ( path localFile) const
protected

Definition at line 57 of file DataSynchronizer.cpp.

Referenced by fileShouldBeWritten(), and ~DataSynchronizer().

◆ fileShouldBeWritten()

bool Elements::Services::DataSync::DataSynchronizer::fileShouldBeWritten ( path localFile) const
protected

Definition at line 50 of file DataSynchronizer.cpp.

References fileAlreadyExists(), and m_connection.

Referenced by downloadAllFiles(), and ~DataSynchronizer().

Here is the call graph for this function:

◆ hasBeenDownloaded()

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

Definition at line 70 of file DataSynchronizer.cpp.

References ELEMENTS_UNUSED.

Referenced by downloadOneFile(), and ~DataSynchronizer().

Member Data Documentation

◆ m_connection

ConnectionConfiguration Elements::Services::DataSync::DataSynchronizer::m_connection
protected

◆ m_fileMap

std::map<path, path> Elements::Services::DataSync::DataSynchronizer::m_fileMap
protected

Definition at line 83 of file DataSynchronizer.h.

Referenced by DataSynchronizer(), and downloadAllFiles().


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