Manages named integer IDs. More...
#include <SNamedValue.h>
Public Member Functions | |
void | Init2 (const NAMEDVALUE *pValue, int nCount, BOOL bSorted) |
Initializes named IDs from an array. | |
void | Init3 (const LPCWSTR *pNames, const int *nIDs, int nCount, BOOL bSorted) |
Initializes named IDs from arrays of names and IDs. | |
![]() | |
virtual BOOL | Init (SXmlNode xmlNode) |
Initializes the named values from an XML node. | |
int | String2Value (const SStringW &strName) const |
Converts a string name to its corresponding value. | |
BOOL | FindValue (const SStringW &strName, int &value) const |
Finds the value associated with a given name. | |
int | GetAt (const int idx) const |
Retrieves the value at a specific index. | |
size_t | Merge (const SNamedValue &src) |
Merges the named values from another SNamedValue object. | |
UINT | GetCount () const |
Retrieves the number of named values. | |
Additional Inherited Members | |
![]() | |
typedef TNAMEDVALUE< int > | NAMEDVALUE |
![]() | |
static int | Compare (const void *p1, const void *p2) |
Comparison function for sorting and searching. | |
![]() | |
SArray< NAMEDVALUE > | m_lstNamedValue |
Manages named integer IDs.
Definition at line 192 of file SNamedValue.h.
void SNamedID::Init2 | ( | const NAMEDVALUE * | pValue, |
int | nCount, | ||
BOOL | bSorted ) |
Initializes named IDs from an array.
pValue | Array of named values. |
nCount | Number of elements in the array. |
bSorted | TRUE if the array is already sorted, FALSE otherwise. |
Definition at line 163 of file SNamedValue.cpp.
void SNamedID::Init3 | ( | const LPCWSTR * | pNames, |
const int * | nIDs, | ||
int | nCount, | ||
BOOL | bSorted ) |
Initializes named IDs from arrays of names and IDs.
pNames | Array of names. |
nIDs | Array of IDs. |
nCount | Number of elements in the arrays. |
bSorted | TRUE if the arrays are already sorted, FALSE otherwise. |
Definition at line 177 of file SNamedValue.cpp.