Back to index

scribus-ng  1.3.4.dfsg+svn20071115
Functions
saxiohelper.h File Reference
#include "desaxe_conf.h"
#include <qvaluelist.h>
#include <qvaluestack.h>
#include <qstringlist.h>
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

Xml_string toXMLString (unsigned int val)
Xml_string toXMLString (int val)
Xml_string toXMLString (unsigned long val)
Xml_string toXMLString (long val)
Xml_string toXMLString (double val)
Xml_string toXMLString (float val)
Xml_string toXMLString (bool val)
Xml_string toXMLString (const Xml_string &val)
Xml_string toXMLString (const ScFace &val)
Xml_string toXMLString (const FPointArray &path)
Xml_string toXMLString (const QValueList< double > &doublelist)
Xml_string toXMLString (const QValueList< int > &intlist)
Xml_string toXMLString (const QStringList &list)
unsigned int parseUInt (const Xml_string &str)
int parseInt (const Xml_string &str)
unsigned long parseULong (const Xml_string &str)
long parseLong (const Xml_string &str)
double parseDouble (const Xml_string &str)
float parseFloat (const Xml_string &str)
bool parseBool (const Xml_string &str)
QValueList< double > parseDoubleList (const Xml_string &str)
QValueList< intparseIntList (const Xml_string &str)
QValueStack< intparseIntStack (const Xml_string &str)
QStringList parseStringList (const Xml_string &str)
Xml_string mkXMLName (const QString &any)
template<class ENUM >
ENUM parseEnum (const Xml_string &str)
template<class DATA >
DATA parse (const Xml_string &str)
template<>
const Xml_stringparse< const Xml_string & > (const Xml_string &str)
template<>
Xml_string parse< Xml_string > (const Xml_string &str)
template<>
unsigned int parse< unsigned int > (const Xml_string &str)
template<>
int parse< int > (const Xml_string &str)
template<>
unsigned long parse< unsigned long > (const Xml_string &str)
template<>
long parse< long > (const Xml_string &str)
template<>
double parse< double > (const Xml_string &str)
template<>
float parse< float > (const Xml_string &str)
template<>
bool parse< bool > (const Xml_string &str)
template<>
QValueList< intparse< QValueList< int > > (const Xml_string &str)
template<>
QValueList< double > parse< QValueList< double > > (const Xml_string &str)

Function Documentation

Xml_string mkXMLName ( const QString &  any)

Definition at line 14 of file saxiohelper.cpp.

{
       QString result("");
       for (unsigned int i=0; i < any.length(); ++i)
       {
              unsigned int ch = any[i].unicode();
              if (ch == ':' || ('a' <= ch && ch <= 'z') || ('A' <= ch && ch <= 'Z')
                     || (0xC0 <= ch && ch <= 0xD6) || (0xD8 <= ch && ch <= 0xF6)
                     || (0xF8 <= ch && ch <= 0x2FF) || (0x370 <= ch && ch <= 0x37D)
                     || (0x37F <= ch && ch <= 0x1FFF) || (0x200C <= ch && ch <= 0x200D)
                     || (0x2070 <= ch && ch <= 0x218F) || (0x2C00 <= ch && ch <= 0x2FEF)
                     || (0x3001 <= ch && ch <= 0xD7FF) || (0xF900 <= ch && ch <= 0xFDCF)
                     || (0xFDF0 <= ch && ch <= 0xFFFD) || ch > 0xFFFF
                     || (i > 0 && (ch == '-' || ch == '.' || ('0' <= ch && ch <= '9') || ch == 0xB7
                                            || (0x300 <= ch && ch <= 0x36F) || (0x203F <= ch && ch <= 0x2040) )))
              {
                     result += ch;
              }
              else
              {
                     result += '_';
                     result += "0123456789ABCDEF"[(ch >> 12) & 15];
                     result += "0123456789ABCDEF"[(ch >>  8) & 15];
                     result += "0123456789ABCDEF"[(ch >>  4) & 15];
                     result += "0123456789ABCDEF"[(ch      ) & 15];
              }
       }
       return result;
}
template<class DATA >
DATA parse ( const Xml_string str) [inline]

Definition at line 55 of file saxiohelper.h.

{
       return static_cast<DATA>(str);
}

Here is the caller graph for this function:

template<>
bool parse< bool > ( const Xml_string str) [inline]

Definition at line 118 of file saxiohelper.h.

{
       return parseBool(str);
}

Here is the call graph for this function:

template<>
const Xml_string& parse< const Xml_string & > ( const Xml_string str) [inline]

Definition at line 62 of file saxiohelper.h.

{
       return str;
}
template<>
double parse< double > ( const Xml_string str) [inline]

Definition at line 104 of file saxiohelper.h.

{
       return parseDouble(str);
}

Here is the call graph for this function:

template<>
float parse< float > ( const Xml_string str) [inline]

Definition at line 111 of file saxiohelper.h.

{
       return parseFloat(str);
}

Here is the call graph for this function:

template<>
int parse< int > ( const Xml_string str) [inline]

Definition at line 83 of file saxiohelper.h.

{
       return parseInt(str);
}

Here is the call graph for this function:

template<>
long parse< long > ( const Xml_string str) [inline]

Definition at line 97 of file saxiohelper.h.

{
       return parseLong(str);
}

Here is the call graph for this function:

template<>
QValueList<double> parse< QValueList< double > > ( const Xml_string str) [inline]

Definition at line 132 of file saxiohelper.h.

{
       return parseDoubleList(str);
}

Here is the call graph for this function:

template<>
QValueList<int> parse< QValueList< int > > ( const Xml_string str) [inline]

