| 752 | }; |
| 753 | |
| 754 | class _HScriptFunction |
| 755 | { |
| 756 | public: |
| 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 | } |
| 771 | private: |
| 772 | HSCRIPTFUNCTION m_hFunc; |
| 773 | IScriptSystem *m_pScriptSystem; |
| 774 | }; |
| 775 | |
| 776 | extern "C"{ |
| 777 | CRYSCRIPTSYSTEM_API IScriptSystem *CreateScriptSystem( ISystem *pSystem,IScriptSystemSink *pSink,IScriptDebugSink *pDebugSink,bool bStdLibs); |
nothing calls this directly
no test coverage detected