config_writer Class Reference

Class for writing a config out to a file in pieces. More...

#include <binary_or_text.hpp>

List of all members.

Public Member Functions

 config_writer (std::ostream &out, bool compress, const std::string &textdomain)
void write (const config &cfg)
void write_child (const std::string &key, const config &cfg)
void write_key_val (const std::string &key, const std::string &value)
void open_child (const std::string &key)
void close_child (const std::string &key)
bool good () const

Private Attributes

boost::iostreams::filtering_stream
< boost::iostreams::output > 
filter_
std::ostream * out_ptr_
std::ostream & out_
bool compress_
unsigned int level_
std::string textdomain_


Detailed Description

Class for writing a config out to a file in pieces.

Definition at line 39 of file binary_or_text.hpp.


Constructor & Destructor Documentation

config_writer::config_writer ( std::ostream &  out,
bool  compress,
const std::string &  textdomain 
)

Definition at line 51 of file binary_or_text.cpp.

References compress_, and filter_.


Member Function Documentation

void config_writer::write ( const config cfg  ) 

Definition at line 66 of file binary_or_text.cpp.

References level_, and out_.

Referenced by output_to_buffer(), and write_child().

void config_writer::write_child ( const std::string &  key,
const config cfg 
)

Definition at line 71 of file binary_or_text.cpp.

References close_child(), level_, open_child(), out_, and write().

Referenced by write_game(), and write_player().

void config_writer::write_key_val ( const std::string &  key,
const std::string &  value 
)

void config_writer::open_child ( const std::string &  key  ) 

void config_writer::close_child ( const std::string &  key  ) 

bool config_writer::good (  )  const

Definition at line 93 of file binary_or_text.cpp.

References out_.

Referenced by finish_save_game().


Member Data Documentation

boost::iostreams::filtering_stream<boost::iostreams::output> config_writer::filter_ [private]

Definition at line 52 of file binary_or_text.hpp.

Referenced by config_writer().

std::ostream* config_writer::out_ptr_ [private]

Definition at line 53 of file binary_or_text.hpp.

std::ostream& config_writer::out_ [private]

Definition at line 54 of file binary_or_text.hpp.

Referenced by close_child(), good(), open_child(), write(), write_child(), and write_key_val().

bool config_writer::compress_ [private]

Definition at line 55 of file binary_or_text.hpp.

Referenced by config_writer().

unsigned int config_writer::level_ [private]

Definition at line 56 of file binary_or_text.hpp.

Referenced by close_child(), open_child(), write(), write_child(), and write_key_val().

std::string config_writer::textdomain_ [private]

Definition at line 57 of file binary_or_text.hpp.

Referenced by write_key_val().


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

Generated by doxygen 1.5.5 on 23 May 2008 for The Battle for Wesnoth
Gna! | Forum | Wiki | CIA | devdocs