View Javadoc

1   package cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages;
2    		
3    		// --- IMPORTS FROM /messages/settings/javasettings/javaimport BEGIN
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   		// --- IMPORTS FROM /messages/settings/javasettings/javaimport END
6   		
7   		
8   		// --- IMPORTS FROM extra/code/java/javapart/classcategory[@name='all'] BEGIN
9   				
10  		// --- IMPORTS FROM extra/code/java/javapart/classcategory[@name='all'] END
11  		
12  		// --- IMPORTS FROM extra/code/java/javapart/classcategory[@name=event]+classtype[@name=impl] BEGIN
13  		
14  		// --- IMPORTS FROM extra/code/java/javapart/classcategory[@name=event]+classtype[@name=impl] END
15      
16   		/**
17           *  
18           			Definition of the event IMAP.
19           		
20           *
21           *  <p></p><p></p>
22           *  Complete message documentation:               
23           *  
24  		Info batch message. Starts with SMAP message, ends with EMAP
25  		message. Hold information about available maps on the server
26  		(maps to which we can change the game).
27  	
28           */
29   	public class MapList 
30    				extends InfoMessage
31      			implements IWorldEvent, IWorldChangeEvent
32      			
33  	    	, cz.cuni.amis.pogamut.unreal.communication.messages.gbinfomessages.IMapList
34  	    {
35   	
36      	/** Example how the message looks like - used during parser tests. */
37      	public static final String PROTOTYPE =
38      		"IMAP {Name text} ";
39      
40      	
41      	
42      	/**
43      	 * Parameter-less contructor for the message.
44      	 */
45  		public MapList()
46  		{
47  		}
48  	
49      	
50      	
51      	
52      	/**
53  		 * Creates new instance of the message MapList.
54  		 * 
55  		Info batch message. Starts with SMAP message, ends with EMAP
56  		message. Hold information about available maps on the server
57  		(maps to which we can change the game).
58  	
59  		 * Corresponding GameBots message
60  		 *   
61  		 *   is
62  		 *   IMAP.
63  		 * 
64   	  	 * 
65  		 *   
66  		 *     @param Name 
67  			Name of one map in map list on the server.
68  		
69  		 *   
70  		 * 
71  		 */
72  		public MapList(
73  			String Name
74  		) {
75  			
76  					this.Name = Name;
77  				
78  		}
79      
80      	/**
81  		 * Cloning constructor from the full message.
82  		 *
83  		 * @param original
84  		 */
85  		public MapList(MapList original) {		
86  			
87  					this.Name = original.getName()
88   	;
89  				
90  			this.SimTime = original.getSimTime();			
91  		}
92  		
93  	   		
94  			protected long SimTime;
95  				
96  			/**
97  			 * Simulation time in MILLI SECONDS !!!
98  			 */	
99  			@Override
100 			public long getSimTime() {
101 				return SimTime;
102 			}
103 						
104 			/**
105 			 * Used by Yylex to slip correct time of the object or programmatically.
106 			 */
107 			protected void setSimTime(long SimTime) {
108 				this.SimTime = SimTime;
109 			}
110 	   	
111     	
112 	    /**
113          * 
114 			Name of one map in map list on the server.
115 		 
116          */
117         protected
118          String Name =
119        	null;
120 	
121  		/**
122          * 
123 			Name of one map in map list on the server.
124 		 
125          */
126         public  String getName()
127  	 {
128     					return Name;
129     				}
130     			
131  		
132  	    public String toString() {
133             return
134             	super.toString() + "[" +
135             	
136 		              			"Name = " + String.valueOf(getName()
137  	) + " | " + 
138 		              		
139 				"]";           		
140         }
141  	
142  		
143  		public String toHtmlString() {
144  			return super.toString() + "[<br/>" +
145             	
146 		              			"<b>Name</b> = " + String.valueOf(getName()
147  	) + " <br/> " + 
148 		              		
149 				"<br/>]";     
150 		}
151  	 
152  	    public String toJsonLiteral() {
153             return "MapList(null, "
154             		
155                    + ")";
156         }
157  	
158  		
159  		// --- Extra Java from XML BEGIN (extra/code/java/javapart/classcategory[@name=all]) ---
160         	
161 		// --- Extra Java from XML END (extra/code/java/javapart/classcategory[@name=all]) ---
162 		
163 	    // --- Extra Java from XML BEGIN (extra/code/java/javapart/classcategory[@name=event+classtype[@name=impl]) ---
164 	        
165 	    // --- Extra Java from XML END (extra/code/java/javapart/classcategory[@name=event+classtype[@name=impl]) ---        	            	
166  	
167 		}
168