ui-gxmlcpp 1.4.6
Public Member Functions | Static Public Member Functions
UI::GXML::Conf Class Reference

libxml2/libxslt configuration helper. More...

#include <Conf.hpp>

Collaboration diagram for UI::GXML::Conf:
Collaboration graph

Public Member Functions

virtual void customLog (std::string const &msg)
 Overwrite this for custom logging.
 
ConfsetCustomLogging (bool on=true, std::string prefix="[libxml2/xslt] ")
 Set/unset custom logging (optionally with custom prefix).
 
ConfsetCustomLoggingEnable (bool on=true)
 En/disable custom logging. Defaults to "enable" ("don't care" if custom logging is unset).
 
ConfsetEXSLT ()
 Register exslt functions for use with xsl transformations.
 

Static Public Member Functions

static void setKeepBlanks (bool on=true)
 Odd libxml2 global feature ;). See libxml2 docs.
 

Detailed Description

libxml2/libxslt configuration helper.

You would normally have one instance of this alive while operational. For custom logging, overwrite customLog().

Examples
XSLTProc.cpp.

Member Function Documentation

◆ customLog()

void UI::GXML::Conf::customLog ( std::string const &  msg)
virtual

Overwrite this for custom logging.

This defaults to logging to std::clog.

Parameters
msgFragmented log stream including newlines.

If you have line based logging, you might consider streaming msg into a stream buffer (with multi thread safety) and log only when you got a complete line. Unfortunately, msg may or may not include newlines and/or be a complete log line or not (i.e., lines are being broadcast to the hooks in fragments).

◆ setCustomLogging()

Conf & UI::GXML::Conf::setCustomLogging ( bool  on = true,
std::string  prefix = "[libxml2/xslt] " 
)

Set/unset custom logging (optionally with custom prefix).

When enabled, logging will be done through us (i.e., libxmlLog()). You would normally want to call this in a derived class' constructor where customLog() is overwritten.


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