![]() |
Gray C++ Libraries
0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
|
#include <cTemplateList.h>
Public Member Functions | |
| cTemplateList () | |
| ITERATE_t | get_EnumQty () const |
| float | get_ProbabilityTotal () const |
| void | SetClear () |
| cTemplateEntry & | GetValAt (ITERATE_t index) |
| const cTemplateEntry & | GetValAtC (ITERATE_t index) const |
| const cTemplateEntry * | GetValAtProbability (float fProbability) const |
| const cTemplateEntry * | GetValAtScale (float fRandValScale) const |
| const cTemplateEntry * | GetValRandom (cRandomFloat *pRand=nullptr) const |
| cStringA | GetValString (void) |
| bool | AddValAt (ITERATE_t iIndex, float fProbability, const cVariant &vVal) |
| bool | AddVal (float fProbability, const cVariant &vVal) |
| bool | AddVal (const cVariant &vVal) |
| HRESULT | SetEntryDef (ITERATE_t iEntry, const cVariant &vVal) |
| HRESULT | SetEntryQty (ITERATE_t iEntry, ITERATE_t iQty) |
| HRESULT | SetEntryChance (ITERATE_t iEntry, float fChance) |
| HRESULT | s_LoadPropsTemplate (cIniSectionData *pSection) |
| HRESULT | LoadTemplateFile (const FILECHAR_t *pszFileName) |
| UNITTEST_FRIEND (cTemplateList) | |
Probability distribution of values.
|
inline |
| bool GrayLib::cTemplateList::AddVal | ( | const cVariant & | vVal | ) |
Add a new item defining the template.
| bool GrayLib::cTemplateList::AddVal | ( | float | fProbability, |
| const cVariant & | vVal | ||
| ) |
vVal.IsEmpty() is OK !
| bool GrayLib::cTemplateList::AddValAt | ( | ITERATE_t | iIndex, |
| float | fProbability, | ||
| const cVariant & | vVal | ||
| ) |
vVal.IsEmpty() is OK !
|
inline |
|
inline |
|
inline |
|
inline |
| const cTemplateEntry * GrayLib::cTemplateList::GetValAtProbability | ( | float | fProbability | ) | const |
Traverse all the values up to this Probability. What if there are none ?!
| const cTemplateEntry * GrayLib::cTemplateList::GetValAtScale | ( | float | fRandValScale | ) | const |
fRandVal = 0 to 1
| const cTemplateEntry * GrayLib::cTemplateList::GetValRandom | ( | cRandomFloat * | pRand = nullptr | ) | const |
| cStringA GrayLib::cTemplateList::GetValString | ( | void | ) |
Get one string to represent the entire template list. May get WAY too long!
| HRESULT GrayLib::cTemplateList::LoadTemplateFile | ( | const FILECHAR_t * | pszFileName | ) |
Load the template from a file.
| HRESULT GrayLib::cTemplateList::s_LoadPropsTemplate | ( | cIniSectionData * | pSection | ) |
Take the whole line
|
inline |
| GrayLib::cTemplateList::UNITTEST_FRIEND | ( | cTemplateList | ) |