cWidget::WithTable Class Reference

Implements a table, uses the previously parsed DataSets. More...

#include <cWidgetBase.h>

Inheritance diagram for cWidget::WithTable:

Inheritance graph
[legend]
Collaboration diagram for cWidget::WithTable:

Collaboration graph
[legend]

List of all members.

Public Member Functions

bool Process (tXmlParser::node cur)
 Processes a Face tag or passes on to WithIdData::Process().

Protected Attributes

std::deque< std::deque
< std::deque< tValue::Set > > > 
m_table
 Stores the resulting table in rows, cells and contained Value sets.

Private Member Functions

void ProcessCore (tXmlParser::node cur)
 Processes the inside of a Face tag.
void ProcessTable (tXmlParser::node cur)
 Processes the inside of a Table tag.
void ProcessRow (tXmlParser::node cur)
 Processes the inside of a Row tag.
void ProcessCell (tXmlParser::node cur)
 Processes the inside of a Cell tag.


Detailed Description

Implements a table, uses the previously parsed DataSets.

Definition at line 146 of file cWidgetBase.h.


Member Function Documentation

void cWidget::WithTable::ProcessCore ( tXmlParser::node  cur  )  [private]

Processes the inside of a Face tag.

Definition at line 333 of file cWidgetBase.cpp.

References ProcessTable().

Referenced by Process().

00334                                               {
00335     for (cur = cur.GetFirstChild(); cur; ++cur) {
00336         if(cur.IsOfType("Table")) {
00337             ProcessTable(cur);
00338             return;
00339         }
00340     }

Here is the call graph for this function:

Here is the caller graph for this function:

void cWidget::WithTable::ProcessTable ( tXmlParser::node  cur  )  [private]

Processes the inside of a Table tag.

Definition at line 342 of file cWidgetBase.cpp.

References m_table, and ProcessRow().

Referenced by ProcessCore().

00343                                                {
00344     for (cur = cur.GetFirstChild(); cur; ++cur) {
00345         if(cur.IsOfType("Row")) {
00346             m_table.push_back(std::deque<std::deque<tValue::Set> >());
00347             ProcessRow(cur);
00348         }
00349     }

Here is the call graph for this function:

Here is the caller graph for this function:

void cWidget::WithTable::ProcessRow ( tXmlParser::node  cur  )  [private]

Processes the inside of a Row tag.

Definition at line 351 of file cWidgetBase.cpp.

References m_table, and ProcessCell().

Referenced by ProcessTable().

00352                                              {
00353     for (cur = cur.GetFirstChild(); ++cur; ++cur) {
00354         tString name = cur.GetName();
00355         if(name == "Cell") {
00356             m_table.back().push_back(std::deque<tValue::Set>());
00357             ProcessCell(cur);
00358         }
00359     }

Here is the call graph for this function:

Here is the caller graph for this function:

void cWidget::WithTable::ProcessCell ( tXmlParser::node  cur  )  [private]

Processes the inside of a Cell tag.

Definition at line 361 of file cWidgetBase.cpp.

References a, b, c, cWidget::WithIdData::m_data, m_table, and tERR_WARN.

Referenced by ProcessRow().

00362                                               {
00363     for (cur = cur.GetFirstChild(); cur; ++cur) {
00364         if(cur.IsOfType("Text")) {
00365             //            m_table.back().back().push_back((tValue::Set(tValue::BasePtr(new tValue::String(cur.GetProp("value"))))));
00366             tValue::BasePtr a(new tValue::String(cur.GetProp("value")));
00367             tValue::BasePtr b(new tValue::Int(3));
00368             tValue::BasePtr c(new tValue::Int(4));
00369             m_table.back().back().push_back((tValue::Set(a, b, c)));
00370         } else if(cur.IsOfType("GameData")) {
00371             std::map<tString, tValue::Set>::iterator iter;
00372             if((iter = m_data.find(cur.GetProp("data"))) != m_data.end()) {
00373                 m_table.back().back().push_back((tValue::Set(iter->second)));
00374             } else {
00375                 tERR_WARN("Id '" + cur.GetProp("data") + "' undefined!");
00376             }
00377         }
00378     }

Here is the caller graph for this function:

bool cWidget::WithTable::Process ( tXmlParser::node  cur  )  [virtual]

Processes a Face tag or passes on to WithIdData::Process().

Reimplemented from cWidget::WithIdData.

Reimplemented in cWidget::Label.

Definition at line 325 of file cWidgetBase.cpp.

References cWidget::WithIdData::Process(), and ProcessCore().

Referenced by cWidget::Label::Process().

00326                                           {
00327     if(cur.IsOfType("Face")) {
00328         ProcessCore(cur);
00329         return true;
00330     }
00331     return WithIdData::Process(cur);

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

std::deque<std::deque<std::deque<tValue::Set> > > cWidget::WithTable::m_table [protected]

Stores the resulting table in rows, cells and contained Value sets.

Definition at line 154 of file cWidgetBase.h.

Referenced by ProcessCell(), ProcessRow(), ProcessTable(), and cWidget::Label::Render().


The documentation for this class was generated from the following files:
Generated on Sun Mar 16 00:04:42 2008 for Armagetron Advanced by  doxygen 1.5.4