NSMBW-Decomp
A decompilation of New Super Mario Bros. Wii
Loading...
Searching...
No Matches
sStateID_c Class Reference

#include <dol/sLib/s_StateID.hpp>

Inheritance diagram for sStateID_c:
[legend]

Description

A generic implementation of a state ID.

It simply contains a name string and a unique number.

Definition at line 7 of file s_StateID.hpp.

Classes

class  NumberMemo_c
 

Public Member Functions

 sStateID_c (const char *name)
 
virtual bool isNull () const
 Returns whether this is a null state.
 
virtual bool isEqual (const sStateIDIf_c &other) const
 Returns whether both states have the same number.
 
virtual bool operator== (const sStateIDIf_c &other) const
 Overloaded equality operator, using isEqual.
 
virtual bool operator!= (const sStateIDIf_c &other) const
 Overloaded inequality operator, using isEqual.
 
virtual bool isSameName (const char *name) const
 Returns whether this state ID is called name.
 
virtual const char * name () const
 Returns the name of this state ID.
 
virtual unsigned int number () const
 Returns the number of this state ID.
 
virtual bool isNull () const =0
 Returns whether this is a null state.
 
virtual bool isEqual (const sStateIDIf_c &other) const =0
 Returns whether both states have the same number.
 
virtual bool operator== (const sStateIDIf_c &other) const =0
 Overloaded equality operator, using isEqual.
 
virtual bool operator!= (const sStateIDIf_c &other) const =0
 Overloaded inequality operator, using isEqual.
 
virtual bool isSameName (const char *name) const =0
 Returns whether this state ID is called name.
 
virtual const char * name () const =0
 Returns the name of this state ID.
 
virtual unsigned int number () const =0
 Returns the number of this state ID.
 

Protected Attributes

const char * mpName
 The name of this state ID.
 
unsigned int mNumber
 The number of this state ID.
 

Static Protected Attributes

static NumberMemo_c sm_numberMemo
 Used to give each state a unique number.
 

Constructor & Destructor Documentation

◆ sStateID_c()

sStateID_c::sStateID_c ( const char *  name)

Definition at line 7 of file s_StateID.cpp.

◆ ~sStateID_c()

sStateID_c::~sStateID_c ( )
virtual

Definition at line 12 of file s_StateID.cpp.

Member Function Documentation

◆ isNull()

bool sStateID_c::isNull ( ) const
virtual

Returns whether this is a null state.

Implements sStateIDIf_c.

Definition at line 14 of file s_StateID.cpp.

◆ isEqual()

bool sStateID_c::isEqual ( const sStateIDIf_c other) const
virtual

Returns whether both states have the same number.

Implements sStateIDIf_c.

Definition at line 18 of file s_StateID.cpp.

◆ operator==()

bool sStateID_c::operator== ( const sStateIDIf_c other) const
virtual

Overloaded equality operator, using isEqual.

Implements sStateIDIf_c.

Definition at line 22 of file s_StateID.cpp.

◆ operator!=()

bool sStateID_c::operator!= ( const sStateIDIf_c other) const
virtual

Overloaded inequality operator, using isEqual.

Implements sStateIDIf_c.

Definition at line 26 of file s_StateID.cpp.

◆ isSameName()

bool sStateID_c::isSameName ( const char *  name) const
virtual

Returns whether this state ID is called name.

Implements sStateIDIf_c.

Reimplemented in sFStateID_c< T >, and sFStateID_c< dYesNoWindow_c >.

Definition at line 30 of file s_StateID.cpp.

◆ name()

const char * sStateID_c::name ( ) const
virtual

Returns the name of this state ID.

Implements sStateIDIf_c.

Definition at line 35 of file s_StateID.cpp.

◆ number()

unsigned int sStateID_c::number ( ) const
virtual

Returns the number of this state ID.

Implements sStateIDIf_c.

Definition at line 39 of file s_StateID.cpp.

Member Data Documentation

◆ mpName

const char* sStateID_c::mpName
protected

The name of this state ID.

Definition at line 33 of file s_StateID.hpp.

◆ mNumber

unsigned int sStateID_c::mNumber
protected

The number of this state ID.

Definition at line 34 of file s_StateID.hpp.

◆ sm_numberMemo

sStateID_c::NumberMemo_c sStateID_c::sm_numberMemo
staticprotected

Used to give each state a unique number.

Definition at line 36 of file s_StateID.hpp.