Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members

FX::FXXMLString Class Reference

Serialize a variant to or from XML formatted string. More...

#include <FXXMLString.h>

Inheritance diagram for FX::FXXMLString:
FX::FXXML

Public Member Functions

 FXXMLString ()
 Create XML string i/o object.
 
 FXXMLString (const FXString &string, Direction d=Load)
 Open XML string for direction d.
 
 FXXMLString (const FXchar *string, FXuval length, Direction d=Load)
 Create XML i/o object and open it.
 
FXbool open (const FXString &string, Direction d=Load)
 Open XML file for direction d.
 
FXbool open (const FXchar *string, FXuval length, Direction d=Load)
 Open XML character string of length for direction d.
 
const FXString text () const
 Return string.
 
virtual FXival fill (FXival count)
 Read at least count bytes into buffer; return bytes available, or -1 for error.
 
virtual FXival flush (FXival count)
 Write at least count bytes from buffer; return space available, or -1 for error.
 
virtual FXbool close ()
 Close XML file and delete buffers.
 
virtual ~FXXMLString ()
 Close XML string.
 
- Public Member Functions inherited from FX::FXXML
 FXXML ()
 Construct XML serializer.
 
 FXXML (FXchar *buffer, FXuval sz=4096, Direction d=Load)
 Construct XML serializer and open for direction d. More...
 
FXbool open (FXchar *buffer=NULL, FXuval sz=4096, Direction d=Load)
 Open XML stream for given direction d. More...
 
FXuval size () const
 Return size of parse buffer.
 
Direction direction () const
 Return direction in effect.
 
FXint getLine () const
 Return current line number.
 
FXint getColumn () const
 Return current column number.
 
FXlong getOffset () const
 Return offset from begin of file.
 
Error parse ()
 Parse the file, return error code to indicate success or failure.
 
Error startDocument ()
 Document start.
 
Error startElement (const FXString &tag)
 Element start w/no attributes.
 
Error startElement (const FXString &tag, const FXStringDictionary &atts)
 Element start w/attributes.
 
Error characters (const FXString &text)
 Characters.
 
Error comment (const FXString &text)
 Comment.
 
Error processing (const FXString &target, const FXString &text)
 Processing instruction.
 
Error endElement (const FXString &tag)
 Element end.
 
Error endDocument ()
 Document end.
 
FXbool close ()
 Close stream and delete buffer, if owned.
 
virtual ~FXXML ()
 Close XML stream and clean up.
 

Additional Inherited Members

- Public Types inherited from FX::FXXML
enum  Error {
  ErrOK, ErrEmpty, ErrSave, ErrLoad,
  ErrSpace, ErrEquals, ErrName, ErrString,
  ErrToken, ErrDigit, ErrHexDigit, ErrSemiColon,
  ErrReference, ErrNoMatch, ErrEof
}
 
enum  Direction { Stop = 0, Save = 1, Load = 2 }
 
enum  { CRLF = 0x0001, REFS = 0x0002 }
 
enum  {
  UTF8 = 1, UTF16LE = 2, UTF16BE = 3, UTF32LE = 4,
  UTF32BE = 5
}
 
- Static Public Member Functions inherited from FX::FXXML
static const FXchar * getError (Error err)
 Returns error code for given error.
 
static FXbool decode (FXString &dst, const FXString &src, FXuint flags=CRLF|REFS)
 Decode escaped special characters from XML stream.
 
static FXbool encode (FXString &dst, const FXString &src, FXuint flags=CRLF|REFS)
 Encode special characters for inclusion into XML stream.
 
- Public Attributes inherited from FX::FXXML
FXCallback< Error() > startDocumentCB
 Called when start of document is recognized.
 
FXCallback< Error(const FXString &, const FXStringDictionary &) > startElementCB
 Called when start of element is recognized.
 
FXCallback< Error(const FXString &) > charactersCB
 Called to pass batch of decoded characters.
 
FXCallback< Error(const FXString &) > commentCB
 Called to pass comment string.
 
FXCallback< Error(const FXString &, const FXString &) > processingCB
 Called to pass processing instruction.
 
FXCallback< Error(const FXString &) > endElementCB
 Called when end of element is recognized.
 
FXCallback< Error() > endDocumentCB
 Called when end of document is recognized.
 
- Protected Attributes inherited from FX::FXXML
FXchar * begptr
 
FXchar * endptr
 
FXchar * wptr
 
FXchar * rptr
 
FXchar * sptr
 
FXlong offset
 
Element * current
 
FXint column
 
FXint line
 
Direction dir
 
FXString vers
 
FXuint enc
 

Detailed Description

Serialize a variant to or from XML formatted string.


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

Copyright © 1997-2020 Jeroen van der Zijp