Back to index

scribus-ng  1.3.4.dfsg+svn20071115
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes
desaxe::Action Class Reference

Actions do all the real work when digesting XML files: creating new objects, setting attributes, calling methods. More...

#include <actions.h>

Inheritance diagram for desaxe::Action:
Inheritance graph
[legend]
Collaboration diagram for desaxe::Action:
Collaboration graph
[legend]

List of all members.

Public Member Functions

Digesterdigester ()
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)
virtual ~Action ()
Actionoperator= (const Action &other)

Protected Member Functions

 Action (Action_body *body_)

Private Member Functions

 Action ()

Private Attributes

Action_bodybody

Detailed Description

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

Definition at line 58 of file actions.h.


Constructor & Destructor Documentation

desaxe::Action::Action ( const Action other) [inline]

Definition at line 70 of file actions.h.

       {
              body = other.body;
              body->refs++;
       }
virtual desaxe::Action::~Action ( ) [inline, virtual]

Definition at line 75 of file actions.h.

       {
              if (--body->refs == 0)
                     delete body;
       }
desaxe::Action::Action ( Action_body body_) [inline, protected]

Definition at line 92 of file actions.h.

       {
              body = body_;
              body->refs = 1;
       }
desaxe::Action::Action ( ) [private]

Member Function Documentation

void desaxe::Action::begin ( const Xml_string tag,
Xml_attr  attr 
) [inline]

Definition at line 64 of file actions.h.

                                                  { body->begin(tag, attr); }

Here is the call graph for this function:

void desaxe::Action::chars ( const Xml_string data) [inline]

Definition at line 67 of file actions.h.

{ body->chars(data); }

Here is the call graph for this function:

Definition at line 61 of file actions.h.

{ return body->dig; }
void desaxe::Action::end ( const Xml_string tag) [inline]

Definition at line 66 of file actions.h.

{ body->end(tag); }

Here is the call graph for this function:

Action& desaxe::Action::operator= ( const Action other) [inline]

Definition at line 80 of file actions.h.

       {
              if (body != other.body) {
                     if (--body->refs == 0)
                            delete body;
                     body = other.body;
                     ++body->refs;
              }
              return *this;
       }
void desaxe::Action::setDigester ( Digester dig) [inline]

Definition at line 62 of file actions.h.

{ body->dig = dig; }

Here is the caller graph for this function:


Member Data Documentation

Definition at line 101 of file actions.h.


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