Represents the contents of a JSON file or string.
This asset provides access to the parsed data from a JSON file or string.
#include <asset/YiAssetJSON.h>

Public Member Functions | |
| CYIAssetJSON () | |
| CYIAssetJSON (const CYIString &path, PATH_TYPE ePathType=PATH_RELATIVE) | |
| virtual | ~CYIAssetJSON () |
| void | SetJSONDocument (const std::shared_ptr< yi::rapidjson::Document > &pDocument) |
| const std::shared_ptr< yi::rapidjson::Document > & | GetJSONDocument () const |
| virtual std::pair< uint32_t, uint32_t > | GetApproximateSize () const override |
Public Member Functions inherited from CYIAsset | |
| virtual | ~CYIAsset () |
| const CYIString & | GetPath () const |
| CYIAssetLoadParams * | GetLoadParameters () const |
| bool | SetName (const CYIString &name) |
| const CYIString & | GetName () const |
| bool | Load () |
| void | Unload () |
| bool | IsLoaded () const |
| bool | Equals (const std::shared_ptr< CYIAsset > &pAsset) |
| virtual bool | Prepare () |
Public Member Functions inherited from CYIScriptableRTTIObject | |
| CYIScriptableRTTIObject () | |
| virtual | ~CYIScriptableRTTIObject () |
| virtual const CYIRuntimeTypeInfo * | GetRuntimeTypeInfoForScriptObject () const override |
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) |
Protected Member Functions | |
| virtual void | OnUnload () override |
Protected Member Functions inherited from CYIAsset | |
| CYIAsset () | |
| ssize_t | GetID () const |
| void | SetPath (const CYIString &path, PATH_TYPE ePathType) |
| void | SetApproximateSize (uint32_t nSize) |
| void | SetLoaded (bool bAssetLoaded) |
| void | SetLoadParameters (std::unique_ptr< CYIAssetLoadParams > pParams) |
| virtual void | OnLoad () |
Protected Member Functions inherited from CYIScriptableRTTIObject | |
| virtual std::pair< const CYIRuntimeTypeInfo *, const void * > | GetRuntimeTypeInfoWithObject () const =0 |
Additional Inherited Members | |
Public Types inherited from CYIAsset | |
| enum | PATH_TYPE { PATH_ABSOLUTE = 0, PATH_RELATIVE } |
Static Protected Attributes inherited from CYIAsset | |
| static ssize_t | INVALID_ID |
| CYIAssetJSON::CYIAssetJSON | ( | ) |
| CYIAssetJSON::CYIAssetJSON | ( | const CYIString & | path, |
| PATH_TYPE | ePathType = PATH_RELATIVE |
||
| ) |
|
virtual |
|
overridevirtual |
Calculates and returns the approximate number of bytes currently used by this asset. The first item of the returned pair object represents the memory currently taken in the CPU main memory, and the second item of the returned pair object represents the memory currently taken in the GPU memory.
Reimplemented from CYIAsset.
| const std::shared_ptr<yi::rapidjson::Document>& CYIAssetJSON::GetJSONDocument | ( | ) | const |
Returns the parsed JSON document associated with this asset.
|
overrideprotectedvirtual |
Reimplemented from CYIAsset.
| void CYIAssetJSON::SetJSONDocument | ( | const std::shared_ptr< yi::rapidjson::Document > & | pDocument | ) |
Sets the parsed JSON documented associated with this asset.