MCPcopy Create free account
hub / github.com/StrongPC123/Far-Cry-1-Source-Full / _HScriptFunction

Class _HScriptFunction

CryCommon/IScriptSystem.h:754–774  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

752};
753
754class _HScriptFunction
755{
756public:
757 _HScriptFunction(){m_pScriptSystem=0;m_hFunc=0;};
758 _HScriptFunction(IScriptSystem *pSS){m_pScriptSystem=pSS;m_hFunc=0;}
759 _HScriptFunction(IScriptSystem *pSS,HSCRIPTFUNCTION hFunc){m_pScriptSystem=pSS;m_hFunc=0;}
760 ~_HScriptFunction(){ if(m_hFunc)m_pScriptSystem->ReleaseFunc(m_hFunc);m_hFunc=0; }
761 void Init(IScriptSystem *pSS,HSCRIPTFUNCTION hFunc){if(m_hFunc)m_pScriptSystem->ReleaseFunc(m_hFunc);m_hFunc=hFunc;m_pScriptSystem=pSS;}
762 operator HSCRIPTFUNCTION() const
763 {
764 return m_hFunc;
765 }
766 _HScriptFunction& operator =(HSCRIPTFUNCTION f){
767 if(m_hFunc)m_pScriptSystem->ReleaseFunc(m_hFunc);
768 m_hFunc=f;
769 return *this;
770 }
771private:
772 HSCRIPTFUNCTION m_hFunc;
773 IScriptSystem *m_pScriptSystem;
774};
775
776extern "C"{
777 CRYSCRIPTSYSTEM_API IScriptSystem *CreateScriptSystem( ISystem *pSystem,IScriptSystemSink *pSink,IScriptDebugSink *pDebugSink,bool bStdLibs);

Callers

nothing calls this directly

Calls 1

ReleaseFuncMethod · 0.80

Tested by

no test coverage detected