HoverRace  2.0
Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
HoverRace::Client::HoverScript::ClientScriptCore Class Reference

#include <ClientScriptCore.h>

+ Inheritance diagram for HoverRace::Client::HoverScript::ClientScriptCore:

Public Member Functions

 ClientScriptCore ()
 
virtual ~ClientScriptCore ()
 
Script::CoreReset () override
 Reset changes to the global environment. More...
 
- Public Member Functions inherited from HoverRace::Script::Core
 Core ()
 
 Core (const Core &core)=delete
 
virtual ~Core ()
 
void ActivateSandbox ()
 Activate the security sandbox. More...
 
OutHandle AddOutput (std::shared_ptr< std::ostream > out)
 Redirect output to a stream. More...
 
int Call (int numParams=0, Help::HelpHandler *helpHandler=nullptr)
 Pop a function off the stack and execute it. More...
 
void CallAndPrint (int numParams=0, Help::HelpHandler *helpHandler=nullptr)
 
void Compile (const Chunk &chunk)
 Compile a chunk of code. More...
 
template<class ReturnPolicy = PrintReturn>
void Execute (const Chunk &chunk, Help::HelpHandler *helpHandler=nullptr, ReturnPolicy rp=ReturnPolicy())
 Safely compile and execute a chunk of code. More...
 
lua_State * GetState () const
 
std::string GetVersionString () const
 Retrieve the full scripting version string (name and version). More...
 
template<class ReturnPolicy = PrintReturn>
int Invoke (int numParams=0, Help::HelpHandler *helpHandler=nullptr, ReturnPolicy rp=ReturnPolicy())
 Pop a function off the stack and execute it, printing any return values. More...
 
Coreoperator= (const Core &)=delete
 
void Print (const std::string &s)
 Print a message to all registered output streams. More...
 
void PrintStack ()
 
void RemoveOutput (const OutHandle &handle)
 
void ReqHelp (const std::string &className)
 Request the documentation for a scripting API class. More...
 
void ReqHelp (const std::string &className, const std::string &methodName)
 Request the documentation for a scripting API class or method. More...
 

Private Types

using SUPER = Script::Core
 

Private Member Functions

void RegisterMiscClasses ()
 Register miscellaneous classes that don't have peers and aren't associated with anything else. More...
 

Private Attributes

bool classesRegistered
 

Additional Inherited Members

- Public Types inherited from HoverRace::Script::Core
using OutHandle = outs_t::iterator
 
- Public Attributes inherited from HoverRace::Script::Core
std::unique_ptr< luabind::object > NIL
 
- Static Public Attributes inherited from HoverRace::Script::Core
static const std::string DEFAULT_CHUNK_NAME
 

Member Typedef Documentation

Constructor & Destructor Documentation

HoverRace::Client::HoverScript::ClientScriptCore::ClientScriptCore ( )
inline
virtual HoverRace::Client::HoverScript::ClientScriptCore::~ClientScriptCore ( )
inlinevirtual

Member Function Documentation

void HoverRace::Client::HoverScript::ClientScriptCore::RegisterMiscClasses ( )
private

Register miscellaneous classes that don't have peers and aren't associated with anything else.

Script::Core * HoverRace::Client::HoverScript::ClientScriptCore::Reset ( )
overridevirtual

Reset changes to the global environment.

When creating a new instance, this member function must be called at least once before executing any scripts. This is used for fixing accidental changes to globals. Note that this will effectively deactivate the security sandbox. Call ActivateSandbox() to reactivate if necessary. The state returned by GetState() is otherwise unchanged.

Returns
The same instance.

Reimplemented from HoverRace::Script::Core.

Member Data Documentation

bool HoverRace::Client::HoverScript::ClientScriptCore::classesRegistered
private

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