Definition at line 125 of file saxiohelper.h.

{
       return parseIntList(str);
}

Here is the call graph for this function:

template<>
unsigned int parse< unsigned int > ( const Xml_string str) [inline]

Definition at line 76 of file saxiohelper.h.

{
       return parseUInt(str);
}

Here is the call graph for this function:

template<>
unsigned long parse< unsigned long > ( const Xml_string str) [inline]

Definition at line 90 of file saxiohelper.h.

{
       return parseULong(str);
}

Here is the call graph for this function:

template<>
Xml_string parse< Xml_string > ( const Xml_string str) [inline]

Definition at line 69 of file saxiohelper.h.

{
       return str;
}
bool parseBool ( const Xml_string str)

Definition at line 126 of file saxiohelper.cpp.

{
       return str == "yes";
}

Here is the caller graph for this function:

double parseDouble ( const Xml_string str)

Definition at line 102 of file saxiohelper.cpp.

{
       return str.toDouble();
}

Here is the caller graph for this function:

QValueList<double> parseDoubleList ( const Xml_string str)

Definition at line 148 of file saxiohelper.cpp.

{
       QStringList strlist = QStringList::split(' ', str);
       QValueList<double> result;
       for (QStringList::iterator it=strlist.begin(); it != strlist.end(); ++it)
              result.append(parseDouble(*it));
       return result;
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class ENUM >
ENUM parseEnum ( const Xml_string str) [inline]

Definition at line 47 of file saxiohelper.h.

{
       return static_cast<ENUM>(str.toUInt());
}
float parseFloat ( const Xml_string str)

Definition at line 114 of file saxiohelper.cpp.

{
       return str.toFloat();
}

Here is the caller graph for this function:

int parseInt ( const Xml_string str)

Definition at line 68 of file saxiohelper.cpp.

{
       return str.toInt();
}

Here is the caller graph for this function:

QValueList<int> parseIntList ( const Xml_string str)

Definition at line 169 of file saxiohelper.cpp.

{
       QStringList strlist = QStringList::split(' ', str);
       QValueList<int> result;
       for (QStringList::iterator it=strlist.begin(); it != strlist.end(); ++it)
              result.append(parseInt(*it));
       return result;
}

Here is the call graph for this function:

Here is the caller graph for this function:

QValueStack<int> parseIntStack ( const Xml_string str)

Definition at line 179 of file saxiohelper.cpp.

{
       QStringList strlist = QStringList::split(' ', str);
       QValueStack<int> result;
       for (QStringList::iterator it=strlist.begin(); it != strlist.end(); ++it)
              result.append(parseInt(*it));
       return result;
}

Here is the call graph for this function:

long parseLong ( const Xml_string str)

Definition at line 90 of file saxiohelper.cpp.

{
       return str.toLong();
}

Here is the caller graph for this function:

QStringList parseStringList ( const Xml_string str)

Definition at line 199 of file saxiohelper.cpp.

{
       return QStringList::split(' ', str);
}
unsigned int parseUInt ( const Xml_string str)

Definition at line 57 of file saxiohelper.cpp.

{
       return str.toUInt();
}

Here is the caller graph for this function:

unsigned long parseULong ( const Xml_string str)

Definition at line 79 of file saxiohelper.cpp.

{
       return str.toULong();
}

Here is the caller graph for this function:

Xml_string toXMLString ( unsigned int  val)

Definition at line 52 of file saxiohelper.cpp.

{
       return QString::number(val);
}

Here is the caller graph for this function:

Definition at line 62 of file saxiohelper.cpp.

{
       return QString::number(val);
}
Xml_string toXMLString ( unsigned long  val)

Definition at line 74 of file saxiohelper.cpp.

{
       return QString::number(val);
}

Definition at line 84 of file saxiohelper.cpp.

{
       return QString::number(val);
}
Xml_string toXMLString ( double  val)

Definition at line 96 of file saxiohelper.cpp.

{
       return QString::number(val);
}
Xml_string toXMLString ( float  val)

Definition at line 108 of file saxiohelper.cpp.

{
       return QString::number(val);
}

Definition at line 120 of file saxiohelper.cpp.

{
       return what? "yes" : "no";
}
Xml_string toXMLString ( const Xml_string val)

Definition at line 132 of file saxiohelper.cpp.

{
       return val;
}
Xml_string toXMLString ( const ScFace &  val)

Definition at line 206 of file saxiohelper.cpp.

{
       return val.scName();
}
Xml_string toXMLString ( const FPointArray &  path)

Definition at line 212 of file saxiohelper.cpp.

{
       return path.svgPath();
}
Xml_string toXMLString ( const QValueList< double > &  doublelist)

Definition at line 138 of file saxiohelper.cpp.

{
       QString result = "";
       QValueList<double>::const_iterator dax;
       for (dax = doublelist.begin(); dax != doublelist.end(); ++dax)
              result += toXMLString(*dax) + " ";
       return result;
}

Here is the call graph for this function:

Xml_string toXMLString ( const QValueList< int > &  intlist)

Definition at line 158 of file saxiohelper.cpp.

{
       QString result = "";
       QValueList<int>::const_iterator dax;
       for (dax = intlist.begin(); dax != intlist.end(); ++dax)
              result += toXMLString(*dax) + " ";
       return result;
}

Here is the call graph for this function:

Xml_string toXMLString ( const QStringList &  list)

Definition at line 189 of file saxiohelper.cpp.

{
       QString result = "";
       QStringList::const_iterator dax;
       for (dax = list.begin(); dax != list.end(); ++dax)
              result += *dax + " ";
       return result;
}