soui 5.0.0.1
Soui5 Doc
 
Loading...
Searching...
No Matches
SState2Index Class Reference

Maps skin states to indices. More...

#include <SSkinObjBase.h>

Public Member Functions

 SState2Index ()
 Default constructor.
 
 SState2Index (const SState2Index &src)
 Copy constructor.
 
int GetIndex (DWORD dwState, bool checkAsPushdown) const
 Gets the index for a given state.
 
BOOL Init (IXmlNode *pNode)
 Initializes the state-to-index mapping from an XML node.
 

Static Public Member Functions

static int GetDefIndex (DWORD dwState, bool checkAsPushdown=false)
 Gets the default index for a given state.
 
static DWORD String2State (const SStringW &strState)
 Converts a string representation of a state to a DWORD value.
 

Protected Attributes

SMap< DWORD, int > m_mapOfStates
 

Detailed Description

Maps skin states to indices.

This class provides functionality to map skin states to their corresponding indices. It can be initialized from an XML node and supports default state-to-index mappings.

Definition at line 19 of file SSkinObjBase.h.

Constructor & Destructor Documentation

◆ SState2Index() [1/2]

SState2Index::SState2Index ( )
inline

Default constructor.

Definition at line 24 of file SSkinObjBase.h.

◆ SState2Index() [2/2]

SNSBEGIN SState2Index::SState2Index ( const SState2Index & src)

Copy constructor.

Parameters
srcSource SState2Index object to copy from.

Definition at line 8 of file SSkinObjBase.cpp.

Member Function Documentation

◆ GetDefIndex()

int SState2Index::GetDefIndex ( DWORD dwState,
bool checkAsPushdown = false )
static

Gets the default index for a given state.

Parameters
dwStateState to get the default index for.
checkAsPushdownFlag to check if the state should be treated as pushdown.
Returns
Default index corresponding to the state.

Definition at line 40 of file SSkinObjBase.cpp.

◆ GetIndex()

int SState2Index::GetIndex ( DWORD dwState,
bool checkAsPushdown ) const

Gets the index for a given state.

Parameters
dwStateState to get the index for.
checkAsPushdownFlag to check if the state should be treated as pushdown.
Returns
Index corresponding to the state.

Definition at line 61 of file SSkinObjBase.cpp.

◆ Init()

BOOL SState2Index::Init ( IXmlNode * pNode)

Initializes the state-to-index mapping from an XML node.

Parameters
pNodePointer to the XML node containing the state mappings.
Returns
TRUE if initialization is successful, FALSE otherwise.

Definition at line 13 of file SSkinObjBase.cpp.

◆ String2State()

DWORD SState2Index::String2State ( const SStringW & strState)
static

Converts a string representation of a state to a DWORD value.

Parameters
strStateString representation of the state.
Returns
DWORD value representing the state.

Definition at line 85 of file SSkinObjBase.cpp.

Member Data Documentation

◆ m_mapOfStates

SMap<DWORD, int> SState2Index::m_mapOfStates
protected

Definition at line 65 of file SSkinObjBase.h.


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