shared_file_stream.hpp
Go to the documentation of this file.
00001 
00008 /*****************************************************************************
00009 ** Ifdefs
00010 *****************************************************************************/
00011 
00012 #ifndef ECL_STREAMS_SHARED_FILE_STREAMS_HPP_
00013 #define ECL_STREAMS_SHARED_FILE_STREAMS_HPP_
00014 
00015 /*****************************************************************************
00016 ** Includes
00017 *****************************************************************************/
00018 
00019 #include <string>
00020 #include <ecl/config/macros.hpp>
00021 #include <ecl/exceptions/standard_exception.hpp>
00022 #include <ecl/devices/shared_file.hpp>
00023 #include "text_stream.hpp"
00024 #include "macros.hpp"
00025 
00026 /*****************************************************************************
00027 ** Namespaces
00028 *****************************************************************************/
00029 
00030 namespace ecl {
00031 
00032 /*****************************************************************************
00033 ** Interfaces [SharedFileStream]
00034 *****************************************************************************/
00043 class ecl_streams_PUBLIC SharedFileStream : public TextStream<SharedFile> {
00044 public:
00051         SharedFileStream() {};
00063         SharedFileStream(const std::string &file_name, const WriteMode &mode = New) ecl_throw_decl(StandardException) {
00064                 ecl_try {
00065                         if ( !this->device().open(file_name, mode) ) {
00066                                 error = this->device().error();
00067                         }
00068                 } ecl_catch(StandardException &e) {
00069                         ecl_throw(StandardException(LOC,e));
00070                 }
00071         }
00072         virtual ~SharedFileStream() {};
00073 };
00074 
00075 } // namespace ecl
00076 
00077 
00078 #endif /* ECL_STREAMS_SHARED_FILE_STREAMS_HPP_ */


ecl_streams
Author(s): Daniel Stonier
autogenerated on Sun Oct 5 2014 23:36:00