Back to index

scribus-ng  1.3.4.dfsg+svn20071115
Public Member Functions | Private Attributes
ELEM Class Reference
Collaboration diagram for ELEM:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 ELEM (const Xml_string &n)
void setName (const Xml_string &n)
const Xml_stringname ()
void setAttribute (const Xml_string &key, const Xml_string &val)
void addElem (ELEM *child)
void addText (const Xml_string &txt)
void print ()

Private Attributes

Xml_string name_
Xml_attr attributes
std::vector< ELEM * > children
Xml_string text

Detailed Description

Definition at line 19 of file desaxe_test.cpp.


Constructor & Destructor Documentation

ELEM::ELEM ( const Xml_string n) [inline]

Definition at line 21 of file desaxe_test.cpp.

: name_(n), attributes(), children(), text() {}

Member Function Documentation

void ELEM::addElem ( ELEM child) [inline]

Definition at line 38 of file desaxe_test.cpp.

       {
//            cerr << "adding child: " << child << "\n";
              children.push_back(child);
       }

Here is the caller graph for this function:

void ELEM::addText ( const Xml_string txt) [inline]

Definition at line 44 of file desaxe_test.cpp.

       {
              text += txt;
       }

Here is the caller graph for this function:

const Xml_string& ELEM::name ( ) [inline]

Definition at line 28 of file desaxe_test.cpp.

       { 
              return name_; 
       }
void ELEM::print ( ) [inline]

Definition at line 49 of file desaxe_test.cpp.

       {
              std::cout << "<" << name_ << " ";
              Xml_attr::iterator it;
              for (it=attributes.begin(); it != attributes.end(); ++it)
                     std::cout << Xml_key(it) << "=\"" << Xml_data(it) << "\" ";
              std::cout << ">\n" << text << "\n";
              
              for (uint i=0; i < children.size(); ++i)
                     children[i]->print();
              std::cout << "</" << name_ << ">\n";
       }

Here is the call graph for this function:

void ELEM::setAttribute ( const Xml_string key,
const Xml_string val 
) [inline]

Definition at line 33 of file desaxe_test.cpp.

       {
              attributes[key] = val;
       }

Here is the caller graph for this function:

void ELEM::setName ( const Xml_string n) [inline]

Definition at line 23 of file desaxe_test.cpp.

       { 
              name_ = n; 
       }

Member Data Documentation

Definition at line 64 of file desaxe_test.cpp.

std::vector<ELEM*> ELEM::children [private]

Definition at line 65 of file desaxe_test.cpp.

Definition at line 63 of file desaxe_test.cpp.

Definition at line 66 of file desaxe_test.cpp.


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