14 #ifndef ECL_DEVICES_SHARED_FILE_HPP_ 15 #define ECL_DEVICES_SHARED_FILE_HPP_ 21 #include <ecl/config/ecl.hpp> 29 #include <ecl/exceptions/standard_exception.hpp> 30 #include <ecl/threads/mutex.hpp> 31 #include "detail/character_buffer.hpp" 64 class SharedFileCommon {
91 static
bool DeRegisterSharedFile(const
std::
string &name)
ecl_throw_decl(StandardException);
150 virtual ~SharedFile();
178 unsigned int count() {
return shared_instance->count; }
188 bool open() {
return shared_instance->file.open(); }
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 {};
#define ecl_throw_decl(exception)
Standard ecl throw exception declaration.
#define ecl_devices_PUBLIC
Multi-instance (also thread-safe) output file device.
virtual ~SharedFileCommon()
friend friend class SharedFileManager
#define ecl_debug_throw_decl(exception)
Debug mode throw exception declaration.