6 #ifndef _INC_cTemplateList_H 
    7 #define _INC_cTemplateList_H 
   12 #include "../GrayLibBase.h" 
   13 #include "../Variant/cVariant.h" 
   14 #include "../Math/cRandomFloat.h" 
   33                 : m_fProbability(fProbability)
 
   34                 , m_vEntryArgs(vEntryArgs)
 
   39                 : m_fProbability(fProbability)
 
   53                 float m_fProbabilityTotal;      
 
   57                 : m_fProbabilityTotal(0)
 
   66                         return m_fProbabilityTotal;
 
   71                         m_fProbabilityTotal = 0;
 
   83                 const cTemplateEntry* GetValAtProbability(
float fProbability) 
const;
 
   89                 bool AddVal(
float fProbability, 
const cVariant& vVal);
 
#define GRAYLIB_LINK
Definition: GrayLibBase.h:35
INT32 HRESULT
_WIN32 style error codes. INT32
Definition: SysTypes.h:465
Definition: cRandomFloat.h:21
Definition: cTemplateList.h:22
cTemplateEntry(float fProbability, const cVariant &vEntryArgs)
Definition: cTemplateList.h:32
cVariant m_vEntryArgs
the actual target of the Template. typically a SYMNAME + args. cVariantArray
Definition: cTemplateList.h:27
ITERATE_t m_iQty
extra arg for Qty of this.
Definition: cTemplateList.h:29
cTemplateEntry(float fProbability=0)
Definition: cTemplateList.h:38
float m_fProbability
probability weight of getting this. (relative to others in list)
Definition: cTemplateList.h:26
Definition: cTemplateList.h:46
const cTemplateEntry & GetValAtC(ITERATE_t index) const
Definition: cTemplateList.h:79
ITERATE_t get_EnumQty() const
Definition: cTemplateList.h:60
void SetClear()
Definition: cTemplateList.h:69
UNITTEST_FRIEND(cTemplateList)
cTemplateEntry & GetValAt(ITERATE_t index)
Definition: cTemplateList.h:75
float get_ProbabilityTotal() const
Definition: cTemplateList.h:64
cTemplateList()
Definition: cTemplateList.h:56
Definition: cVariant.h:26
void RemoveAll()
Clean up.
Definition: cArray.h:230
TYPE & ElementAt(ITERATE_t nIndex)
Definition: cArray.h:167
ITERATE_t GetSize() const noexcept
Definition: cArray.h:137
REF_t ConstElementAt(ITERATE_t nIndex) const
Definition: cArray.h:534
Definition: cIniSection.h:71
UNITTEST2_PREDEF(cQuadtree)
int ITERATE_t
like size_t but signed
Definition: Index.h:28
char FILECHAR_t
a UTF8 char in a file name. like TCHAR
Definition: FileName.h:22
uint16 index
Definition: sample3.cpp:29