CYIBundle represents a collection of key-value pairs.
Usage Examples
#include <utility/YiBundle.h>

Public Member Functions | |
| CYIBundle () | |
| CYIBundle (const CYIBundle &bundle) | |
| virtual | ~CYIBundle () |
| CYIBundle & | operator= (const CYIBundle &bundle) |
| template<typename T > | |
| void | Put (const CYIString &key, T value) |
| template<typename T > | |
| bool | Get (const CYIString &key, T *pValue) const |
| template<typename T > | |
| T | GetWithDefault (const CYIString &key, const T &defaultValue) const |
| template<typename T > | |
| T | Get (const CYIString &key) const |
| bool | IsKeyPresent (const CYIString &key) const |
| void | Clear () |
Public Member Functions inherited from CYIScriptableObject | |
| CYIScriptableObject () | |
| CYIScriptableObject (const CYIScriptableObject &other) | |
| CYIScriptableObject & | operator= (const CYIScriptableObject &other) |
| virtual | ~CYIScriptableObject () |
| CYIBindingImplementation * | GetBindingImplementation () const |
| void | SetBindingImplementation (CYIBindingImplementation *pBindingImplementation) |
| virtual const CYIRuntimeTypeInfo * | GetRuntimeTypeInfoForScriptObject () const |
Protected Member Functions | |
| virtual void | OnDataModified (const CYIString &key) |
| CYIBundle::CYIBundle | ( | ) |
|
virtual |
| void CYIBundle::Clear | ( | ) |
Clear the CYIBundle.
| bool CYIBundle::Get | ( | const CYIString & | key, |
| T * | pValue | ||
| ) | const |
Retrieve the value for the specified key. Returns true if the key is found, otherwise false.
| T CYIBundle::Get | ( | const CYIString & | key | ) | const |
Retrieve the value for the specified key. If the provided key is not found in the bundle, the default constructor of T is used to construct a default value. A warning is also logged.
| T CYIBundle::GetWithDefault | ( | const CYIString & | key, |
| const T & | defaultValue | ||
| ) | const |
Retrieve the value for the specified key. If the provided key is not found in the bundle, the provided default value is returned.
| bool CYIBundle::IsKeyPresent | ( | const CYIString & | key | ) | const |
Checks for the presence of a key.
|
protectedvirtual |
| void CYIBundle::Put | ( | const CYIString & | key, |
| T | value | ||
| ) |
Add a key-value pair. If the key already exist, it is overwritten.