#include <openbabel/xml.h>
Inheritance diagram for XMLBaseFormat:
Public Member Functions | |
virtual const char * | NamespaceURI () const=0 |
virtual bool | DoElement (const std::string &ElName) |
virtual bool | EndElement (const std::string &ElName) |
virtual const char * | EndTag () |
virtual bool | ReadMolecule (OBBase *, OBConversion *) |
virtual bool | ReadChemObject (OBConversion *) |
virtual bool | WriteMolecule (OBBase *, OBConversion *) |
virtual bool | WriteChemObject (OBConversion *) |
virtual const char * | Description ()=0 |
virtual const char * | TargetClassDescription () |
virtual const std::type_info & | GetType () |
virtual const char * | SpecificationURL () |
virtual const char * | GetMIMEType () |
virtual unsigned int | Flags () |
virtual OBFormat * | MakeNewInstance () |
Protected Member Functions | |
xmlTextReaderPtr | reader () const |
xmlTextWriterPtr | writer () const |
void | OutputToStream () |
virtual int | SkipObjects (int n, OBConversion *pConv) |
Protected Attributes | |
XMLConversion * | _pxmlConv |
std::string | _prefix |
int | baseindent |
int | ind |
std::string | nsdecl |
int | _embedlevel |
virtual const char* NamespaceURI | ( | ) | const [pure virtual] |
virtual bool DoElement | ( | const std::string & | ElName | ) | [inline, virtual] |
virtual bool EndElement | ( | const std::string & | ElName | ) | [inline, virtual] |
virtual const char* EndTag | ( | ) | [inline, virtual] |
The tag at the end of the chemical object e.g. "/molecule>".
xmlTextReaderPtr reader | ( | ) | const [inline, protected] |
xmlTextWriterPtr writer | ( | ) | const [inline, protected] |
void OutputToStream | ( | ) | [inline, protected] |
virtual int SkipObjects | ( | int | n, | |
OBConversion * | pConv | |||
) | [inline, protected, virtual] |
Skip past first n objects in input stream (or current one with n=0) Returns 1 on success, -1 on error and 0 if not implemented
Reimplemented from OBFormat.
virtual bool ReadMolecule | ( | OBBase * | , | |
OBConversion * | ||||
) | [inline, virtual, inherited] |
The "API" interface Read function.
Reads a single object. Does not make a new object on the heap; can be used with a pointer to an chem object on the heap or the stack.
Reimplemented in XMLMoleculeFormat.
virtual bool ReadChemObject | ( | OBConversion * | ) | [inline, virtual, inherited] |
The "Convert" interface Read function.
Possibly reads multiple new objects on the heap and subjects them to its DoTransformations() function, which may delete them again. Sends result to pConv->AddChemObject()
Reimplemented in OBMoleculeFormat, and XMLMoleculeFormat.
virtual bool WriteMolecule | ( | OBBase * | , | |
OBConversion * | ||||
) | [inline, virtual, inherited] |
The "API" interface Write function.
Writes a single object Does not delete the object; can be used with a pointer to an chem object on the heap or the stack.
virtual bool WriteChemObject | ( | OBConversion * | ) | [inline, virtual, inherited] |
The "Convert" interface Write function.
Writes a single object Deletes the object after writing
Reimplemented in OBMoleculeFormat, and XMLMoleculeFormat.
virtual const char* Description | ( | ) | [pure virtual, inherited] |
Information on this format. Printed out in response to -Hxxx option where xxx id the id of the format.
Must be provided by each format class. Can include a list of command line Options. These may be used to construction check boxes, radio buttons etc for GUI interface.
const char * TargetClassDescription | ( | ) | [virtual, inherited] |
If not provided, the object type used by the default format is used (usually OBMol).
const type_info & GetType | ( | ) | [virtual, inherited] |
Defaults to that used by the default format. Useful for checking that a format can handle a particular object.
Reimplemented in OBMoleculeFormat, and XMLMoleculeFormat.
virtual const char* SpecificationURL | ( | ) | [inline, virtual, inherited] |
Web address where the format is defined.
virtual const char* GetMIMEType | ( | ) | [inline, virtual, inherited] |
Chemical MIME type associated with this file type (if any).
virtual unsigned int Flags | ( | ) | [inline, virtual, inherited] |
Decribes the capabilities of the format (Read only etc.).
Currently, can be a bitwise OR of any of the following NOTREADABLE READONEONLY NOTWRITABLE WRITEONEONLY DEFAULTFORMAT READBINARY WRITEBINARY READXML
virtual OBFormat* MakeNewInstance | ( | ) | [inline, virtual, inherited] |
Normally a single global instance is used but this may cause problems if there are member variables and the format is used in more than one place in the program.
XMLConversion* _pxmlConv [protected] |
std::string _prefix [protected] |
int baseindent [protected] |
int ind [protected] |
std::string nsdecl [protected] |
int _embedlevel [protected] |