Back to index

scribus-ng  1.3.4.dfsg+svn20071115
Public Member Functions | Private Attributes
Attribute_body< Data_Type > Class Template Reference

Converts an attribute to an object of type Data_Type and pushes it onto the stack. More...

#include <base_actions.h>

List of all members.

Public Member Functions

 Attribute_body (const Xml_string &name)
 Attribute_body (const Xml_string &name, const Data_Type &def)
 ~Attribute_body ()
void begin (const Xml_string &, Xml_attr)

Private Attributes

const Xml_string name_
const Data_Type * default_

Detailed Description

template<class Data_Type>
class Attribute_body< Data_Type >

Converts an attribute to an object of type Data_Type and pushes it onto the stack.

Definition at line 42 of file base_actions.h.


Constructor & Destructor Documentation

template<class Data_Type >
Attribute_body< Data_Type >::Attribute_body ( const Xml_string name) [inline]

Definition at line 45 of file base_actions.h.

       : name_(name), default_(NULL) 
{}
template<class Data_Type >
Attribute_body< Data_Type >::Attribute_body ( const Xml_string name,
const Data_Type &  def 
) [inline]

Definition at line 49 of file base_actions.h.

       : name_(name), default_(new Data_Type(def)) 
{}
template<class Data_Type >
Attribute_body< Data_Type >::~Attribute_body ( ) [inline]

Definition at line 53 of file base_actions.h.

{ 
              if (default_) 
                     delete default_; 
}

Member Function Documentation

template<class Data_Type >
void Attribute_body< Data_Type >::begin ( const Xml_string ,
Xml_attr   
) [inline]

Definition at line 59 of file base_actions.h.

{
       if (attr.contains(name_))
              dig->push(new Data_Type(attr[name_]));
       else if (default_)
              dig->push(new Data_Type(default_));
       else
              dig->push(NULL);
}

Member Data Documentation

template<class Data_Type >
const Data_Type* Attribute_body< Data_Type >::default_ [private]

Definition at line 70 of file base_actions.h.

template<class Data_Type >
const Xml_string Attribute_body< Data_Type >::name_ [private]

Definition at line 69 of file base_actions.h.


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