Elements 6.3.1
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 )

Definition at line 37 of file DataSynchronizer.cpp.

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.

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().

◆ fileShouldBeWritten()

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

Definition at line 50 of file DataSynchronizer.cpp.

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

Referenced by downloadAllFiles().

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.

Referenced by downloadOneFile().

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 downloadAllFiles().


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