View Javadoc

1   
2               /**
3               IMPORTANT !!!
4   
5               DO NOT EDIT THIS FILE. IT IS GENERATED FROM approriate xml file in xmlresources/gbinfomessages BY
6               THE JavaClassesGenerator.xslt. MODIFY THESE FILES INSTEAD OF THIS ONE.
7   
8               IMPORTANT END !!!
9               */
10              package
11              cz.cuni.amis.pogamut.udk.communication.messages.gbinfomessages;
12  	    		import java.util.*;
13      import javax.vecmath.*;
14      import cz.cuni.amis.pogamut.base.communication.messages.*;
15      import cz.cuni.amis.pogamut.base.communication.worldview.*;
16      import cz.cuni.amis.pogamut.base.communication.worldview.event.*;
17      import cz.cuni.amis.pogamut.base.communication.worldview.object.*;
18      import cz.cuni.amis.pogamut.base.communication.translator.event.*;
19      import cz.cuni.amis.pogamut.base3d.worldview.object.*;
20      import cz.cuni.amis.pogamut.base3d.worldview.object.event.*;
21      import cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId;
22      import cz.cuni.amis.pogamut.udk.communication.messages.*;
23      import cz.cuni.amis.pogamut.udk.communication.worldview.objects.*;
24      import cz.cuni.amis.pogamut.udk.communication.translator.itemdescriptor.*;
25      import cz.cuni.amis.pogamut.udk.communication.messages.ItemType.Category;
26      import cz.cuni.amis.utils.exception.*;
27      import cz.cuni.amis.pogamut.base.communication.translator.event.IWorldObjectUpdateResult.Result;
28      import cz.cuni.amis.utils.SafeEquals;
29      import cz.cuni.amis.pogamut.multi.communication.worldview.object.*;
30      
31              
32              /**
33                
34  		Asynchronous message. Response to USE (FactoryUse) command.
35  	
36                            Corresponding GameBots message is
37                            USED.
38                        
39               */
40              
41              public class
42              FactoryUsed
43                      extends GBEvent
44                  
45  	            	implements IWorldEvent, IWorldChangeEvent
46  
47              {
48              
49              /**
50                Creates new instance of command FactoryUsed.
51                
52  		Asynchronous message. Response to USE (FactoryUse) command.
53  	Corresponding GameBots message for this command is
54                .
55                    @param Success 
56  			If we have successfully used the factory.
57  		
58                    @param Reason 
59  			If success is false, the reason why we couldn't use a factory will be here.
60  		
61                */
62               public FactoryUsed(
63                  boolean Success,  String Reason) {
64                      
65                      this.Success = Success;
66                  
67                      this.Reason = Reason;
68                  
69                  }
70  
71              
72      	/** Example how the message looks like - used during parser tests. */
73      	public static final String PROTOTYPE =
74      		"USED {Success False} {Reason text}";
75      
76  
77              /////// Properties BEGIN
78              
79          /**
80          
81  			If we have successfully used the factory.
82  		 */
83          protected
84           boolean Success =
85          	false;
86  
87          
88          /**
89          
90  			If we have successfully used the factory.
91  		 */
92          public
93          boolean isSuccess() {
94              return
95           Success;
96          }
97          
98  
99          
100         /**
101         
102 			If success is false, the reason why we couldn't use a factory will be here.
103 		 */
104         protected
105          String Reason =
106         	null;
107 
108         
109         /**
110         
111 			If success is false, the reason why we couldn't use a factory will be here.
112 		 */
113         public
114         String getReason() {
115             return
116          Reason;
117         }
118         
119 
120         
121             /////// Properties END
122 
123             /////// Extra Java code BEGIN
124 
125             	/////// Additional code from xslt BEGIN
126             		
127        					public long getSimTime() {
128        						// NOT IMPLEMENTED FOR UDK
129        						return 0;
130        					}
131             		
132 
133 
134             	/////// Additional code from xslt END
135 
136 	            /////// Extra Java from XML BEGIN
137             		
138             	/////// Extra Java from XML END
139 
140             /////// Extra Java code END
141 
142             
143 
144             /**
145               * Cloning constructor.
146               */
147              public FactoryUsed(FactoryUsed original) {
148                 
149                      this.Success=original.Success;
150                 
151                      this.Reason=original.Reason;
152                 
153              }
154 
155              
156                  /**
157                   * Used by Yylex to create empty message then to fill it's protected fields (Yylex is in the same package).
158                   */
159 	             public FactoryUsed() {
160 	             }
161              
162 
163                  
164             public String toString() {
165                 return
166                 
167                 		super.toString() + " | " +
168                 		
169 				               "Success = " +
170 				               String.valueOf(Success) + " | " +
171 				            
172 				               "Reason = " +
173 				               String.valueOf(Reason) + " | " +
174 				             "";
175                 	
176              }
177 
178              public String toHtmlString() {
179                 return super.toString() +
180             
181             "<b>Success</b> : " +
182             String.valueOf(Success) +
183             " <br/> " +
184             
185             "<b>Reason</b> : " +
186             String.valueOf(Reason) +
187             " <br/> " +
188              "";
189              }
190 
191              
192              
193              }
194 
195