blob: 24bdb3f301dcecb2f9b0bd27f31a99c94cc18b4f (
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
|
//
// Generated by dtk
// Translation Unit: m_Do_hostIO.cpp
//
#include "m_Do/m_Do_hostIO.h"
#include "string.h"
#include "m_Do/m_Do_printf.h"
mDoHIO_root_c mDoHIO_root;
/* 80017A4C-80017A50 .text update__13mDoHIO_root_cFv */
void mDoHIO_root_c::update() {}
/* 80017A50-80017B20 .text createChild__16mDoHIO_subRoot_cFPCcP13JORReflexible */
s8 mDoHIO_subRoot_c::createChild(const char* i_name, JORReflexible* i_reflexible) {
for (int i = 0; i < 64; i++) {
if (mChild[i].getPt() == i_reflexible) {
// "Danger: Trying to register an already registered HostIO<%s>\n"
OSReport_Error("危険:既に登録されているホストIOをふたたび登録しようとしています<%s>\n", i_name);
return -1;
}
}
for (int i = 0; i < 64; i++) {
if (mChild[i].getPt() == NULL) {
mChild[i].setName(i_name);
mChild[i].setPt(i_reflexible);
return i;
}
}
// "No free HostIO entries. Could not register. \n"
OSReport_Error("ホストIOの空きエントリがありません。登録できませんでした。\n");
return -1;
}
/* 80017B20-80017B88 .text deleteChild__16mDoHIO_subRoot_cFSc */
void mDoHIO_subRoot_c::deleteChild(s8 i_childID) {
if (i_childID >= 0) {
if (mChild[i_childID].getPt() == NULL) {
// "Danger: Trying to delete HostIO that has already been deleted<%s>\n"
OSReport_Error("危険:すでに削除されているホストIOをさらに削除しようとしています<%s>\n", mChild[i_childID].getName());
} else {
mChild[i_childID].setPt(NULL);
}
}
}
#if VERSION == VERSION_DEMO
mDoHIO_entry_c::mDoHIO_entry_c() {
mNo = 0;
mCount = 0;
}
mDoHIO_entry_c::~mDoHIO_entry_c() {
if (mCount != 0) {
OSReport_Error("~mDoHIO_entry_c mCount=%d mNo=%d\n", mCount, mNo);
mDoHIO_deleteChild(mNo);
mDoHIO_deleteChild(mNo);
}
}
void mDoHIO_entry_c::entryHIO(const char* name) {
if (mCount == 0) {
mNo = mDoHIO_createChild(name, this);
}
mCount++;
}
void mDoHIO_entry_c::removeHIO() {
mCount--;
if (mCount == 0) {
mDoHIO_deleteChild(mNo);
}
}
#endif
|