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 THESE FILES INSTEAD OF THIS ONE.
7   
8               IMPORTANT END !!!
9               */
10              package
11              cz.cuni.amis.pogamut.udk.communication.messages.gbcommands;
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  		Will change map to MapName - map must exist on server (won't be
35  		tested), will send MAPCHANGE message. When map change occurs all
36  		connections to the server will be shutted down.
37  	
38                            Corresponding GameBots command is
39                            CHANGEMAP.
40                        
41               */
42              
43              public class
44              ChangeMap extends
45          CommandMessage
46  
47              {
48              
49              /**
50                Creates new instance of command ChangeMap.
51                
52  		Will change map to MapName - map must exist on server (won't be
53  		tested), will send MAPCHANGE message. When map change occurs all
54  		connections to the server will be shutted down.
55  	Corresponding GameBots message for this command is
56                CHANGEMAP.
57                    @param MapName Name of the new map.
58                */
59               public ChangeMap(
60                  String MapName) {
61                      
62                      this.MapName = MapName;
63                  
64                  }
65  
66              
67              		/**
68  		             Creates new instance of command ChangeMap.
69  		             
70  		Will change map to MapName - map must exist on server (won't be
71  		tested), will send MAPCHANGE message. When map change occurs all
72  		connections to the server will be shutted down.
73  	Corresponding GameBots message for this command is
74  		             CHANGEMAP.
75  		             <p></p>WARNING: this is empty-command constructor, you have to use setters to fill it up!
76  		             */
77              		public  ChangeMap() {
78              		}
79              	
80  
81              /////// Properties BEGIN
82              
83          /**
84          Name of the new map. */
85          protected
86           String MapName =
87          	null;
88  
89          
90          /**
91          Name of the new map. */
92          public
93          String getMapName() {
94              return
95           MapName;
96          }
97          
98  
99          
100             /**
101         Name of the new map. */
102         public ChangeMap setMapName(String MapName) {
103             this.MapName = MapName;
104             return this;
105             }
106        
107             /////// Properties END
108 
109             /////// Extra Java code BEGIN
110 
111             	/////// Additional code from xslt BEGIN
112             		
113 
114 
115             	/////// Additional code from xslt END
116 
117 	            /////// Extra Java from XML BEGIN
118             		
119             	/////// Extra Java from XML END
120 
121             /////// Extra Java code END
122 
123             
124 
125             /**
126               * Cloning constructor.
127               */
128              public ChangeMap(ChangeMap original) {
129                 
130                      this.MapName=original.MapName;
131                 
132              }
133 
134              
135 
136                  
137             public String toString() {
138                 return
139                 
140                     	toMessage();
141                     
142              }
143 
144              public String toHtmlString() {
145                 return super.toString() +
146             
147             "<b>MapName</b> : " +
148             String.valueOf(MapName) +
149             " <br/> " +
150              "";
151              }
152 
153              
154              
155              	 public String toMessage() {
156               		StringBuffer buf = new StringBuffer();
157               		buf.append("CHANGEMAP");
158               		
159 		    					if (MapName != null) {
160 		    						buf.append(" {MapName " + MapName + "}");
161 		    					}
162 		    				
163             		return buf.toString();
164             }
165              
166              }
167 
168