You.i Engine
CYIAssetScript Class Reference

Detailed Description

Represents the contents of a script source file.

This asset represents the contents of a script source file and is used to load script source code into a CYIBindingContext.

Note
Because they lack a magic number, script files cannot be decoded from memory when using the CYIAssetLoader class. They can, however, be decoded from memory when using this decoder directly.
See also
CYIAssetDecoderScript
CYIAssetLoader

#include <asset/YiAssetScript.h>

Inheritance diagram for CYIAssetScript:

Public Member Functions

 CYIAssetScript ()
 
 CYIAssetScript (const CYIString &path, PATH_TYPE ePathType=PATH_RELATIVE)
 
virtual ~CYIAssetScript ()
 
void SetScript (const CYIString &script)
 
const CYIStringGetScript ()
 
- Public Member Functions inherited from CYIAsset
virtual ~CYIAsset ()
 
const CYIStringGetPath () const
 
CYIAssetLoadParamsGetLoadParameters () const
 
virtual std::pair< uint32_t, uint32_t > GetApproximateSize () const
 
bool SetName (const CYIString &name)
 
const CYIStringGetName () 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 CYIRuntimeTypeInfoGetRuntimeTypeInfoForScriptObject () const override
 
- Public Member Functions inherited from CYIScriptableObject
 CYIScriptableObject ()
 
 CYIScriptableObject (const CYIScriptableObject &other)
 
CYIScriptableObjectoperator= (const CYIScriptableObject &other)
 
virtual ~CYIScriptableObject ()
 
CYIBindingImplementationGetBindingImplementation () 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
 

Constructor & Destructor Documentation

CYIAssetScript::CYIAssetScript ( )
CYIAssetScript::CYIAssetScript ( const CYIString path,
PATH_TYPE  ePathType = PATH_RELATIVE 
)
virtual CYIAssetScript::~CYIAssetScript ( )
virtual

Member Function Documentation

const CYIString& CYIAssetScript::GetScript ( )

Returns the script source code contained in this asset.

virtual void CYIAssetScript::OnUnload ( )
overrideprotectedvirtual

Reimplemented from CYIAsset.

void CYIAssetScript::SetScript ( const CYIString script)

Sets the script source code contained in this asset.


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