libUTL++
Application.h
1 #pragma once
2 
4 
5 #include <libutl/Object.h>
6 
8 
9 UTL_NS_BEGIN;
10 
12 
24 
26 class Application : public Object
27 {
31 
32 public:
39  virtual int run(int argc = 0, char** argv = nullptr) = 0;
40 
41 private:
42  void init();
43  void deInit();
44 };
45 
47 
48 UTL_NS_END;
49 
51 
57 #define UTL_APP(appName) \
58  class appName : public utl::Application \
59  { \
60  UTL_CLASS_DECL(appName, utl::Application); \
61  UTL_CLASS_DEFID; \
62  \
63  public: \
64  virtual int run(int argc = 0, char** argv = nullptr); \
65  }; \
66  UTL_CLASS_IMPL(appName);
void deInit()
De-initialize UTL++.
Application base class.
Definition: Application.h:26
#define UTL_CLASS_DECL_ABC(DC, BC)
Declaration of standard UTL++ functionality for an abstract base class (ABC).
Definition: macros.h:650
#define UTL_CLASS_NO_SERIALIZE
Declare that a class cannot do serialize().
Definition: macros.h:384
#define UTL_CLASS_NO_COPY
Declare that a class cannot do copy().
Definition: macros.h:358
Root of UTL++ class hierarchy.
Definition: Object.h:52
void init()
Initialize UTL++.