34#if NDEVR_SUPPORTS_THREADING
35#include <NDEVR/ModelFactory.h>
36#include <NDEVR/Thread.h>
37#include <NDEVR/File.h>
41 class DesignObjectLookup;
54 void kill(
bool terminate_current);
65 m_exception_handler = exception_handler;
69 m_finished_callback = finished_callback;
79 volatile bool m_is_canceled =
false;
80 volatile bool m_is_accepted =
false;
81 volatile bool m_options_changed =
false;
83 volatile bool m_is_read;
89 mutable std::mutex m_critical_section;
90 std::function<void(
const Exception& e)> m_exception_handler;
91 std::function<void(
bool success)> m_finished_callback;
The equivelent of std::vector but with a bit more control. The basic array unit of the library.
Definition Buffer.hpp:56
A thread designed to read and write files using the FactoryIO interface. Thread will perform all acti...
Definition CachedFactoryIOThread.h:47
ModelFactory * factory() const
Definition CachedFactoryIOThread.h:77
void setFiles(const Buffer< FactoryParameters > &files)
void kill(bool terminate_current)
CachedFactoryIOThread(bool is_read)
bool writeFile(FactoryParameters &file)
void setFinishedCallback(const std::function< void(bool success)> &finished_callback)
Definition CachedFactoryIOThread.h:67
void stopThread() override
void setExceptionHandler(const std::function< void(const Exception &)> &exception_handler)
Definition CachedFactoryIOThread.h:63
bool isAccepted() const
Definition CachedFactoryIOThread.h:73
bool executeRead(Buffer< FactoryParameters > &requests)
bool executeWrite(Buffer< FactoryParameters > &requests)
const Buffer< FactoryParameters > & lastRequests() const
Definition CachedFactoryIOThread.h:61
bool readFile(FactoryParameters &file)
Provides consistent interface to handle errors through the throw expression. All exceptions generated...
Definition Exception.hpp:47
The core logic for importing and exporting files from the model heirarchy. Stores a series of IOFacto...
Definition ModelFactory.h:45
A thread is a single sequence stream within the software.
Definition Thread.h:67
A container of input information that is to be filled with output information by an IOFactory.
Definition IOFactory.h:61