14 #ifndef ECL_DEVICES_SHARED_FILE_HPP_ 15 #define ECL_DEVICES_SHARED_FILE_HPP_ 21 #include <ecl/config/ecl.hpp> 91 static bool DeRegisterSharedFile(
const std::string &name) ecl_throw_decl(
StandardException);
178 unsigned int count() {
return shared_instance->count; }
188 bool open() {
return shared_instance->file.open(); }
219 long write(
const char* s,
unsigned long n) ecl_debug_throw_decl(
StandardException);
230 const Error&
error()
const {
return shared_instance->error_handler; }
Interface distributed to all members of a shared output file.
Embedded control libraries.
WriteMode
Write mode for devices.
devices::SharedFileCommon * shared_instance
devices::CharBuffer buffer
A generic buffer for devices.
#define ecl_throw_decl(exception)
const Error & error() const
SharedFile()
Non-RAII style constructor, doesn't open a file.
unsigned int count()
Denotes how many instances are currently sharing this file.
Multi-instance (also thread-safe) output file device.
Simple char string buffer class for use internally by the devices.
static std::map< std::string, SharedFileCommon * > opened_files
virtual ~SharedFileCommon()
#define ecl_devices_PUBLIC
#define ecl_debug_throw_decl(exception)
Default action for detection of sink devices (output) (false).
Opens a new object (deletes existing objects).
Synchronous and asynchronous file io.
bool open()
Status flag indicating if the file is open/closed.