12 #ifndef ECL_DEVICES_OFILE_W32_HPP_ 13 #define ECL_DEVICES_OFILE_W32_HPP_ 19 #include <ecl/config/ecl.hpp> 20 #if defined(ECL_IS_WIN32) 26 #include <sys/types.h> 122 OFile(
const std::string &file_name,
const WriteMode &mode =
New);
137 virtual bool open() {
return ( file != NULL ) ? true :
false; }
166 virtual bool open(
const std::string &file_name,
const WriteMode &mode =
New);
185 virtual bool close();
194 virtual const std::string& filename()
const {
return name; }
221 virtual long write(
const char &c);
244 long write(
const char* s,
unsigned long n);
273 template <
typename ByteArray>
286 virtual bool flush();
291 const Error& error()
const {
return error_handler; }
307 template <
typename ByteArray>
308 long OFile::write(
const ByteArray&byte_array) {
316 size_t written = fwrite(&byte_array[0],byte_array.size(),1,file);
323 return byte_array.size()*written;
337 class is_sink<OFile> :
public True {};
Embedded control libraries.
WriteMode
Write mode for devices.
Array< char, 3 > ByteArray
#define ecl_compile_time_concept_check(Model)
#define ecl_devices_PUBLIC
#define ecl_debug_throw(exception)
Defines exception handlers for posix devices.
Opens a new object (deletes existing objects).