MPQC  3.0.0-alpha
sc::XMLWriter Class Reference
Inheritance diagram for sc::XMLWriter:
sc::Runnable sc::DescribedClass sc::RefCount

Public Member Functions

 XMLWriter (const XMLWriter &)=delete
 
 XMLWriter (const Ref< KeyVal > &keyval)
 
 XMLWriter (std::ostream &out=ExEnv::out0())
 
 XMLWriter (ptree *pt, std::ostream &out=ExEnv::out0())
 
 XMLWriter (const std::string &filename)
 
bool fold_in_class_name () const
 
const std::string & filename () const
 
bool writing_done () const
 
bool has_active_context () const
 
template<typename T >
void put_binary_data (ptree &pt, T *data, long ndata, bool preserve_data_pointer=false) const
 
template<typename T >
ptree & insert_child (ptree &parent, T &&obj) const
 
template<typename T >
ptree & insert_child (ptree &parent, T &&obj, std::string wrapper_name) const
 
template<typename T , typename MapType >
ptree & insert_child (ptree &parent, T &&obj, std::string wrapper_name, const MapType &attrs) const
 
template<typename T , typename... Args>
ptree & insert_child_default (T &&obj, Args... args) const
 
void add_data (const Ref< XMLWritable > &datum)
 
void do_write ()
 
void run ()
 Executes an action as specified in the derived class.
 
template<typename T >
ptree & write_to_xml (T &&obj, ptree &parent) const
 
template<typename T >
boost::enable_if< boost::is_base_of< RefCount, T >, ptree & >::type write_to_xml (const Ref< T > &obj, ptree &parent) const
 
template<typename T >
ptree & write_to_xml (T &&obj) const
 
void begin_writing_context (const std::string &root_name)
 
void end_writing_context ()
 
- Public Member Functions inherited from sc::DescribedClass
 DescribedClass (const DescribedClass &)
 
DescribedClassoperator= (const DescribedClass &)
 
ClassDescclass_desc () const MPQC__NOEXCEPT
 This returns the unique pointer to the ClassDesc corresponding to the given type_info object. More...
 
const char * class_name () const
 Return the name of the object's exact type.
 
int class_version () const
 Return the version of the class.
 
virtual void print (std::ostream &=ExEnv::out0()) const
 Print the object.
 
Ref< DescribedClassref ()
 Return this object wrapped up in a Ref smart pointer. More...
 
- Public Member Functions inherited from sc::RefCount
size_t identifier () const
 Return the unique identifier for this object that can be compared for different objects of different types. More...
 
int lock_ptr () const
 Lock this object.
 
int unlock_ptr () const
 Unlock this object.
 
void use_locks (bool inVal)
 start and stop using locks on this object
 
refcount_t nreference () const
 Return the reference count.
 
refcount_t reference ()
 Increment the reference count and return the new count.
 
refcount_t dereference ()
 Decrement the reference count and return the new count.
 
int managed () const
 
void unmanage ()
 Turn off the reference counting mechanism for this object. More...
 

Static Public Attributes

static Ref< XMLWritercurrent_writer
 
static std::stack< Ref< XMLWriter > > writer_stack
 
static std::string current_context_name
 
static std::stack< std::string > context_name_stack
 

Protected Member Functions

void init ()
 
void init_filename (const std::string &filename)
 
- Protected Member Functions inherited from sc::RefCount
 RefCount (const RefCount &)
 
RefCountoperator= (const RefCount &)
 

Protected Attributes

std::ostream * out_
 
ptree * current_root_
 
std::stack< ptree * > pt_stack_
 
bool delete_out_
 
bool delete_pt_ = false
 
bool compress_data_
 
bool pretty_print_
 
bool human_readable_
 
bool fold_in_class_name_
 
bool writing_done_ = false
 
int pretty_print_spaces_
 
char pretty_print_space_char_
 
std::vector< Ref< XMLWritable > > data_
 
xml_writer_settings write_settings_
 
std::string filename_
 

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

Generated at Sun Jan 26 2020 23:24:14 for MPQC 3.0.0-alpha using the documentation package Doxygen 1.8.16.