![]() |
Scribus
Open source desktop publishing at your fingertips
|
#include <actions.h>
Public Member Functions | |
Digester * | digester () |
void | setDigester (Digester *dig) |
void | begin (const Xml_string &tag, Xml_attr attr) |
void | end (const Xml_string &tag) |
void | chars (const Xml_string &data) |
Action (const Action &other) | |
Action & | operator= (const Action &other) |
virtual void | reset () |
Protected Member Functions | |
Action (Action_body *body_) | |
Protected Attributes | |
Action_body * | body |
Actions do all the real work when digesting XML files: creating new objects, setting attributes, calling methods. Each Action gets control two or more times for each time the corresponding rule triggers: 1 x begin(), 0- x chars(), 1 x end(). They come in two basic flavors: Generators create a new object in their begin() method and put it on the object stack. Other Actions use objects on the stack, XML attributes or XML text to store this data in other objects. This is usually done in the end() method. Warning: end() methods are called in reverse order. This is to ensure that they see exactly the same stack content as their corresponging begin() method. This is the handle class which delegates to the body