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

#include <dol/sLib/s_StateInterfaces.hpp>

Inheritance diagram for sStateIDIf_c:
[legend]

Description

The interface for state IDs.

A state ID is made up of a name string and a unique number, where 0 denotes a null state. Null states do not have any corresponding behaviour. They can be used, for example, if a state holder needs to be initialized but the initial state ID is not known yet.

Definition at line 10 of file s_StateInterfaces.hpp.

Public Member Functions

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.
 

Constructor & Destructor Documentation

◆ ~sStateIDIf_c()

virtual sStateIDIf_c::~sStateIDIf_c ( )
inlinevirtual

Definition at line 12 of file s_StateInterfaces.hpp.

Member Function Documentation

◆ isNull()

virtual bool sStateIDIf_c::isNull ( ) const
pure virtual

Returns whether this is a null state.

Implemented in sStateID_c.

◆ isEqual()

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

Returns whether both states have the same number.

Implemented in sStateID_c.

◆ operator==()

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

Overloaded equality operator, using isEqual.

Implemented in sStateID_c.

◆ operator!=()

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

Overloaded inequality operator, using isEqual.

Implemented in sStateID_c.

◆ isSameName()

virtual bool sStateIDIf_c::isSameName ( const char *  name) const
pure virtual

Returns whether this state ID is called name.

Implemented in sStateID_c, sFStateID_c< T >, and sFStateID_c< dYesNoWindow_c >.

◆ name()

virtual const char * sStateIDIf_c::name ( ) const
pure virtual

Returns the name of this state ID.

Implemented in sStateID_c.

◆ number()

virtual unsigned int sStateIDIf_c::number ( ) const
pure virtual

Returns the number of this state ID.

Implemented in sStateID_c.