Scribus
Open source desktop publishing at your fingertips
Serializer Class Reference
Inheritance diagram for Serializer:
Collaboration diagram for Serializer:

Public Member Functions

 Serializer (ScribusDoc &doc)
 
- Public Member Functions inherited from desaxe::Digester
Digesteroperator= (const Digester &other)
 
void reset ()
 
void addRule (const Xml_string &pattern, Action action)
 
void parseFile (const Xml_string &filename)
 
void parseMemory (const char *data, unsigned int length)
 
template<class ObjType >
ObjType * result ()
 
int nrOfErrors () const
 
const Xml_string getError (int i) const
 
void beginDoc ()
 
void endDoc ()
 
void begin (const Xml_string &tag, Xml_attr attr)
 
void end (const Xml_string &tag)
 
void chars (const Xml_string &text)
 
void fail ()
 
void error (const Xml_string &msg)
 
template<class ObjType >
ObjType * top (unsigned int offset=0)
 
template<class ObjType >
ObjType * bottom (unsigned int offset=0)
 
template<class ObjType >
void setResult (ObjType *res)
 
void pop ()
 
void popn (unsigned int number)
 
template<class ObjType >
void push (ObjType *obj)
 
template<class ObjType >
ObjType * lookup (const Xml_string &idref)
 
template<class ObjType >
void store (const Xml_string &idref, ObjType *res)
 
template<class LinkType >
void patchCall (const Xml_string &idref, void(*fun)(LinkType *))
 
template<class ObjType , class LinkType >
void patchInvoke (const Xml_string &idref, ObjType *obj, void(ObjType::*fun)(LinkType *))
 
- Public Member Functions inherited from SaxHandler
void beginEnd (const Xml_string &tag, Xml_attr attr)
 

Static Public Member Functions

static bool readWithEncoding (const QString &filename, const QString &encoding, QString &txt)
 
static bool writeWithEncoding (const QString &filename, const QString &encoding, const QString &txt)
 
- Static Public Member Functions inherited from desaxe::Digester
static Xml_string concat (const Xml_string &pattern1, const Xml_string &pattern2)
 

Constructor & Destructor Documentation

Serializer::Serializer ( ScribusDoc doc)

Construct a Serializer object which can be used to (de)serialize Scribus elements. Since it has Digester as a superclass, a Serializer object can also be used where a SaxHandler is required as argument, eg. the saxx() method.

Member Function Documentation

bool Serializer::readWithEncoding ( const QString &  filename,
const QString &  encoding,
QString &  txt 
)
static

Writes all objects in selection to handler as a fragment. Needed styles and colors are included. Reads objects from the given QString which must represent a fragment, imports them into the document and returns a (nonGUI) selection to it. Reads objects from the given QFile which must represent a fragment, imports them into the document and returns a (nonGUI) selection to it.Legacy method to read plain text for a textframe

bool Serializer::writeWithEncoding ( const QString &  filename,
const QString &  encoding,
const QString &  txt 
)
static

Legacy method to write plain text from a textframe


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