Back to index

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

Writes the topmost object to the topmost object but one on the stack. More...

#include <simple_actions.h>

Inheritance diagram for desaxe::SetterWithConversion_body< Obj_Type, Data_Type, Store_Type >:
Inheritance graph
[legend]
Collaboration diagram for desaxe::SetterWithConversion_body< Obj_Type, Data_Type, Store_Type >:
Collaboration graph
[legend]

List of all members.

Public Types

typedef void(Obj_Type::* FunType )(Data_Type)
typedef Data_Type(* ConvType )(Store_Type)

Public Member Functions

 SetterWithConversion_body (FunType set, ConvType conv)
void end (const Xml_string &)

Protected Member Functions

virtual void begin (const Xml_string &, Xml_attr)
virtual void chars (const Xml_string &)

Protected Attributes

Digesterdig

Private Attributes

FunType set_
ConvType conv_

Detailed Description

template<class Obj_Type, class Data_Type, class Store_Type>
class desaxe::SetterWithConversion_body< Obj_Type, Data_Type, Store_Type >

Writes the topmost object to the topmost object but one on the stack.

Definition at line 323 of file simple_actions.h.


Member Typedef Documentation

template<class Obj_Type, class Data_Type, class Store_Type>
typedef Data_Type(* desaxe::SetterWithConversion_body< Obj_Type, Data_Type, Store_Type >::ConvType)(Store_Type)

Definition at line 327 of file simple_actions.h.

template<class Obj_Type, class Data_Type, class Store_Type>
typedef void(Obj_Type::* desaxe::SetterWithConversion_body< Obj_Type, Data_Type, Store_Type >::FunType)(Data_Type)

Definition at line 326 of file simple_actions.h.


Constructor & Destructor Documentation

template<class Obj_Type, class Data_Type, class Store_Type>
desaxe::SetterWithConversion_body< Obj_Type, Data_Type, Store_Type >::SetterWithConversion_body ( FunType  set,
ConvType  conv 
) [inline]

Definition at line 329 of file simple_actions.h.

              : set_(set), conv_(conv)
       {}

Member Function Documentation

virtual void desaxe::Action_body::begin ( const Xml_string ,
Xml_attr   
) [inline, protected, virtual, inherited]
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:

template<class Obj_Type, class Data_Type, class Store_Type>
void desaxe::SetterWithConversion_body< Obj_Type, Data_Type, Store_Type >::end ( const Xml_string ) [inline, virtual]

Reimplemented from desaxe::Action_body.

Definition at line 333 of file simple_actions.h.

       { 
              Store_Type* data = this->dig->template top<Store_Type>(); 
              Obj_Type* obj = this->dig->template top<Obj_Type>(1);
#ifdef DESAXE_DEBUG
              std::cerr << "setter: " << obj << " .= " << conv_ << "(*" << data << ")\n";
#endif
              if (conv_)
                     (obj->*set_)( conv_(*data) );
              else
                     (obj->*set_)( static_cast<Data_Type>(*data) ); 
       }      

Member Data Documentation

template<class Obj_Type, class Data_Type, class Store_Type>
ConvType desaxe::SetterWithConversion_body< Obj_Type, Data_Type, Store_Type >::conv_ [private]

Definition at line 347 of file simple_actions.h.

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

Definition at line 38 of file actions.h.

template<class Obj_Type, class Data_Type, class Store_Type>
FunType desaxe::SetterWithConversion_body< Obj_Type, Data_Type, Store_Type >::set_ [private]

Definition at line 346 of file simple_actions.h.


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