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);
166 bool open(
const std::string &name,
WriteMode mode =
New);
178 unsigned int count() {
return shared_instance->count; }
188 bool open() {
return shared_instance->file.open(); }
203 long write(
const char &c);
219 long write(
const char* s,
unsigned long n);
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.
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.
const Error & error() const
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
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.