Bayeux  3.4.1
Core Foundation library for SuperNEMO
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
brio::detail::base_io Class Referenceabstract

The internal I/O base class. More...

#include <bayeux/brio/detail/base_io.h>

Inheritance diagram for brio::detail::base_io:
datatools::i_tree_dumpable brio::reader brio::writer

Public Types

enum  format_type { FORMAT_UNDEFINED = 0, FORMAT_PBA = 1, FORMAT_TEXT = 2 }
 Label for Boost portable text archive. More...
 
enum  rw_type { RW_UNDEFINED = 0, RW_READ = 1, RW_WRITE = 2 }
 
- Public Types inherited from datatools::i_tree_dumpable
enum  ostream_type { OSTREAM_COUT = 1, OSTREAM_CERR = 2, OSTREAM_CLOG = 3 }
 Enumeration for standard output streams. More...
 

Public Member Functions

 base_io (int rw_)
 
 base_io (int rw_, datatools::logger::priority p_)
 
 base_io (int rw_, int format_, datatools::logger::priority p_)
 
virtual ~base_io ()
 
virtual void open (const std::string &filename_)
 File open. More...
 
virtual void close ()
 File close. More...
 
virtual bool is_opened () const
 
bool is_reading () const
 
bool is_writing () const
 
bool is_format_pba () const
 
bool is_format_text () const
 
int get_format () const
 
void set_format (int format_)
 
void set_format (const std::string &format_str_)
 
bool is_debug () const
 
void set_debug (bool)
 
bool is_verbose () const
 
void set_verbose (bool)
 
int64_t get_number_of_entries (const std::string &label_="") const
 
int64_t get_current_entry (const std::string &label_="") const
 
const std::string & get_serialization_tag (const std::string &label_="") const
 
bool has_store (const std::string &label_) const
 
bool has_store_with_serial_tag (const std::string &label_, const std::string &serial_tag_) const
 
template<class T >
bool has_store_with_matching_serial_tag (const std::string &label_) const
 
bool has_mixed_store (const std::string &label_) const
 
void select_store (const std::string &label_)
 
bool has_automatic_store () const
 
void select_automatic_store ()
 
void unselect_store ()
 
void get_list_of_stores (std::list< std::string > &list_) const
 
virtual void tree_dump (std::ostream &out_=std::clog, const std::string &title_="", const std::string &indent_="", bool inherit_=false) const
 Main old interface method for printing. More...
 
void reset ()
 
void set_logging_priority (datatools::logger::priority)
 
datatools::logger::priority get_logging_priority () const
 
- Public Member Functions inherited from datatools::i_tree_dumpable
 i_tree_dumpable ()
 Constructor. More...
 
virtual ~i_tree_dumpable ()
 Destructor. More...
 
virtual void print_tree (std::ostream &out_=std::clog, const boost::property_tree::ptree &options_=empty_options()) const
 Main new interface method for printing. More...
 
void print_tree_json (std::ostream &out_=std::clog, const std::string &json_options_="") const
 Printing with jsonized options. More...
 
void print_tree_json (std::ostream &out_=std::clog, const char *json_options_=nullptr) const
 Printing with jsonized options. More...
 
void tree_dump_id (const int out_type_=OSTREAM_CLOG, const std::string &title_="", const std::string &indent_="", const bool inherit_=false) const
 
void tree_print_id (const int out_type_=OSTREAM_CLOG, const std::string &title_="") const
 
void smart_print_id (const int out_type_=OSTREAM_CLOG, const std::string &title_="", const std::string &indent_="") const
 

Static Public Member Functions

static const std::string & pba_label ()
 
static const std::string & text_label ()
 Label for Boost portable binary archive. More...
 
static int get_format (const std::string &format_str_)
 
- Static Public Member Functions inherited from datatools::i_tree_dumpable
static const boost::property_tree::ptree & empty_options ()
 
static boost::property_tree::ptree make_base_print_options (const std::string &title_, const std::string &indent_="", const bool inherit_=false)
 
static std::ostream & last_skip_tag (std::ostream &out_)
 
static std::ostream & skip_tag (std::ostream &out_)
 
static std::ostream & last_tag (std::ostream &out_)
 
static std::ostream & tag (std::ostream &out_)
 

Protected Member Functions

virtual void _at_open (const std::string &filename_)=0
 
void _set_default ()
 
void _reset ()
 
store_info_get_store_info (const std::string &label_="")
 
const store_info_get_store_info (const std::string &label_="") const
 

Protected Attributes

std::string _filename
 Name of the current I/O file (extensions are .brio or .trio) More...
 
TFile * _file
 Handle to the current embedded ROOT file. More...
 
store_info_dict_type _store_infos
 Dictionnary of stores. More...
 
store_info_current_store
 Handle to the current active store (if any) More...
 
int _rw
 Read/write mode tag. More...
 
std::locale * _default_locale
 Default I/O locale (for portable streams) More...
 
std::locale * _locale
 I/O locale (for portable streams) More...
 

Detailed Description

The internal I/O base class.

Member Enumeration Documentation

◆ format_type

Label for Boost portable text archive.

Enumerator
FORMAT_UNDEFINED 
FORMAT_PBA 
FORMAT_TEXT 

Boost portable binary archive (file extension: .brio)

◆ rw_type

Enumerator
RW_UNDEFINED 
RW_READ 
RW_WRITE 

Reader mode.

Constructor & Destructor Documentation

