Go to the documentation of this file.
14 #ifndef ECL_DEVICES_SHARED_FILE_HPP_
15 #define ECL_DEVICES_SHARED_FILE_HPP_
21 #include <ecl/config/ecl.hpp>
64 class SharedFileCommon {
94 static std::map<std::string,SharedFileCommon*>
opened_files;
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; }
233 devices::SharedFileCommon* shared_instance;
234 devices::CharBuffer buffer;
246 class is_sink<SharedFile> :
public True {};
WriteMode
Write mode for devices.
Interface distributed to all members of a shared output file.
@ New
Opens a new object (deletes existing objects).
friend class SharedFileManager
static std::map< std::string, SharedFileCommon * > opened_files
A generic buffer for devices.
#define ecl_devices_PUBLIC
virtual ~SharedFileCommon()
Synchronous and asynchronous file io.
static SharedFileCommon * RegisterSharedFile(const std::string &name, ecl::WriteMode mode=New)
Multi-instance (also thread-safe) output file device.
static bool DeRegisterSharedFile(const std::string &name)
Embedded control libraries.
ecl_devices
Author(s): Daniel Stonier
autogenerated on Wed Mar 2 2022 00:16:45