Back to index

scribus-ng  1.3.4.dfsg+svn20071115
desaxe_conf.h
Go to the documentation of this file.
00001 /*
00002  *  desaxe_conf.h
00003  *  
00004  *
00005  *  Created by Andreas Vox on 02.06.06.
00006  *  Copyright 2006 under GPL2. All rights reserved.
00007  *
00008  */
00009 
00010 #ifndef DESAXE_CONF_H
00011 #define DESAXE_CONF_H
00012 
00013 
00014 // disable lots of diagnostic messages
00015 #undef DESAXE_DEBUG
00016 
00017 
00018 // choose datatypes for element tags and attributes
00019 #define DESAXE_QT
00020 
00021 #ifdef DESAXE_QT
00022 
00023 #include <string>
00024 #include <qstring.h>
00025 #include <qmap.h>
00026 
00027 typedef QString Xml_string;
00028 typedef QMap<Xml_string, Xml_string> Xml_attr;
00029 
00030 inline Xml_string Xml_key(Xml_attr::iterator& it) { return it.key(); }
00031 inline Xml_string Xml_data(Xml_attr::iterator& it) { return it.data(); }
00032 inline const char* fromXMLString(const Xml_string& s) { return s.ascii(); }
00033 inline Xml_string fromSTLString(const std::string& s) { return QString(s.c_str()); }
00034 
00035 #else
00036 
00037 #include <string>
00038 #include <utility>
00039 #include <map>
00040 
00041 typedef std::string Xml_string;
00042 typedef std::map<Xml_string, Xml_string> Xml_attr;
00043 
00044 inline Xml_string Xml_key(Xml_attr::iterator& it) { return it->first; }
00045 inline Xml_string Xml_data(Xml_attr::iterator& it) { return it->second; }
00046 inline const char* fromXMLString(const Xml_string& s) { return s.c_str(); }
00047 inline Xml_string fromSTLString(const std::string& s) { return s; }
00048 
00049 #endif
00050 
00051 #endif