summaryrefslogtreecommitdiff
path: root/includes/AtStartExit.h
blob: 97dc5338e4a39970d588136349a171938c70eb80 (plain)
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
#pragma once

namespace Balau {

class AtStart {
  protected:
      AtStart(int priority = 0);
    virtual void doStart() = 0;
  private:
      AtStart(const AtStart &) = delete;
    AtStart & operator=(const AtStart &) = delete;
    const int m_priority;
    AtStart * m_next;
    static AtStart * s_head;
    friend class Main;
};

class AtExit {
  protected:
      AtExit(int priority = 0);
    virtual void doExit() = 0;
  private:
      AtExit(const AtExit &) = delete;
    AtExit & operator=(const AtExit &) = delete;
    const int m_priority;
    AtExit * m_next;
    static AtExit * s_head;
    friend class Main;
};

};