annotate Applications/Generic/BasicNativeApplication.h @ 274:dc1beee33134 am-2

split SdlApplication into NativeApplication and SdlApplication
author am@osimis.io
date Fri, 24 Aug 2018 13:52:55 +0200
parents
children 5de5699ad570
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
274
dc1beee33134 split SdlApplication into NativeApplication and SdlApplication
am@osimis.io
parents:
diff changeset
1 /**
dc1beee33134 split SdlApplication into NativeApplication and SdlApplication
am@osimis.io
parents:
diff changeset
2 * Stone of Orthanc
dc1beee33134 split SdlApplication into NativeApplication and SdlApplication
am@osimis.io
parents:
diff changeset
3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
dc1beee33134 split SdlApplication into NativeApplication and SdlApplication
am@osimis.io
parents:
diff changeset
4 * Department, University Hospital of Liege, Belgium
dc1beee33134 split SdlApplication into NativeApplication and SdlApplication
am@osimis.io
parents:
diff changeset
5 * Copyright (C) 2017-2018 Osimis S.A., Belgium
dc1beee33134 split SdlApplication into NativeApplication and SdlApplication
am@osimis.io
parents:
diff changeset
6 *
dc1beee33134 split SdlApplication into NativeApplication and SdlApplication
am@osimis.io
parents:
diff changeset
7 * This program is free software: you can redistribute it and/or
dc1beee33134 split SdlApplication into NativeApplication and SdlApplication
am@osimis.io
parents:
diff changeset
8 * modify it under the terms of the GNU Affero General Public License
dc1beee33134 split SdlApplication into NativeApplication and SdlApplication
am@osimis.io
parents:
diff changeset
9 * as published by the Free Software Foundation, either version 3 of
dc1beee33134 split SdlApplication into NativeApplication and SdlApplication
am@osimis.io
parents:
diff changeset
10 * the License, or (at your option) any later version.
dc1beee33134 split SdlApplication into NativeApplication and SdlApplication
am@osimis.io
parents:
diff changeset
11 *
dc1beee33134 split SdlApplication into NativeApplication and SdlApplication
am@osimis.io
parents:
diff changeset
12 * This program is distributed in the hope that it will be useful, but
dc1beee33134 split SdlApplication into NativeApplication and SdlApplication
am@osimis.io
parents:
diff changeset
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
dc1beee33134 split SdlApplication into NativeApplication and SdlApplication
am@osimis.io
parents:
diff changeset
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
dc1beee33134 split SdlApplication into NativeApplication and SdlApplication
am@osimis.io
parents:
diff changeset
15 * Affero General Public License for more details.
dc1beee33134 split SdlApplication into NativeApplication and SdlApplication
am@osimis.io
parents:
diff changeset
16 *
dc1beee33134 split SdlApplication into NativeApplication and SdlApplication
am@osimis.io
parents:
diff changeset
17 * You should have received a copy of the GNU Affero General Public License
dc1beee33134 split SdlApplication into NativeApplication and SdlApplication
am@osimis.io
parents:
diff changeset
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
dc1beee33134 split SdlApplication into NativeApplication and SdlApplication
am@osimis.io
parents:
diff changeset
19 **/
dc1beee33134 split SdlApplication into NativeApplication and SdlApplication
am@osimis.io
parents:
diff changeset
20
dc1beee33134 split SdlApplication into NativeApplication and SdlApplication
am@osimis.io
parents:
diff changeset
21
dc1beee33134 split SdlApplication into NativeApplication and SdlApplication
am@osimis.io
parents:
diff changeset
22 #pragma once
dc1beee33134 split SdlApplication into NativeApplication and SdlApplication
am@osimis.io
parents:
diff changeset
23
dc1beee33134 split SdlApplication into NativeApplication and SdlApplication
am@osimis.io
parents:
diff changeset
24 #include "../IBasicApplication.h"
dc1beee33134 split SdlApplication into NativeApplication and SdlApplication
am@osimis.io
parents:
diff changeset
25
dc1beee33134 split SdlApplication into NativeApplication and SdlApplication
am@osimis.io
parents:
diff changeset
26 #if ORTHANC_ENABLE_NATIVE != 1
dc1beee33134 split SdlApplication into NativeApplication and SdlApplication
am@osimis.io
parents:
diff changeset
27 #error this file shall be included only with the ORTHANC_ENABLE_NATIVE set to 1
dc1beee33134 split SdlApplication into NativeApplication and SdlApplication
am@osimis.io
parents:
diff changeset
28 #endif
dc1beee33134 split SdlApplication into NativeApplication and SdlApplication
am@osimis.io
parents:
diff changeset
29
dc1beee33134 split SdlApplication into NativeApplication and SdlApplication
am@osimis.io
parents:
diff changeset
30 namespace OrthancStone
dc1beee33134 split SdlApplication into NativeApplication and SdlApplication
am@osimis.io
parents:
diff changeset
31 {
dc1beee33134 split SdlApplication into NativeApplication and SdlApplication
am@osimis.io
parents:
diff changeset
32 class BasicNativeApplicationContext;
dc1beee33134 split SdlApplication into NativeApplication and SdlApplication
am@osimis.io
parents:
diff changeset
33
dc1beee33134 split SdlApplication into NativeApplication and SdlApplication
am@osimis.io
parents:
diff changeset
34 class BasicNativeApplication
dc1beee33134 split SdlApplication into NativeApplication and SdlApplication
am@osimis.io
parents:
diff changeset
35 {
dc1beee33134 split SdlApplication into NativeApplication and SdlApplication
am@osimis.io
parents:
diff changeset
36 public:
dc1beee33134 split SdlApplication into NativeApplication and SdlApplication
am@osimis.io
parents:
diff changeset
37
dc1beee33134 split SdlApplication into NativeApplication and SdlApplication
am@osimis.io
parents:
diff changeset
38 int Execute(MessageBroker& broker,
dc1beee33134 split SdlApplication into NativeApplication and SdlApplication
am@osimis.io
parents:
diff changeset
39 IBasicApplication& application,
dc1beee33134 split SdlApplication into NativeApplication and SdlApplication
am@osimis.io
parents:
diff changeset
40 int argc,
dc1beee33134 split SdlApplication into NativeApplication and SdlApplication
am@osimis.io
parents:
diff changeset
41 char* argv[]);
dc1beee33134 split SdlApplication into NativeApplication and SdlApplication
am@osimis.io
parents:
diff changeset
42
dc1beee33134 split SdlApplication into NativeApplication and SdlApplication
am@osimis.io
parents:
diff changeset
43 virtual void Initialize() = 0;
dc1beee33134 split SdlApplication into NativeApplication and SdlApplication
am@osimis.io
parents:
diff changeset
44 virtual void DeclareCommandLineOptions(boost::program_options::options_description& options) = 0;
dc1beee33134 split SdlApplication into NativeApplication and SdlApplication
am@osimis.io
parents:
diff changeset
45 virtual void Run(BasicNativeApplicationContext& context, const std::string& title, unsigned int width, unsigned int height, bool enableOpenGl) = 0;
dc1beee33134 split SdlApplication into NativeApplication and SdlApplication
am@osimis.io
parents:
diff changeset
46 virtual void Finalize() = 0;
dc1beee33134 split SdlApplication into NativeApplication and SdlApplication
am@osimis.io
parents:
diff changeset
47 };
dc1beee33134 split SdlApplication into NativeApplication and SdlApplication
am@osimis.io
parents:
diff changeset
48
dc1beee33134 split SdlApplication into NativeApplication and SdlApplication
am@osimis.io
parents:
diff changeset
49 }