API Documentation
Loading...
Searching...
No Matches
CachedFactoryIOThread Class Reference

A thread designed to read and write files using the FactoryIO interface. Thread will perform all actions on a temp file, then move the file when accept() is called. More...

#include <CachedFactoryIOThread.h>

Inheritance diagram for CachedFactoryIOThread:
[legend]
Collaboration diagram for CachedFactoryIOThread:
[legend]

Public Member Functions

void accept ()
 
 CachedFactoryIOThread (bool is_read)
 
void cancel ()
 
void deleteReadIDs ()
 
void deleteTempFiles ()
 
bool executeRead (Buffer< FactoryParameters > &requests)
 
bool executeWrite (Buffer< FactoryParameters > &requests)
 
ModelFactoryfactory () const
 
bool isAccepted () const
 
bool isFinished () const
 
void kill (bool terminate_current)
 
const Buffer< FactoryParameters > & lastRequests () const
 
bool readFile (FactoryParameters &file)
 
void requestStopLoad ()
 
void reset ()
 
void run () override
 
void setExceptionHandler (const std::function< void(const Exception &)> &exception_handler)
 
void setFiles (const Buffer< FactoryParameters > &files)
 
void setFinishedCallback (const std::function< void(bool success)> &finished_callback)
 
void stopThread () override
 
bool writeFile (FactoryParameters &file)
 
bool writeTempFiles ()
 
- Public Member Functions inherited from Thread
void detach ()
 
void forceStop ()
 
bool isPrimaryThread () const
 
bool isRunning () const
 
void join ()
 
virtual void requestStopThread ()
 
void setIsPrimaryThread (bool is_primary_thread)
 
void setThreadName (const String &name)
 
virtual bool shouldExitThread () const
 
void start ()
 
 Thread ()
 
 Thread (const String &name)
 
 Thread (const Thread &name)=delete
 
const StringthreadName () const
 
virtual ~Thread ()
 

Additional Inherited Members

- Static Public Member Functions inherited from Thread
static ThreadCurrentThread ()
 
static String CurrentThreadName ()
 
static void ServiceVirtualThreads ()
 
static void SetCurrentThreadName (const String &name)
 
static void StopAllThreads ()
 
- Protected Member Functions inherited from Thread
const std::thread & self ()
 
- Protected Attributes inherited from Thread
volatile bool m_is_running = false
 
volatile bool m_is_single_run = true
 

Detailed Description

A thread designed to read and write files using the FactoryIO interface. Thread will perform all actions on a temp file, then move the file when accept() is called.


Constructor & Destructor Documentation

◆ CachedFactoryIOThread()

CachedFactoryIOThread ( bool is_read)

Member Function Documentation

◆ accept()

void accept ( )

◆ cancel()

void cancel ( )

◆ deleteReadIDs()

void deleteReadIDs ( )

◆ deleteTempFiles()

void deleteTempFiles ( )

◆ executeRead()

bool executeRead ( Buffer< FactoryParameters > & requests)

◆ executeWrite()

bool executeWrite ( Buffer< FactoryParameters > & requests)

◆ factory()

ModelFactory * factory ( ) const
inline

◆ isAccepted()

bool isAccepted ( ) const
inline

◆ isFinished()

bool isFinished ( ) const

◆ kill()

void kill ( bool terminate_current)

◆ lastRequests()

const Buffer< FactoryParameters > & lastRequests ( ) const
inline

◆ readFile()

bool readFile ( FactoryParameters & file)

◆ requestStopLoad()

void requestStopLoad ( )

◆ reset()

void reset ( )

◆ run()

void run ( )
overridevirtual

Reimplemented from Thread.

◆ setExceptionHandler()

void setExceptionHandler ( const std::function< void(const Exception &)> & exception_handler)
inline

◆ setFiles()

void setFiles ( const Buffer< FactoryParameters > & files)

◆ setFinishedCallback()

void setFinishedCallback ( const std::function< void(bool success)> & finished_callback)
inline

◆ stopThread()

void stopThread ( )
overridevirtual

Reimplemented from Thread.

◆ writeFile()

bool writeFile ( FactoryParameters & file)

◆ writeTempFiles()

bool writeTempFiles ( )

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