15 #define BRIO_WRITER_H 1 25 #include <boost/iostreams/stream.hpp> 26 #include <boost/iostreams/device/back_inserter.hpp> 27 #include <boost/filesystem.hpp> 30 #pragma clang diagnostic push 31 #pragma clang diagnostic ignored "-Wunused-parameter" 33 #include <boost/archive/text_oarchive.hpp> 35 #pragma clang diagnostic pop 57 writer(
const std::string & filename_,
61 writer(
const std::string & filename_,
62 const std::string & format_str_,
107 int add_store(
const std::string & label_,
108 const std::string & serial_tag_,
109 size_t buffer_size_ = 256000);
114 int add_store(
const std::string & label_,
115 size_t buffer_size_ = 256000);
121 size_t buffer_size_ = 0);
124 template <
typename T>
125 int store(
const T & data_,
const std::string & label_ =
"");
128 virtual void tree_dump(std::ostream & out_ = std::clog,
129 const std::string & title_ =
"",
130 const std::string & indent_ =
"",
131 bool inherit_ =
false)
const;
134 void print_info(std::ostream & out_ = std::clog)
const;
141 const std::string & serial_tag_,
142 size_t buffer_size_);
144 template <
typename T>
147 virtual void _at_open(
const std::string & filename_);
152 bool _allow_mixed_types_in_stores_;
153 bool _allow_automatic_store_;
154 bool _existing_file_protected_;
163 #endif // BRIO_WRITER_H store_info * _add_store(const std::string &label_, const std::string &serial_tag_, size_t buffer_size_)
int add_mixed_store(const std::string &label_, size_t buffer_size_=0)
bool is_allow_mixed_types_in_stores() const
Check if mixed types are allowed in any given store.
virtual void tree_dump(std::ostream &out_=std::clog, const std::string &title_="", const std::string &indent_="", bool inherit_=false) const
Smart print.
The brio generic writer class.
Definition: writer.h:49
int add_store(const std::string &label_, const std::string &serial_tag_, size_t buffer_size_=256000)
A class that contains internal dynamic informations for a given store.
Definition: utils.h:33
bool is_allow_automatic_store() const
Check if automatic store is allowed.
void print_info(std::ostream &out_=std::clog) const
Print.
int _at_store(const T &dat, store_info *store_info_)
Definition: writer-inl.h:84
bool is_locked() const
Check if the writer is locked.
void set_allow_mixed_types_in_stores(bool new_value_=true)
The internal I/O base class.
Definition: base_io.h:43
Utility macros for exception handling.
void unlock()
Unlock the writer.
bool is_existing_file_protected() const
Check if protection against file overwriting exists.
writer()
Default constructor.
void lock()
Lock the writer.
Definitions of brio::writer template functions.
virtual ~writer()
Destructor.
void set_allow_automatic_store(bool new_value_=true)
Utilities for logging information.
void set_existing_file_protected(bool new_value_=true)
Set the protection against file overwriting.
virtual void _at_open(const std::string &filename_)
int store(const T &data_, const std::string &label_="")
Definition: writer-inl.h:49
Top-level namespace of the Bayeux/brio module library.
Definition: base_io.h:37