View Javadoc

1   
2   	 	/**
3            IMPORTANT !!!
4   
5            DO NOT EDIT THIS FILE. IT IS GENERATED FROM approriate xml file in xmlresources/gbcommands BY
6            THE JavaClassesGenerator.xslt. MODIFY THAT FILE INSTEAD OF THIS ONE.
7            
8            Use Ant task process-gb-messages after that to generate .java files again.
9            
10           IMPORTANT END !!!
11          */
12   	package cz.cuni.amis.pogamut.ut2004.communication.messages.gbcommands;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.*;
13   		/**
14   		 * Representation of the GameBots2004 command ENTER.
15   		 *
16   		 * 
17  		Tries to enter vehicle specified by Id. Note:
18  		You have to be in vehicle EntryRadius to enter (default 100 ut units). 
19  		Response to this command are messages ENTERED and LOCKED.
20  		Beware! When in vehicle just command RUNTO with Target specified works for move commands. Any other move commands will cause vehicle to got straight ahead.
21  	Also it is not possible to control speed or steering at this moment. Everything is done automaticaly by RUNTO with Target specified.
22  	
23           */
24   	public class EnterVehicle 
25  		extends CommandMessage
26  	        {
27  	        	
28  		        
29      	/** Example how the message looks like - used during parser tests. */
30      	public static final String PROTOTYPE =
31      		" {Id unreal_id} ";
32      
33  		/**
34  		 * Creates new instance of command EnterVehicle.
35  		 * 
36  		Tries to enter vehicle specified by Id. Note:
37  		You have to be in vehicle EntryRadius to enter (default 100 ut units). 
38  		Response to this command are messages ENTERED and LOCKED.
39  		Beware! When in vehicle just command RUNTO with Target specified works for move commands. Any other move commands will cause vehicle to got straight ahead.
40  	Also it is not possible to control speed or steering at this moment. Everything is done automaticaly by RUNTO with Target specified.
41  	
42  		 * Corresponding GameBots message for this command is
43  		 * ENTER.
44  		 *
45  		 * 
46  		 *    @param Id Id of the vehicle we want to enter.
47  		 */
48  		public EnterVehicle(
49  			UnrealId Id
50  		) {
51  			
52  				this.Id = Id;
53              
54  		}
55  
56  		
57  			/**
58  			 * Creates new instance of command EnterVehicle.
59  			 * 
60  		Tries to enter vehicle specified by Id. Note:
61  		You have to be in vehicle EntryRadius to enter (default 100 ut units). 
62  		Response to this command are messages ENTERED and LOCKED.
63  		Beware! When in vehicle just command RUNTO with Target specified works for move commands. Any other move commands will cause vehicle to got straight ahead.
64  	Also it is not possible to control speed or steering at this moment. Everything is done automaticaly by RUNTO with Target specified.
65  	
66  			 * Corresponding GameBots message for this command is
67  			 * ENTER.
68  			 * <p></p>
69  			 * WARNING: this is empty-command constructor, you have to use setters to fill it up with data that should be sent to GameBots2004!
70  		     */
71  		    public EnterVehicle() {
72  		    }
73  			
74  		
75  		/**
76  		 * Cloning constructor.
77  		 *
78  		 * @param original
79  		 */
80  		public EnterVehicle(EnterVehicle original) {
81  		   
82  		        this.Id = original.Id;
83  		   
84  		}
85      
86  	        /**
87  	        Id of the vehicle we want to enter. 
88  	        */
89  	        protected
90  	         UnrealId Id =
91  	       	
92  	        		null
93  	        	;
94  	
95  	        
96  	        
97   		/**
98           * Id of the vehicle we want to enter. 
99           */
100         public UnrealId getId()
101  	
102 	        {
103 	            return
104 	        	 Id;
105 	        }
106 	        
107 	        
108 	        
109  		
110  		/**
111          * Id of the vehicle we want to enter. 
112          */
113         public EnterVehicle 
114         setId(UnrealId Id)
115  	
116 			{
117 				this.Id = Id;
118 				return this;
119 			}
120 		
121  	    public String toString() {
122             return toMessage();
123         }
124  	
125  		public String toHtmlString() {
126 			return super.toString() + "[<br/>" +
127             	
128             	"<b>Id</b> = " +
129             	String.valueOf(getId()
130  	) +
131             	" <br/> " +
132             	 
133             	"<br/>]"
134             ;
135 		}
136  	
137 		public String toMessage() {
138      		StringBuffer buf = new StringBuffer();
139      		buf.append("ENTER");
140      		
141 						if (Id != null) {
142 							buf.append(" {Id " + Id.getStringId() + "}");
143 						}
144 					
145    			return buf.toString();
146    		}
147  	
148  		// --- Extra Java from XML BEGIN (extra/code/java)
149         	
150 		// --- Extra Java from XML END (extra/code/java)
151  	
152 	        }
153