-
Notifications
You must be signed in to change notification settings - Fork 8
/
PluginAPIManager.h
49 lines (37 loc) · 1.69 KB
/
PluginAPIManager.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#pragma once
#define CSEAPI_NO_CODA 1
#undef CSEAPI_NO_CODA
#include "CSEInterfaceAPI.h"
#include "[Common]\HandShakeStructs.h"
#include "[BGSEEBase]\Script\CodaVM.h"
namespace cse
{
class PluginAPIManager
{
static const UInt8 kInterfaceVersion;
typedef std::map<std::string, std::string> CommandURLMapT;
typedef std::list<CSEConsoleInterface::ConsolePrintCallback> ConsolePrintCallbackListT;
ConsolePrintCallbackListT ConsolePrintCallbacks;
CommandURLMapT ObScriptCommandURLs;
bgsee::script::CodaScriptCommandRegistrar CodaScriptPluginCommandRegistrar;
bool Initialized;
static void ConsolePrintCallbackPrototype(const char* Prefix, const char* Message);
public:
PluginAPIManager();
~PluginAPIManager();
void Initialize(void);
void Deinitailize(void);
const CSEInterface* GetInterface();
UInt32 ConsumeIntelliSenseInterface(componentDLLInterface::CommandTableData* OutCommandData);
void ConsumeConsoleInterface();
void ConsumeScriptInterface(bgsee::script::CodaScriptCommandRegistrar::ListT& OutRegistrars);
static UInt8 GetVersion();
static const void* InitializeInterface(UInt8 InterfaceType);
static void RegisterCommandURL(const char* CommandName, const char* URL);
static void RegisterConsoleCallback(CSEConsoleInterface::ConsolePrintCallback Handler);
static void RegisterScriptCommand(bgsee::script::ICodaScriptCommand* Command);
static void PrintToConsole(const char* Prefix, const char* FormatString, ...);
static void PrintToRenderWindow(const char* Message, float DisplayDuration);
static PluginAPIManager Instance;
};
}