Bayeux  3.4.1
Core Foundation library for SuperNEMO
Public Types | Public Member Functions | Protected Member Functions | List of all members
datatools::multi_properties::config Class Reference

Reader/writer class for multi_properties objects. More...

#include <bayeux/datatools/multi_properties.h>

Public Types

enum  options_flag {
  SKIP_PRIVATE_SECTIONS = bit_mask::bit00, FORBID_VARIANTS = bit_mask::bit01, LOG_MUTE = bit_mask::bit02, LOG_DEBUG = bit_mask::bit03,
  LOG_TRACE = bit_mask::bit04, SKIP_PRIVATE_PROPS = bit_mask::bit05, HEADER_FOOTER = bit_mask::bit06, DONT_CLEAR = bit_mask::bit07,
  REQUESTED_TOPIC = bit_mask::bit08, RESOLVE_PATH = bit_mask::bit09, START_WITHOUT_LABELS = bit_mask::bit10, WITHOUT_DECORATION = bit_mask::bit11
}
 

Public Member Functions

 config (uint32_t options_=0, const std::string &topic_="")
 Default constructor. More...
 
datatools::logger::priority get_logging () const
 Return the logging priority threshold. More...
 
void set_logging (datatools::logger::priority)
 Set the logging priority threshold. More...
 
void reset ()
 Reset the reader/writer. More...
 
void read (const std::string &filename, multi_properties &target_)
 Read from an input file. More...
 
void read (std::istream &in_, multi_properties &target_)
 Read from an input stream. More...
 
void write (std::ostream &out_, const multi_properties &source_)
 Write to an output stream. More...
 
void write (const std::string &filename_, const multi_properties &source_)
 Write to an output file. More...
 
bool has_topic () const
 Check if topic is set. More...
 
void set_topic (const std::string &topic_)
 Set the topic that should be matched. More...
 
const std::string & get_topic () const
 Return the topic. More...
 

Protected Member Functions

void _init_defaults ()
 Default initialization. More...
 
void _read (std::istream &in_, multi_properties &target_)
 Read from an input stream. More...
 
void _write (std::ostream &out_, const multi_properties &target_)
 Write to an output stream. More...
 
void _set_current_filename (const std::string &filename_)
 Store the current filename. More...
 

Detailed Description

Reader/writer class for multi_properties objects.

Member Enumeration Documentation

◆ options_flag

Enumerator
SKIP_PRIVATE_SECTIONS 

Skip private sections bit.

FORBID_VARIANTS 

Forbid variant block directives bit.

LOG_MUTE 

Mute mode activation bit.

LOG_DEBUG 

Debug mode activation bit.

LOG_TRACE 

Trace mode activation bit.

SKIP_PRIVATE_PROPS 

Skip private properties in sections bit.

HEADER_FOOTER 

Use header/footer (write)

DONT_CLEAR 

Don't clear before parsing bit (read)

REQUESTED_TOPIC 

Requested topic (read/write)

RESOLVE_PATH 

Resolve path for input filename (read/write)

START_WITHOUT_LABELS 

Start without key/meta labels and let the reader set them.

WITHOUT_DECORATION 

Do not use decoration.

Constructor & Destructor Documentation

◆ config()

datatools::multi_properties::config::config ( uint32_t  options_ = 0,
const std::string &  topic_ = "" 
)

Default constructor.

Member Function Documentation

◆ _init_defaults()

void datatools::multi_properties::config::_init_defaults ( )
protected

Default initialization.

◆ _read()

void datatools::multi_properties::config::_read ( std::istream &  in_,
multi_properties target_ 
)
protected

Read from an input stream.

◆ _set_current_filename()

void datatools::multi_properties::config::_set_current_filename ( const std::string &  filename_)
protected

Store the current filename.

◆ _write()

void datatools::multi_properties::config::_write ( std::ostream &  out_,
const multi_properties target_ 
)
protected

Write to an output stream.

◆ get_logging()

datatools::logger::priority datatools::multi_properties::config::get_logging ( ) const

Return the logging priority threshold.

◆ get_topic()

const std::string& datatools::multi_properties::config::get_topic ( ) const

Return the topic.

◆ has_topic()

bool datatools::multi_properties::config::has_topic ( ) const

Check if topic is set.

◆ read() [1/2]

void datatools::multi_properties::config::read ( const std::string &  filename,
multi_properties target_ 
)

Read from an input file.

◆ read() [2/2]

void datatools::multi_properties::config::read ( std::istream &  in_,
multi_properties target_ 
)

Read from an input stream.

◆ reset()

void datatools::multi_properties::config::reset ( )

Reset the reader/writer.

◆ set_logging()

void datatools::multi_properties::config::set_logging ( datatools::logger::priority  )

Set the logging priority threshold.

◆ set_topic()

void datatools::multi_properties::config::set_topic ( const std::string &  topic_)

Set the topic that should be matched.

◆ write() [1/2]

void datatools::multi_properties::config::write ( std::ostream &  out_,
const multi_properties source_ 
)

Write to an output stream.

◆ write() [2/2]

void datatools::multi_properties::config::write ( const std::string &  filename_,
const multi_properties source_ 
)

Write to an output file.


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