38#ifndef DRAIN_STYLE_XML
39#define DRAIN_STYLE_XML
43#include <drain/Sprinter.h>
45#include "ReferenceMap.h"
57class StyleXML :
public std::map<std::string,Variable> {
65 StyleXML(
const std::initializer_list<std::pair<std::string, Variable> > & inits){
77 static const std::string TEXT_ANCHOR;
81 T get(
const key_type & key,
const T & defaultValue = T())
const {
82 const const_iterator it = this->find(key);
83 if (it != this->end()){
92 std::string get(
const key_type & key,
const char * defaultValue)
const {
93 return get(key, std::string(defaultValue));
97 template <
class ...TT>
101 argsToStream(ostr, args...);
109 template <
class T,
class ...TT>
111 void argsToStream(std::ostream & ostr,
const T & arg,
const TT... args){
113 argsToStream(ostr, args...);
117 void argsToStream(std::ostream & ostr){
125std::ostream &
operator<<(std::ostream &ostr,
const StyleXML & style){
static std::ostream & toStream(std::ostream &ostr, const std::initializer_list< T > &x, const SprinterLayout &layout=defaultLayout)
New (experimental)
Definition Sprinter.h:423
static const SprinterLayout xmlAttributeLayout
Like attributes in XML (HTML, SVG, ...) tags.
Definition Sprinter.h:230
static void commentToStream(std::ostream &ostr, const TT... args)
Practical utility, helps in adding C++ code commenting...
Definition StyleXML.h:99
std::ostream & operator<<(std::ostream &ostr, const PlainData< DT > &d)
Definition Data.h:631
Definition Sprinter.h:136