Vegastrike 0.5.1 rc1  1.0
Original sources for Vegastrike Evolved
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SimplePickerCells Class Reference

#include <simplepicker.h>

Inheritance diagram for SimplePickerCells:
PickerCells

Public Member Functions

virtual int count (void) const
 
virtual PickerCellcellAt (int index)
 
virtual const PickerCellcellAt (int index) const
 
virtual void addCell (PickerCell *c)
 
virtual void clear (void)
 
 SimplePickerCells (void)
 
virtual ~SimplePickerCells (void)
 
- Public Member Functions inherited from PickerCells
virtual ~PickerCells ()
 
virtual PickerCellcellWithId (const std::string &id)
 
bool saveOpenCategories (std::list< std::list< std::string > > &masterList, const std::list< std::string > &parentHier, PickerCell *selectedCell) const
 

Protected Attributes

std::vector< PickerCell * > m_cells
 

Detailed Description

Definition at line 89 of file simplepicker.h.

Constructor & Destructor Documentation

SimplePickerCells::SimplePickerCells ( void  )

Definition at line 81 of file simplepicker.cpp.

References CHILD_VECTOR_RESERVE, and m_cells.

82 {
83  m_cells.reserve( CHILD_VECTOR_RESERVE );
84 }
virtual SimplePickerCells::~SimplePickerCells ( void  )
inlinevirtual

Definition at line 118 of file simplepicker.h.

References clear().

119  {
120  clear();
121  }

Member Function Documentation

virtual void SimplePickerCells::addCell ( PickerCell c)
inlinevirtual

Definition at line 108 of file simplepicker.h.

References m_cells.

Referenced by SimplePickerCell::addChild(), and BaseComputer::createCategoryCell().

109  {
110  m_cells.push_back( c );
111  }
virtual PickerCell* SimplePickerCells::cellAt ( int  index)
inlinevirtual

Implements PickerCells.

Definition at line 98 of file simplepicker.h.

References index, and m_cells.

Referenced by BaseComputer::createCategoryCell(), and BaseComputer::loadBuyUpgradeControls().

99  {
100  return m_cells[index];
101  }
virtual const PickerCell* SimplePickerCells::cellAt ( int  index) const
inlinevirtual

Implements PickerCells.

Definition at line 102 of file simplepicker.h.

References index, and m_cells.

103  {
104  return m_cells[index];
105  }
void SimplePickerCells::clear ( void  )
virtual

Definition at line 86 of file simplepicker.cpp.

References i, and m_cells.

Referenced by ~SimplePickerCells().

87 {
88  for (size_t i = 0; i < m_cells.size(); ++i)
89  delete m_cells[i];
90  m_cells.clear();
91 }
virtual int SimplePickerCells::count ( void  ) const
inlinevirtual

Implements PickerCells.

Definition at line 93 of file simplepicker.h.

References m_cells.

Referenced by BaseComputer::createCategoryCell(), and BaseComputer::loadBuyUpgradeControls().

94  {
95  return m_cells.size();
96  }

Member Data Documentation

std::vector< PickerCell* > SimplePickerCells::m_cells
protected

Definition at line 124 of file simplepicker.h.

Referenced by addCell(), cellAt(), clear(), count(), and SimplePickerCells().


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