summaryrefslogtreecommitdiff
path: root/include/d/flag/committable_flag_manager.h
blob: e709d5183bb90efc2bac61e85d8bd8f10a63a497 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#ifndef D_FLAG_COMMITTABLE_FLAG_MANAGER_H
#define D_FLAG_COMMITTABLE_FLAG_MANAGER_H

class CommittableFlagManager {
public:
    bool mNeedsCommit;

    virtual void doCommit() = 0;
    virtual ~CommittableFlagManager() {}
    bool commit();
    void setNeedsCommit(bool commit) {
        mNeedsCommit = commit;
    }
    CommittableFlagManager() {
        mNeedsCommit = false;
    }
    CommittableFlagManager(bool commit) {
        mNeedsCommit = commit;
    }
};


#endif