Bayeux
3.4.1
Core Foundation library for SuperNEMO
|
Some common data structure for I/O modules. More...
#include <bayeux/dpp/io_common.h>
Public Types | |
enum | io_type { IO_INVALID = -1, IO_OUTPUT = 0, IO_INPUT = 1 } |
Input/output. More... | |
enum | format_type { FORMAT_INVALID = -1, FORMAT_BIO = 0, FORMAT_BRIO = 1 } |
Format of the storage. More... | |
Public Member Functions | |
io_common (datatools::logger::priority &logging_, const std::string &module_name_) | |
virtual | ~io_common () |
void | set_module_name (const std::string &) |
const std::string & | get_module_name () const |
format_type | get_format () const |
void | set_format (format_type) |
io_type | get_io () const |
void | set_io (io_type) |
void | set_context_label (const std::string &) |
const std::string & | get_context_label () const |
void | set_context_service (dpp::context_service &context_service_, const std::string &ctx_label_="Ctx") |
bool | has_context_service () const |
const dpp::context_service & | get_context_service () const |
dpp::context_service & | grab_context_service () |
void | add_context_metadata (const std::string &) |
void | set_context_all (bool val_) |
void | clear_context_metadata () |
void | set_max_files (int max_files_) |
int | get_max_files () const |
void | set_max_record_total (int max_record_total_) |
int | get_max_record_total () const |
void | set_max_record_per_file (int max_record_per_file_) |
int | get_max_record_per_file () const |
void | init_filenames (const datatools::properties &setup_) |
const datatools::smart_filename & | get_filenames () const |
datatools::smart_filename & | grab_filenames () |
bool | is_terminated () const |
void | set_terminated (bool) |
int | get_file_record_counter () const |
int | get_record_counter () const |
int | get_file_index () const |
void | set_file_record_counter (int) |
void | set_record_counter (int) |
void | set_file_index (int) |
void | initialize (const datatools::properties &config_, datatools::service_manager &service_manager_) |
void | reset () |
const datatools::multi_properties & | get_metadata_store () const |
Return an embedded metadata store (const reference) More... | |
datatools::multi_properties & | grab_metadata_store () |
Return an embedded metadata store (mutable reference) More... | |
void | clear_metadata_store () |
Clear the contents of the embedded metadata store. More... | |
const std::vector< std::string > & | get_context_metadata () const |
Return a const reference to the list of context metadata labels. More... | |
bool | is_context_all () const |
Check if all context metadata are accepted. More... | |
virtual void | tree_dump (std::ostream &out_=std::clog, const std::string &title_="", const std::string &indent_="", bool inherit_=false) const |
Static Public Member Functions | |
static format_type | guess_format_from_filename (const std::string &) |
static i_data_source * | allocate_reader (const std::string &, datatools::logger::priority) |
static i_data_sink * | allocate_writer (const std::string &, datatools::logger::priority) |
static const std::string & | metadata_key () |
static const std::string & | metadata_meta () |
static const std::string & | metadata_rank () |
static const std::string & | metadata_topic () |
static const std::string & | context_key () |
static const std::string & | context_meta () |
static const std::string & | context_rank () |
static const std::string & | context_topic () |
Protected Member Functions | |
void | _set_defaults () |
Some common data structure for I/O modules.
dpp::io_common::io_common | ( | datatools::logger::priority & | logging_, |
const std::string & | module_name_ | ||
) |
|
virtual |
|
protected |
void dpp::io_common::add_context_metadata | ( | const std::string & | ) |
|
static |
|
static |
void dpp::io_common::clear_context_metadata | ( | ) |
void dpp::io_common::clear_metadata_store | ( | ) |
Clear the contents of the embedded metadata store.
|
static |
|
static |
|
static |
|
static |
const std::string& dpp::io_common::get_context_label | ( | ) | const |
const std::vector<std::string>& dpp::io_common::get_context_metadata | ( | ) | const |
Return a const reference to the list of context metadata labels.
const dpp::context_service& dpp::io_common::get_context_service | ( | ) | const |
int dpp::io_common::get_file_index | ( | ) | const |
int dpp::io_common::get_file_record_counter | ( | ) | const |
const datatools::smart_filename& dpp::io_common::get_filenames | ( | ) | const |
format_type dpp::io_common::get_format | ( | ) | const |
io_type dpp::io_common::get_io | ( | ) | const |
int dpp::io_common::get_max_files | ( | ) | const |
int dpp::io_common::get_max_record_per_file | ( | ) | const |
int dpp::io_common::get_max_record_total | ( | ) | const |
const datatools::multi_properties& dpp::io_common::get_metadata_store | ( | ) | const |
Return an embedded metadata store (const reference)
const std::string& dpp::io_common::get_module_name | ( | ) | const |
int dpp::io_common::get_record_counter | ( | ) | const |
dpp::context_service& dpp::io_common::grab_context_service | ( | ) |
datatools::smart_filename& dpp::io_common::grab_filenames | ( | ) |
datatools::multi_properties& dpp::io_common::grab_metadata_store | ( | ) |
Return an embedded metadata store (mutable reference)
|
static |
bool dpp::io_common::has_context_service | ( | ) | const |
void dpp::io_common::init_filenames | ( | const datatools::properties & | setup_ | ) |
void dpp::io_common::initialize | ( | const datatools::properties & | config_, |
datatools::service_manager & | service_manager_ | ||
) |
bool dpp::io_common::is_context_all | ( | ) | const |
Check if all context metadata are accepted.
bool dpp::io_common::is_terminated | ( | ) | const |
|
static |
|
static |
|
static |
|
static |
void dpp::io_common::reset | ( | ) |
void dpp::io_common::set_context_all | ( | bool | val_ | ) |
void dpp::io_common::set_context_label | ( | const std::string & | ) |
void dpp::io_common::set_context_service | ( | dpp::context_service & | context_service_, |
const std::string & | ctx_label_ = "Ctx" |
||
) |
void dpp::io_common::set_file_index | ( | int | ) |
void dpp::io_common::set_file_record_counter | ( | int | ) |
void dpp::io_common::set_format | ( | format_type | ) |
void dpp::io_common::set_io | ( | io_type | ) |
void dpp::io_common::set_max_files | ( | int | max_files_ | ) |
void dpp::io_common::set_max_record_per_file | ( | int | max_record_per_file_ | ) |
void dpp::io_common::set_max_record_total | ( | int | max_record_total_ | ) |
void dpp::io_common::set_module_name | ( | const std::string & | ) |
void dpp::io_common::set_record_counter | ( | int | ) |
void dpp::io_common::set_terminated | ( | bool | ) |
|
virtual |