-
-
Notifications
You must be signed in to change notification settings - Fork 173
Expand file tree
/
Copy pathObject.xml
More file actions
executable file
·77 lines (60 loc) · 1.33 KB
/
Object.xml
File metadata and controls
executable file
·77 lines (60 loc) · 1.33 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
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<root>
<name>Object</name>
<category>Data</category>
<subcategory>Composite</subcategory>
<usage>Web & Application</usage>
<example>
<image></image>
<code><![CDATA[
// Declare and construct two objects (h1, h2) from the class HLine
HLine h1 = new HLine(20, 2.0);
HLine h2 = new HLine(50, 2.5);
void setup()
{
size(200, 200);
frameRate(30);
}
void draw() {
background(204);
h1.update();
h2.update();
}
class HLine {
float ypos, speed;
HLine (float y, float s) {
ypos = y;
speed = s;
}
void update() {
ypos += speed;
if (ypos > height) {
ypos = 0;
}
line(0, ypos, width, ypos);
}
}
]]></code>
</example>
<description><![CDATA[
Objects are instances of classes. A class is a grouping of related methods (functions) and fields (variables and constants).
]]></description>
<syntax>
<c>ClassName</c> <c>instanceName</c>
</syntax>
<parameter>
<label>ClassName</label>
<description><![CDATA[the class from which to create the new object]]></description>
</parameter>
<parameter>
<label>instanceName</label>
<description><![CDATA[the name for the new object]]></description>
</parameter>
<returns></returns>
<related>
class
</related>
<availability>1.0</availability>
<type>Object</type>
<partof>PDE</partof>
</root>