Antares Simulator
Power System Simulator
Loading...
Searching...
No Matches
Antares::Data::StudyFinder Class Referenceabstract

Look for study folders asynchronously. More...

#include <finder.h>

Inheritance diagram for Antares::Data::StudyFinder:
MyStudyFinder MyStudyFinder MyStudyFinder

Public Types

enum  { defaultTimeout = 10000 }
 
using FolderVector = std::vector<Yuni::String::Ptr>
 List of folders.
 

Constructor

std::mutex mutex
 
 StudyFinder ()
 Default Constructor.
 
 StudyFinder (const StudyFinder &)
 Copy constructor.
 
virtual ~StudyFinder ()
 Destructor.
 
void lookup (const Yuni::String &folder)
 Start a new lookup from a single folder.
 
void lookup (const Yuni::String::Vector &folders)
 Start a new lookup from a list of folder.
 
void lookup (const Yuni::String::List &folders)
 Start a new lookup from a list of folder.
 
void stop (uint timeout=defaultTimeout)
 Stop a lookup currently in progress.
 
void wait ()
 Wait Indefinitely for the end of the lookup.
 
void wait (uint timeout)
 Wait for the end of the lookup (with timeout)
 
virtual void onStudyFound (const Yuni::String &folder, const StudyVersion &version)=0
 Event triggered when a lookup has been found.
 
virtual void onLookupFinished ()
 Event triggered when a lookup has finished gracefully.
 
virtual void onLookupAborted ()
 Event triggered when a lookup has been aborted.
 

Detailed Description

Look for study folders asynchronously.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
defaultTimeout 

The default value for the timeout.

Member Function Documentation

◆ lookup() [1/3]

void Antares::Data::StudyFinder::lookup ( const Yuni::String & folder)

Start a new lookup from a single folder.

If a lookup was already in progress, it will be stopped before.

Parameters
folderThe root folder where to start the lookup

◆ lookup() [2/3]

void Antares::Data::StudyFinder::lookup ( const Yuni::String::List & folders)

Start a new lookup from a list of folder.

If a lookup was already in progress, it will be stopped before.

Parameters
foldersThe list of folders where to start the lookup

◆ lookup() [3/3]

void Antares::Data::StudyFinder::lookup ( const Yuni::String::Vector & folders)

Start a new lookup from a list of folder.

If a lookup was already in progress, it will be stopped before.

Parameters
foldersThe list of folders where to start the lookup

◆ onLookupAborted()

virtual void Antares::Data::StudyFinder::onLookupAborted ( )
inlinevirtual

Event triggered when a lookup has been aborted.

This event might be called from any thread.

◆ onLookupFinished()

virtual void Antares::Data::StudyFinder::onLookupFinished ( )
inlinevirtual

Event triggered when a lookup has finished gracefully.

This event might be called from any thread.


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