Back to index

scribus-ng  1.3.4.dfsg+svn20071115
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Private Attributes
desaxe::Factory_body< Obj_Type > Class Template Reference

Pushes a new object of type Obj_Type onto the stack. More...

#include <simple_actions.h>

Inheritance diagram for desaxe::Factory_body< Obj_Type >:
Inheritance graph
[legend]
Collaboration diagram for desaxe::Factory_body< Obj_Type >:
Collaboration graph
[legend]

List of all members.

Public Types

typedef Obj_Type *(* FunType )()

Public Member Functions

 Factory_body ()
 Factory_body (FunType create)
void begin (const Xml_string &, Xml_attr)
virtual Obj_Type * eval (Digester *dig_, const Xml_string &tag, Xml_attr attr)

Protected Member Functions

virtual void end (const Xml_string &)
virtual void chars (const Xml_string &)

Protected Attributes

Digesterdig

Private Attributes

Obj_Type *(* create_ )()

Detailed Description

template<class Obj_Type>
class desaxe::Factory_body< Obj_Type >

Pushes a new object of type Obj_Type onto the stack.

Obj_Type needs a default constructor

Definition at line 53 of file simple_actions.h.


Member Typedef Documentation

template<class Obj_Type>
typedef Obj_Type*(* desaxe::Factory_body< Obj_Type >::FunType)()

Definition at line 56 of file simple_actions.h.


Constructor & Destructor Documentation

template<class Obj_Type>
desaxe::Factory_body< Obj_Type >::Factory_body ( ) [inline]

Definition at line 58 of file simple_actions.h.

       : create_(NULL) 
    {}
template<class Obj_Type>
desaxe::Factory_body< Obj_Type >::Factory_body ( FunType  create) [inline]

Definition at line 62 of file simple_actions.h.

       : create_(create) 
    {}

Member Function Documentation

template<class Obj_Type>
void desaxe::Factory_body< Obj_Type >::begin ( const Xml_string ,
Xml_attr   
) [inline, virtual]

Reimplemented from desaxe::Action_body.

Definition at line 66 of file simple_actions.h.

    { 
              this->dig->push(create_? create_() : new Obj_Type()); 
    }  

Here is the call graph for this function:

virtual void desaxe::Action_body::chars ( const Xml_string ) [inline, protected, virtual, inherited]

Reimplemented in AppendText_body, desaxe::SetText_body< Obj_Type >, and desaxe::AddText_body< Obj_Type >.

Definition at line 36 of file actions.h.

{}

Here is the caller graph for this function:

virtual void desaxe::Generator_body< Obj_Type >::end ( const Xml_string ) [inline, protected, virtual, inherited]

Reimplemented from desaxe::Action_body.

Definition at line 146 of file actions.h.

{ dig->pop(); }
virtual Obj_Type * desaxe::Generator_body< Obj_Type >::eval ( Digester dig_,
const Xml_string tag,
Xml_attr  attr 
) [inline, virtual, inherited]

Definition at line 136 of file actions.h.

       {
              dig = dig_;
              begin(tag, attr);
              Type* res;
              res = dig->template top<Type>();
              end(tag);
              return res;
       }

Member Data Documentation

template<class Obj_Type>
Obj_Type*(* desaxe::Factory_body< Obj_Type >::create_)() [private]

Definition at line 71 of file simple_actions.h.

Digester* desaxe::Action_body::dig [protected, inherited]

Definition at line 38 of file actions.h.


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