.. _program_listing_file__tmp_ws_src_ecl_core_ecl_streams_include_ecl_streams_shared_file_stream.hpp: Program Listing for File shared_file_stream.hpp =============================================== |exhale_lsh| :ref:`Return to documentation for file ` (``/tmp/ws/src/ecl_core/ecl_streams/include/ecl/streams/shared_file_stream.hpp``) .. |exhale_lsh| unicode:: U+021B0 .. UPWARDS ARROW WITH TIP LEFTWARDS .. code-block:: cpp /***************************************************************************** ** Ifdefs *****************************************************************************/ #ifndef ECL_STREAMS_SHARED_FILE_STREAMS_HPP_ #define ECL_STREAMS_SHARED_FILE_STREAMS_HPP_ /***************************************************************************** ** Includes *****************************************************************************/ #include #include #include #include #include "text_stream.hpp" #include "macros.hpp" /***************************************************************************** ** Namespaces *****************************************************************************/ namespace ecl { /***************************************************************************** ** Interfaces [SharedFileStream] *****************************************************************************/ class ecl_streams_PUBLIC SharedFileStream : public TextStream { public: SharedFileStream() {}; SharedFileStream(const std::string &file_name, const WriteMode &mode = New) { ecl_try { if ( !this->device().open(file_name, mode) ) { error = this->device().error(); } } ecl_catch(StandardException &e) { ecl_throw(StandardException(LOC,e)); } } virtual ~SharedFileStream() {}; }; } // namespace ecl #endif /* ECL_STREAMS_SHARED_FILE_STREAMS_HPP_ */