summaryrefslogtreecommitdiffstats
path: root/source/squirrelbindings/SquirrelBaseClass.h
diff options
context:
space:
mode:
authorAlexander Harkness <bearbin@gmail.com>2013-07-29 13:13:03 +0200
committerAlexander Harkness <bearbin@gmail.com>2013-07-29 13:13:03 +0200
commit53e22b11857fed62e2313d6d84d90f88ed412ffb (patch)
treec61e56725da7dff0154d566722651e2c39c9d6c6 /source/squirrelbindings/SquirrelBaseClass.h
parentWebAdmin: Removed the duplicate memory usage querying (diff)
downloadcuberite-53e22b11857fed62e2313d6d84d90f88ed412ffb.tar
cuberite-53e22b11857fed62e2313d6d84d90f88ed412ffb.tar.gz
cuberite-53e22b11857fed62e2313d6d84d90f88ed412ffb.tar.bz2
cuberite-53e22b11857fed62e2313d6d84d90f88ed412ffb.tar.lz
cuberite-53e22b11857fed62e2313d6d84d90f88ed412ffb.tar.xz
cuberite-53e22b11857fed62e2313d6d84d90f88ed412ffb.tar.zst
cuberite-53e22b11857fed62e2313d6d84d90f88ed412ffb.zip
Diffstat (limited to '')
-rw-r--r--source/squirrelbindings/SquirrelBaseClass.h132
1 files changed, 66 insertions, 66 deletions
diff --git a/source/squirrelbindings/SquirrelBaseClass.h b/source/squirrelbindings/SquirrelBaseClass.h
index 36f532611..fb5e95c05 100644
--- a/source/squirrelbindings/SquirrelBaseClass.h
+++ b/source/squirrelbindings/SquirrelBaseClass.h
@@ -1,66 +1,66 @@
-
-#pragma once
-
-
-
-
-#ifdef USE_SQUIRREL
-
-
-
-
-
-#include "SquirrelBindings.h"
-#include "../Plugin_Squirrel.h"
-#include "../PluginManager.h"
-#include "../Root.h"
-#include "../SquirrelCommandBinder.h"
-
-
-
-
-
-// The baseclass for squirrel plugins
-class cSquirrelBaseClass
-{
-public:
- cSquirrelBaseClass()
- : m_Instance(0)
- {
- }
-
- void setInstance(cPlugin_Squirrel *a_Instance)
- {
- m_Instance = a_Instance;
- }
-
- void AddHook(short a_Hook)
- {
- if(m_Instance)
- cRoot::Get()->GetPluginManager()->AddHook(m_Instance, (cPluginManager::PluginHook) a_Hook);
- }
-
- void AddCommand( std::string a_Command, std::string a_Description, std::string a_Permission )
- {
- if(m_Instance) m_Instance->AddCommand(a_Command, a_Description, a_Permission);
- }
-
- bool BindCommand( const std::string a_Command, const std::string a_Permission, Sqrat::Function a_Callback)
- {
- if(!m_Instance) return false;
- return cRoot::Get()->GetPluginManager()->GetSquirrelCommandBinder()->BindCommand(a_Command, a_Permission, m_Instance, a_Callback);
- }
-
-protected:
- cPlugin_Squirrel *m_Instance;
-};
-
-
-
-
-
-#endif // USE_SQUIRREL
-
-
-
-
+
+#pragma once
+
+
+
+
+#ifdef USE_SQUIRREL
+
+
+
+
+
+#include "SquirrelBindings.h"
+#include "../Plugin_Squirrel.h"
+#include "../PluginManager.h"
+#include "../Root.h"
+#include "../SquirrelCommandBinder.h"
+
+
+
+
+
+// The baseclass for squirrel plugins
+class cSquirrelBaseClass
+{
+public:
+ cSquirrelBaseClass()
+ : m_Instance(0)
+ {
+ }
+
+ void setInstance(cPlugin_Squirrel *a_Instance)
+ {
+ m_Instance = a_Instance;
+ }
+
+ void AddHook(short a_Hook)
+ {
+ if(m_Instance)
+ cRoot::Get()->GetPluginManager()->AddHook(m_Instance, (cPluginManager::PluginHook) a_Hook);
+ }
+
+ void AddCommand( std::string a_Command, std::string a_Description, std::string a_Permission )
+ {
+ if(m_Instance) m_Instance->AddCommand(a_Command, a_Description, a_Permission);
+ }
+
+ bool BindCommand( const std::string a_Command, const std::string a_Permission, Sqrat::Function a_Callback)
+ {
+ if(!m_Instance) return false;
+ return cRoot::Get()->GetPluginManager()->GetSquirrelCommandBinder()->BindCommand(a_Command, a_Permission, m_Instance, a_Callback);
+ }
+
+protected:
+ cPlugin_Squirrel *m_Instance;
+};
+
+
+
+
+
+#endif // USE_SQUIRREL
+
+
+
+