◆ base_io() [1/3]

brio::detail::base_io::base_io ( int  rw_)

◆ base_io() [2/3]

brio::detail::base_io::base_io ( int  rw_,
datatools::logger::priority  p_ 
)

◆ base_io() [3/3]

brio::detail::base_io::base_io ( int  rw_,
int  format_,
datatools::logger::priority  p_ 
)

◆ ~base_io()

virtual brio::detail::base_io::~base_io ( )
virtual

Member Function Documentation

◆ _at_open()

virtual void brio::detail::base_io::_at_open ( const std::string &  filename_)
protectedpure virtual

Implemented in brio::writer, and brio::reader.

◆ _get_store_info() [1/2]

store_info* brio::detail::base_io::_get_store_info ( const std::string &  label_ = "")
protected

◆ _get_store_info() [2/2]

const store_info* brio::detail::base_io::_get_store_info ( const std::string &  label_ = "") const
protected

◆ _reset()

void brio::detail::base_io::_reset ( )
protected

◆ _set_default()

void brio::detail::base_io::_set_default ( )
protected

◆ close()

virtual void brio::detail::base_io::close ( )
virtual

File close.

◆ get_current_entry()

int64_t brio::detail::base_io::get_current_entry ( const std::string &  label_ = "") const

◆ get_format() [1/2]

int brio::detail::base_io::get_format ( ) const

◆ get_format() [2/2]

static int brio::detail::base_io::get_format ( const std::string &  format_str_)
static

◆ get_list_of_stores()

void brio::detail::base_io::get_list_of_stores ( std::list< std::string > &  list_) const

◆ get_logging_priority()

datatools::logger::priority brio::detail::base_io::get_logging_priority ( ) const

◆ get_number_of_entries()

int64_t brio::detail::base_io::get_number_of_entries ( const std::string &  label_ = "") const

◆ get_serialization_tag()

const std::string& brio::detail::base_io::get_serialization_tag ( const std::string &  label_ = "") const

◆ has_automatic_store()

bool brio::detail::base_io::has_automatic_store ( ) const

◆ has_mixed_store()

bool brio::detail::base_io::has_mixed_store ( const std::string &  label_) const

◆ has_store()

bool brio::detail::base_io::has_store ( const std::string &  label_) const

◆ has_store_with_matching_serial_tag()

template<class T >
bool brio::detail::base_io::has_store_with_matching_serial_tag ( const std::string &  label_) const

◆ has_store_with_serial_tag()

bool brio::detail::base_io::has_store_with_serial_tag ( const std::string &  label_,
const std::string &  serial_tag_ 
) const

◆ is_debug()

bool brio::detail::base_io::is_debug ( ) const

◆ is_format_pba()

bool brio::detail::base_io::is_format_pba ( ) const

◆ is_format_text()

bool brio::detail::base_io::is_format_text ( ) const

◆ is_opened()

virtual bool brio::detail::base_io::is_opened ( ) const
virtual

◆ is_reading()

bool brio::detail::base_io::is_reading ( ) const

◆ is_verbose()

bool brio::detail::base_io::is_verbose ( ) const

◆ is_writing()

bool brio::detail::base_io::is_writing ( ) const

◆ open()

virtual void brio::detail::base_io::open ( const std::string &  filename_)
virtual

File open.

◆ pba_label()

static const std::string& brio::detail::base_io::pba_label ( )
static

◆ reset()

void brio::detail::base_io::reset ( )

◆ select_automatic_store()

void brio::detail::base_io::select_automatic_store ( )

◆ select_store()

void brio::detail::base_io::select_store ( const std::string &  label_)

◆ set_debug()

void brio::detail::base_io::set_debug ( bool  )

◆ set_format() [1/2]

void brio::detail::base_io::set_format ( int  format_)

◆ set_format() [2/2]

void brio::detail::base_io::set_format ( const std::string &  format_str_)

◆ set_logging_priority()

void brio::detail::base_io::set_logging_priority ( datatools::logger::priority  )

◆ set_verbose()

void brio::detail::base_io::set_verbose ( bool  )

◆ text_label()

static const std::string& brio::detail::base_io::text_label ( )
static

Label for Boost portable binary archive.

◆ tree_dump()

virtual void brio::detail::base_io::tree_dump ( std::ostream &  out_ = std::clog,
const std::string &  title_ = "",
const std::string &  indent_ = "",
bool  inherit_ = false 
) const
virtual

Main old interface method for printing.

Reimplemented from datatools::i_tree_dumpable.

Reimplemented in brio::writer, and brio::reader.

◆ unselect_store()

void brio::detail::base_io::unselect_store ( )

Member Data Documentation

◆ _current_store

store_info* brio::detail::base_io::_current_store
protected

Handle to the current active store (if any)

◆ _default_locale

std::locale* brio::detail::base_io::_default_locale
protected

Default I/O locale (for portable streams)

◆ _file

TFile* brio::detail::base_io::_file
protected

Handle to the current embedded ROOT file.

◆ _filename

std::string brio::detail::base_io::_filename
protected

Name of the current I/O file (extensions are .brio or .trio)

◆ _locale

std::locale* brio::detail::base_io::_locale
protected

I/O locale (for portable streams)

◆ _rw

int brio::detail::base_io::_rw
protected

Read/write mode tag.

◆ _store_infos

store_info_dict_type brio::detail::base_io::_store_infos
protected

Dictionnary of stores.


The documentation for this class was generated from the following file: