-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathStandard.ms
More file actions
154 lines (143 loc) · 4.16 KB
/
Standard.ms
File metadata and controls
154 lines (143 loc) · 4.16 KB
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
/*! © 2022 imaoki | MIT License | https://github.com/imaoki */
fileIn @"definitionPool.ms"
/*- @var <Struct:StandardStruct> */
global std
/*-
標準ライブラリ。
*/
struct StandardStruct (
/*- @prop <Struct:ArrayUtilityStruct> */
public ArrayUtility,
/*- @prop <Struct:AttributeUtilityStruct> */
public AttributeUtility,
/*- @prop <Struct:ComparerStruct> */
public Comparer,
/*- @prop <StructDef:ConfigStruct> */
public ConfigStruct,
/*- @prop <StructDef:DialogStruct> */
public DialogStruct,
/*- @prop <Struct:DotNetUtilityStruct> */
public DotNetUtility,
/*- @prop <StructDef:EasingStruct> */
public EasingStruct,
/*- @prop <StructDef:EncodingStruct> */
public EncodingStruct,
/*- @prop <StructDef:EnumStruct> */
public EnumStruct,
/*- @prop <Struct:FileUtilityStruct> */
public FileUtility,
/*- @prop <StructDef:ObservableStruct> */
public ObservableStruct,
/*- @prop <StructDef:PathUtilityStruct> */
public PathUtilityStruct,
/*- @prop <Struct:StringUtilityStruct> */
public StringUtility,
/*- @prop <StructDef:TimerStruct> */
public TimerStruct,
/*- @prop <Struct:ViewportUtilityStruct> */
public ViewportUtility,
/*
public fn Install = (),
public fn Uninstall = (),
*/
/*-
インストールする。
@returns <OkClass>
@remarks 静的メソッド。
*/
public fn Install = (
::StandardStruct()
if isProperty ::startupLoader #RegisterFile do (
::startupLoader.RegisterFile (getSourceFileName()) installer:true
)
format "[install]::std\n"
ok
),
/*-
アンインストールする。
@returns <OkClass>
@remarks 静的メソッド。
*/
public fn Uninstall = (
if isProperty ::startupLoader #UnregisterFile do (
::startupLoader.UnregisterFile (getSourceFileName())
)
::std = undefined
format "[uninstall]::std\n"
ok
),
/*- @prop <Array[<Integer>]> バージョン番号。メジャー、マイナー、パッチの順。 */
private version = #(3, 1, 0),
/*- @returns <Name> */
public fn StructName = #StandardStruct,
/*-
@param indent: <String>
@param out: <FileStream|StringStream|WindowStream> 出力先。既定値は`listener`。
@returns <OkClass>
*/
public fn Dump indent:"" out:listener = (
format "%StandardStruct\n" indent to:out
ok
),
/*-
@param obj <Any>
@returns <BooleanClass>
@remarks 大文字と小文字を区別する。
*/
public fn Equals obj = (
local isEqualStructName = isStruct obj \
and isProperty obj #StructName \
and classOf obj.StructName == MAXScriptFunction \
and obj.StructName() == this.StructName()
local isEqualProperties = true
isEqualStructName and isEqualProperties
),
/*-
@returns <Array[<Integer>]>
*/
public fn GetVersion = (
this.version
),
on Create do (
::std = this
/* 依存無し */
this.ArrayUtility = (::standardDefinitionPool[@"ArrayUtility.ms"])()
this.AttributeUtility = (::standardDefinitionPool[@"AttributeUtility.ms"])()
this.Comparer = (::standardDefinitionPool[@"Comparer.ms"])()
this.DialogStruct = ::standardDefinitionPool[@"Dialog.ms"]
this.DotNetUtility = (::standardDefinitionPool[@"DotNetUtility.ms"])()
this.EasingStruct = ::standardDefinitionPool[@"Easing.ms"]
this.ObservableStruct = ::standardDefinitionPool[@"Observable.ms"]
this.PathUtilityStruct = ::standardDefinitionPool[@"PathUtility.ms"]
this.ViewportUtility = (::standardDefinitionPool[@"ViewportUtility.ms"])()
/*
DotNetUtility.ms
*/
this.EnumStruct = ::standardDefinitionPool[@"Enum.ms"]
this.TimerStruct = ::standardDefinitionPool[@"Timer.ms"]
/*
DotNetUtility.ms
Enum.ms
*/
this.StringUtility = (::standardDefinitionPool[@"StringUtility.ms"])()
/*
DotNetUtility.ms
StringUtility.ms
*/
this.EncodingStruct = ::standardDefinitionPool[@"Encoding.ms"]
/*
Comparer.ms
DotNetUtility.ms
Encoding.ms
Enum.ms
PathUtility.ms
*/
this.FileUtility = (::standardDefinitionPool[@"FileUtility.ms"])()
/*
FileUtility.ms
PathUtility.ms
StringUtility.ms
*/
this.ConfigStruct = ::standardDefinitionPool[@"Config.ms"]
)
)