diff options
author | Alex Zolotarev <deathbaba@gmail.com> | 2011-03-20 06:20:31 +0300 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 01:13:54 +0300 |
commit | 3d2498ee2119e667580a54074126f7eff12f5aca (patch) | |
tree | cb35082737d6075de58b78ae5a1fe2b5b62cdcff /bada/Sloynik/src/SloynikEntry.cpp | |
parent | 1e7be338c611ee9f6ea8a2c139b2eb9ac242207f (diff) |
- Created [generator],[generator_tests] and moved indexer_tool to [generator_tool]
Diffstat (limited to 'bada/Sloynik/src/SloynikEntry.cpp')
-rw-r--r-- | bada/Sloynik/src/SloynikEntry.cpp | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/bada/Sloynik/src/SloynikEntry.cpp b/bada/Sloynik/src/SloynikEntry.cpp new file mode 100644 index 0000000000..f100f5c01c --- /dev/null +++ b/bada/Sloynik/src/SloynikEntry.cpp @@ -0,0 +1,45 @@ +/** + * This file contains the bada application entry point. + */ +#include "Sloynik.h" + +using namespace Osp::Base; +using namespace Osp::Base::Collection; + +#ifdef __cplusplus +extern "C" +{ +#endif // __cplusplus + +_EXPORT_ int OspMain(int argc, char *pArgv[]); + +/** + * The entry function of bada application called by the operating system. + */ +int +OspMain(int argc, char *pArgv[]) +{ + result r = E_SUCCESS; + + AppLog("Application started."); + ArrayList* pArgs = new ArrayList(); + pArgs->Construct(); + for (int i = 0; i < argc; i++) + pArgs->Add(*(new String(pArgv[i]))); + + r = Osp::App::Application::Execute(Sloynik::CreateInstance, pArgs); + if (IsFailed(r)) + { + AppLogException("Application execution failed-[%s].", GetErrorMessage(r)); + r &= 0x0000FFFF; + } + + pArgs->RemoveAll(true); + delete pArgs; + AppLog("Application finished."); + + return static_cast<int>(r); +} +#ifdef __cplusplus +} +#endif // __cplusplus |