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

Manages named integer IDs. More...

#include <SNamedValue.h>

Inheritance diagram for SNamedID:
SNamedValue< int, SIntParser >

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.
 
- Public Member Functions inherited from SNamedValue< int, SIntParser >
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

- Public Types inherited from SNamedValue< int, SIntParser >
typedef TNAMEDVALUE< int > NAMEDVALUE
 
- Static Protected Member Functions inherited from SNamedValue< int, SIntParser >
static int Compare (const void *p1, const void *p2)
 Comparison function for sorting and searching.
 
- Protected Attributes inherited from SNamedValue< int, SIntParser >
SArray< NAMEDVALUEm_lstNamedValue
 

Detailed Description

Manages named integer IDs.

Definition at line 192 of file SNamedValue.h.

Member Function Documentation

◆ Init2()

void SNamedID::Init2 ( const NAMEDVALUE * pValue,
int nCount,
BOOL bSorted )

Initializes named IDs from an array.

Parameters
pValueArray of named values.
nCountNumber of elements in the array.
bSortedTRUE if the array is already sorted, FALSE otherwise.

Definition at line 163 of file SNamedValue.cpp.

◆ Init3()

void SNamedID::Init3 ( const LPCWSTR * pNames,
const int * nIDs,
int nCount,
BOOL bSorted )

Initializes named IDs from arrays of names and IDs.

Parameters
pNamesArray of names.
nIDsArray of IDs.
nCountNumber of elements in the arrays.
bSortedTRUE if the arrays are already sorted, FALSE otherwise.

Definition at line 177 of file SNamedValue.cpp.


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