Gray C++ Libraries  0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
GrayLib::cVariantMap Class Reference

#include <cVarMap.h>

Inheritance diagram for GrayLib::cVariantMap:
GrayLib::cVarMap Gray::cRefBase IScriptableEnumerator IScriptableGetter IScriptableSetter GrayLib::cVariantCommon IUnknown

Public Member Functions

 cVariantMap ()
 
 cVariantMap (const cVarMap &rMap)
 
- Public Member Functions inherited from GrayLib::cVarMap
virtual cScriptableInterfaceDefPtr _stdcall get_ScriptInterfaceDef () const
 
 cVarMap ()
 
 cVarMap (const cVarMap &rMap)
 
size_t GetHeapStats (OUT ITERATE_t &iAllocCount) const
 
HRESULT SerializeOutput (cStreamOutput &file) const
 
HRESULT SerializeInput (cStreamInput &file)
 
ITERATE_t get_KeyQty () const
 
cVarTuplePtr GetMapElement (ITERATE_t index) const
 
const cVariantGetMapElementVal (ITERATE_t index) const
 
cVarTuplePtr FindKeyPtrA (cAtomRef aKey) const
 
cVarTuplePtr FindKeyPtr (const ATOMCHAR_t *pszKey) const
 
cVarTuplePtr MakeKeyPtrA (cAtomRef aKey)
 
cVarTuplePtr MakeKeyPtr (const ATOMCHAR_t *pszKey)
 
cVarTuplePtr FindKeyPtrX (const ATOMCHAR_t *pszKeyX) const
 
cVarTuplePtr MakeKeyPtrX (const ATOMCHAR_t *pszKeyX)
 
bool RemoveKeyA (cAtomRef aKey)
 
bool RemoveKey (const ATOMCHAR_t *pszKey)
 
HRESULT SetValA (cAtomRef aKey, const cVariant &vVal)
 
HRESULT SetValNULL (cAtomRef aKey)
 
HRESULT SetValVarN (const ATOMCHAR_t *pszKey, const cVariant &vVal)
 
HRESULT SetValVar (const ATOMCHAR_t *pszKey, const cVariant &vVal)
 
HRESULT SetValStr (const ATOMCHAR_t *pszKey, const ATOMCHAR_t *pszVal)
 
const cVariantGetValVar (const ATOMCHAR_t *pszKey) const
 
const cVariantoperator[] (const ATOMCHAR_t *pszKey) const
 
cVariantRefValVar (const ATOMCHAR_t *pszKey)
 
cVariantoperator[] (const ATOMCHAR_t *pszKey)
 
cStringA GetValAsStr (const ATOMCHAR_t *pszKey) const
 
UINT32 GetValAsDWord (const ATOMCHAR_t *pszKey, UINT32 uValDefault=0) const
 
int GetValAsInt (const ATOMCHAR_t *pszKey, int iValDefault=0) const
 
float GetValAsFloat (const ATOMCHAR_t *pszKey, float fValDefault=0.0f) const
 
STDMETHOD() s_GetEnum (ITERATE_t i, OUT cStringA &rsPropName, OUT cVariant &rvValRet)
 
STDMETHOD() s_GetByName (const ATOMCHAR_t *pszPropName, OUT cVariant &vValRet)
 
STDMETHOD() s_Put (const ATOMCHAR_t *pszPropName, const cVariant &vValSet)
 
StrLen_t AddHtmlArgsLen (const ATOMCHAR_t *pszArgs)
 
ITERATE_t FindValAsStr (const ATOMCHAR_t *pszVal) const
 
ITERATE_t FindValAsInt (int iVal, const ATOMCHAR_t *pszPrefix=nullptr) const
 
void s_WriteTags (IScriptableSetter &s, const ATOMCHAR_t *pszKeyPrefix=nullptr) const
 
ITERATE_t AddTuple (cVarTuple *pVar)
 
HRESULT s_InvokeExtProp (const cVariant &vArgs, cVariant &vValRet)
 
