summaryrefslogtreecommitdiff
path: root/include/JSystem/JSupport/JSUIosBase.h
blob: 5164cc5a2adea408c00b6a4c1cb7d7589ccda976 (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
32
33
34
35
#ifndef JSUIOSBASE_H_
#define JSUIOSBASE_H_

#include "dolphin/types.h"

enum JSUStreamSeekFrom {
    JSUStreamSeekFrom_SET = 0,  // absolute
    JSUStreamSeekFrom_CUR = 1,  // relative
    JSUStreamSeekFrom_END = 2,  // relative to end
};

/**
* @ingroup jsystem-jsupport
* 
*/
class JSUIosBase {
public:
    enum EIoState {
        IOS_STATE_1 = 1,
        IOS_STATE_2 = 2,
    };

    JSUIosBase() { mState = false; }

    virtual ~JSUIosBase() {}

    bool isGood() const { return mState == 0; }
    void clrState(EIoState state) { mState &= ~state; }
    void setState(EIoState state) { mState |= state; }

private:
    bool mState;
};  // Size = 0x8

#endif