-
Notifications
You must be signed in to change notification settings - Fork 2
/
SCmain.cpp
63 lines (49 loc) · 1.3 KB
/
SCmain.cpp
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
/// <summary>
/// This file has been generated automatically through the module generator provided in the sdk.
/// This file handle the creation of the dynamic library (local use) or the executable (remote use).
/// </summary>
/// <remarks> Copyright 2010 A. Dupont </remarks>
#include <signal.h>
#include <boost/shared_ptr.hpp>
#include <alcommon/albroker.h>
#include <alcommon/almodule.h>
#include <alcommon/albrokermanager.h>
#include <alcommon/altoolsmain.h>
// include the modules
#include "SCModule.h"
#ifdef PC_SIDE
# define ALCALL
#else
# ifdef _WIN32
# define ALCALL __declspec(dllexport)
# else
# define ALCALL
# endif
#endif
extern "C"
{
ALCALL int _createModule(boost::shared_ptr<AL::ALBroker> pBroker)
{
// init broker with the main broker instance
// from the parent executable
AL::ALBrokerManager::setInstance(pBroker->fBrokerManager.lock());
AL::ALBrokerManager::getInstance()->addBroker(pBroker);
// create module instances
AL::ALModule::createModule<SCModule>(pBroker,"SCModule");
return 0;
}
ALCALL int _closeModule()
{
return 0;
}
} // extern "C"
#ifdef PC_SIDE
int main(int argc, char *argv[] )
{
// pointer to createModule
TMainType sig;
sig = &_createModule;
// call main
ALTools::mainFunction("SCModule", argc, argv, sig);
}
#endif