HRESULT LoadTuple (IScriptableEnumerator &section)
 
HRESULT DumpTagsHead (cStreamOutput *pOut, const ATOMCHAR_t *pszName) const
 
void FixWeird ()
 
StrLen_t GetStr (ATOMCHAR_t *pszArgs, StrLen_t nLenMax, const ATOMCHAR_t *pszLineBreak=nullptr) const
 
HRESULT SetStr (const ATOMCHAR_t *pszArgs)
 
COMPARE_t Compare (const cVarMap *pMap) const
 
HRESULT SetFromArrays (int iQty, const char **ppszNames, const char **ppszVals)
 
 UNITTEST2_PREDEF (cVarMap)
 
- Public Member Functions inherited from Gray::cRefBase
 cRefBase (int iRefCount=0) noexcept
 
virtual ~cRefBase ()
 
int get_RefCount () const noexcept
 
HASHCODE_t get_HashCode () const noexcept
 
 STDMETHOD_ (HASHCODE_t, get_HashCodeX)() const noexcept
 
virtual void onFinalRelease ()
 
bool isValidObj () const noexcept
 
 STDMETHOD_ (ULONG, AddRef)(void) override
 
 STDMETHOD_ (ULONG, Release)(void) override
 
STDMETHOD() QueryInterface (const IID &riid, void __RPC_FAR *__RPC_FAR *ppvObject) override
 
void IncRefCount ()
 
void DecRefCount ()
 
bool isStaticConstruct () const noexcept
 
void StaticConstruct ()
 
void StaticDestruct ()
 
bool isDestructing () noexcept
 
void SetDestructing ()
 

Additional Inherited Members

- Public Types inherited from GrayLib::cVarMap
enum  M_TYPE_ { M_QTY }
 
- Public Types inherited from GrayLib::cVariantCommon
typedef INT32 CYS_t
 type for 2 fixed point int for currency/money. More...
 
typedef INT64 CY_t
 type for 4 fixed point int for currency/money. More...
 
- Static Public Member Functions inherited from GrayLib::cVarMap
static cAtomRef GRAYCALL MakeKeyNameRef (const ATOMCHAR_t *&pszKey, bool bMustExist, bool bAllowDots)
 
- Static Public Member Functions inherited from GrayLib::cVariantCommon
static StrLen_t GRAYCALL CopyLenQ (ATOMCHAR_t *pszDst, const ATOMCHAR_t *pszSrc, StrLen_t iLenMax, STR_BLOCK_TYPE eBlock)
 When converting to string. More...
 
- Public Attributes inherited from GrayLib::cVarMap
cArraySortHash< cVarTuple, ATOMCODE_tm_aTuples
 Hash sorted by ATOMCODE_t. NOT alphabetic sort. More...
 
- Static Public Attributes inherited from GrayLib::cVarMap
static const ATOMCHAR_tk_pszKeyDefault = "_"
 Default name for keys with not valid names. "_" (or no name) More...
 
static cScriptableInterfaceDef sm_ScriptInterfaceDef
 
static cScriptableMethod sm_Methods [M_QTY+1]
 
- Static Public Attributes inherited from GrayLib::cVariantCommon
static const ITERATE_t k_MaxElements = 64*1024
 (arbitrary) Max elements that may be parsed in array or map. More...
 
static const ITERATE_t k_MaxElements2 = 256
 arbitrary max for simple things. More...
 
static const CYS_t k_CYSMul = 100
 2 fixed places = cents. CYS_t More...
 
static const CY_t k_CYMul = 10000
 4 fixed places = hundredths of a cent. CY_t More...
 

Detailed Description

VARTYPE_Map. cVariantMapPtr Allow cRefPtr ref to this, so we can fully support JSON in a variant.

Constructor & Destructor Documentation

◆ cVariantMap() [1/2]

GrayLib::cVariantMap::cVariantMap ( )
inline

◆ cVariantMap() [2/2]

GrayLib::cVariantMap::cVariantMap ( const cVarMap rMap)
inline

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