ManaPlus
Public Member Functions
IgnoreChoicesListModel Class Reference

#include <ignorechoiceslistmodel.h>

Inheritance diagram for IgnoreChoicesListModel:
ListModel

Public Member Functions

 IgnoreChoicesListModel ()
 
int getNumberOfElements ()
 
std::string getElementAt (int i)
 
- Public Member Functions inherited from ListModel
 ListModel ()
 
virtual ~ListModel ()
 

Detailed Description

Class for choosing one of the various ‘what to do when ignoring a player’ options

Definition at line 37 of file ignorechoiceslistmodel.h.

Constructor & Destructor Documentation

◆ IgnoreChoicesListModel()

IgnoreChoicesListModel::IgnoreChoicesListModel ( )
inline

Definition at line 40 of file ignorechoiceslistmodel.h.

40  :
41  ListModel()
42  { }
ListModel()
Definition: listmodel.h:82

Member Function Documentation

◆ getElementAt()

std::string IgnoreChoicesListModel::getElementAt ( int  i)
inlinevirtual

Gets an element at a certain index in the list.

Parameters
iAn index in the list.
Returns
An element as a string at the a certain index.

Implements ListModel.

Definition at line 52 of file ignorechoiceslistmodel.h.

53  {
54  if (i >= getNumberOfElements() || i < 0)
55  return "???";
56 
58  [i]->mDescription;
59  }
std::vector< PlayerIgnoreStrategy * > * getPlayerIgnoreStrategies()
PlayerRelationsManager playerRelations

References getNumberOfElements(), PlayerRelationsManager::getPlayerIgnoreStrategies(), and playerRelations.

◆ getNumberOfElements()

int IgnoreChoicesListModel::getNumberOfElements ( )
inlinevirtual

Gets the number of elements in the list.

Returns
The number of elements in the list

Implements ListModel.

Definition at line 46 of file ignorechoiceslistmodel.h.

47  {
49  getPlayerIgnoreStrategies()->size());
50  }
#define CAST_S32
Definition: cast.h:30
int size()
Definition: emotedb.cpp:306

References CAST_S32, playerRelations, and EmoteDB::size().

Referenced by getElementAt().


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