HPCToolkit
xml.hpp File Reference
#include <iostream>
#include <string>
#include <inttypes.h>
#include <include/uint.h>
#include <lib/support/StrUtil.hpp>
#include <lib/support/IOUtil.hpp>
Include dependency graph for xml.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  xml::RWError
 

Namespaces

 xml
 

Enumerations

enum  xml::XMLElementI {
  xml::TOKEN = 0, xml::ATT1 = 1, xml::ATT2 = 2, xml::ATT3 = 3,
  xml::ATT4 = 4, xml::ATT5 = 5, xml::ATT6 = 6, xml::ATT7 = 7,
  xml::ATT8 = 8, xml::ATT9 = 9
}
 
enum  { xml::ESC_FALSE = (0 << 0), xml::ESC_TRUE = (1 << 0), xml::UNESC_FALSE = (0 << 0), xml::UNESC_TRUE = (1 << 0) }
 

Functions

std::string xml::EscapeStr (const char *str)
 
std::string xml::EscapeStr (const std::string &str)
 
std::string xml::UnEscapeStr (const char *str)
 
std::string xml::UnEscapeStr (const std::string &str)
 
bool xml::ReadAttrStr (std::istream &is, std::string &s, int flags=UNESC_TRUE)
 
template<class T >
bool xml::ReadAttrNum (std::istream &is, T &n)
 
bool xml::WriteAttrStr (std::ostream &os, const char *s, int flags=ESC_TRUE)
 
bool xml::WriteAttrStr (std::ostream &os, const std::string &s, int flags=ESC_TRUE)
 
template<class T >
bool xml::WriteAttrNum (std::ostream &os, T n)
 
std::string xml::MakeAttrStr (const char *x, int flags=ESC_TRUE)
 
std::string xml::MakeAttrStr (const std::string &x, int flags=ESC_TRUE)
 
std::string xml::MakeAttrNum (int x)
 
std::string xml::MakeAttrNum (unsigned int x, int base=10)
 
std::string xml::MakeAttrNum (int64_t x)
 
std::string xml::MakeAttrNum (uint64_t x, int base=10)
 
std::string xml::MakeAttrNum (double x, const char *format="%g")
 

Variables

const std::string xml::SPC = " "
 
const std::string xml::eleB = "<"
 
const std::string xml::eleBf = "</"
 
const std::string xml::eleE = ">"
 
const std::string xml::eleEc = "/>"
 
const std::string xml::attB = "=\""
 
const std::string xml::attE = "\""