1 package cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages;
2
3
4 import java.util.*;import javax.vecmath.*;import cz.cuni.amis.pogamut.base.communication.messages.*;import cz.cuni.amis.pogamut.base.communication.worldview.*;import cz.cuni.amis.pogamut.base.communication.worldview.event.*;import cz.cuni.amis.pogamut.base.communication.worldview.object.*;import cz.cuni.amis.pogamut.multi.communication.worldview.object.*;import cz.cuni.amis.pogamut.base.communication.translator.event.*;import cz.cuni.amis.pogamut.multi.communication.translator.event.*;import cz.cuni.amis.pogamut.base3d.worldview.object.*;import cz.cuni.amis.pogamut.base3d.worldview.object.event.*;import cz.cuni.amis.pogamut.ut2004.communication.messages.*;import cz.cuni.amis.pogamut.ut2004.communication.worldview.objects.*;import cz.cuni.amis.pogamut.ut2004multi.communication.worldview.objects.*;import cz.cuni.amis.pogamut.ut2004.communication.translator.itemdescriptor.*;import cz.cuni.amis.pogamut.ut2004.communication.messages.ItemType.Category;import cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId;import cz.cuni.amis.utils.exception.*;import cz.cuni.amis.pogamut.base.communication.translator.event.IWorldObjectUpdateResult.Result;import cz.cuni.amis.utils.SafeEquals;import cz.cuni.amis.pogamut.base.agent.*;import cz.cuni.amis.pogamut.multi.agent.*;import cz.cuni.amis.pogamut.multi.communication.worldview.property.*;import cz.cuni.amis.pogamut.ut2004multi.communication.worldview.property.*;import cz.cuni.amis.utils.token.*;import cz.cuni.amis.utils.*;
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 public class InitedMessageStaticImpl
30 extends
31 InitedMessageStatic
32 {
33
34
35
36
37
38
39 public InitedMessageStaticImpl()
40 {
41 }
42
43
44
45
46
47
48 public InitedMessageStaticImpl(InitedMessage original) {
49
50 this.SimTime = original.getSimTime();
51 }
52
53
54
55
56
57
58 public InitedMessageStaticImpl(InitedMessageStaticImpl original) {
59
60 this.SimTime = original.getSimTime();
61 }
62
63
64
65
66
67
68 public InitedMessageStaticImpl(InitedMessageStatic original) {
69
70 }
71
72
73 public UnrealId getId() {
74 return cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.InitedMessage.InitedMessageId;
75 }
76
77
78 @Override
79 public void setSimTime(long SimTime) {
80 super.setSimTime(SimTime);
81 }
82
83 @Override
84 public
85 InitedMessageStaticImpl clone() {
86 return new
87 InitedMessageStaticImpl(this);
88 }
89
90
91
92
93 public static class InitedMessageStaticUpdate
94 implements IStaticWorldObjectUpdatedEvent
95 {
96
97 private InitedMessageStatic data;
98 private long time;
99
100 public InitedMessageStaticUpdate
101 (InitedMessageStatic source, long time)
102 {
103 this.data = source;
104 this.time = time;
105 }
106
107
108
109
110 @Override
111 public long getSimTime() {
112 return time;
113 }
114
115 @Override
116 public WorldObjectId getId() {
117 return data.getId();
118 }
119
120 @Override
121 public IWorldObjectUpdateResult<IStaticWorldObject> update(
122 IStaticWorldObject object) {
123 if ( object == null)
124 {
125 data = new InitedMessageStaticImpl(data);
126 return new IWorldObjectUpdateResult.WorldObjectUpdateResult<IStaticWorldObject>(IWorldObjectUpdateResult.Result.CREATED, data);
127 }
128
129 if ( object instanceof InitedMessageStaticImpl)
130 {
131 InitedMessageStaticImpl orig = (InitedMessageStaticImpl)object;
132
133 if ( data.isDifferentFrom(orig) )
134 {
135
136
137 System.out.println("!!!!!ERROR!!!!!! in static object modification. Object class : InitedMessageStaticImpl to see which property was different see !!!!PROPERTY UPDATE ERROR!!!!");
138 }
139 return new IWorldObjectUpdateResult.WorldObjectUpdateResult<IStaticWorldObject>(IWorldObjectUpdateResult.Result.SAME, data);
140 }
141 throw new PogamutException("Unexpected object type for update, InitedMessageStaticImpl expected not class " + object.getClass().getSimpleName() + ".", this);
142 }
143 }
144
145
146
147 @Override
148 public boolean isDifferentFrom(IStaticWorldObject other)
149 {
150 if (other == null)
151 {
152 return true;
153 }
154 else if (other == this)
155 {
156 return false;
157 }
158 else
159 {
160 InitedMessageStatic obj = (InitedMessageStatic) other;
161
162
163 }
164 return false;
165 }
166
167
168 public String toString() {
169 return
170 super.toString() + "[" +
171
172 "]";
173 }
174
175
176 public String toHtmlString() {
177 return super.toString() + "[<br/>" +
178
179 "<br/>]";
180 }
181
182
183
184
185
186
187
188
189
190
191 }
192