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 REC.
15   		 *
16   		 * 
17  		Server will start recording demo of current game. Command is
18  		confirmed by RECSTART message.
19  	
20           */
21   	public class Record 
22  		extends CommandMessage
23  	        {
24  	        	
25  		        
26      	/** Example how the message looks like - used during parser tests. */
27      	public static final String PROTOTYPE =
28      		" {FileName text} ";
29      
30  		/**
31  		 * Creates new instance of command Record.
32  		 * 
33  		Server will start recording demo of current game. Command is
34  		confirmed by RECSTART message.
35  	
36  		 * Corresponding GameBots message for this command is
37  		 * REC.
38  		 *
39  		 * 
40  		 *    @param FileName 
41  			Name of the saved demo file. The file will be located on the
42  			server.
43  		
44  		 */
45  		public Record(
46  			String FileName
47  		) {
48  			
49  				this.FileName = FileName;
50              
51  		}
52  
53  		
54  			/**
55  			 * Creates new instance of command Record.
56  			 * 
57  		Server will start recording demo of current game. Command is
58  		confirmed by RECSTART message.
59  	
60  			 * Corresponding GameBots message for this command is
61  			 * REC.
62  			 * <p></p>
63  			 * WARNING: this is empty-command constructor, you have to use setters to fill it up with data that should be sent to GameBots2004!
64  		     */
65  		    public Record() {
66  		    }
67  			
68  		
69  		/**
70  		 * Cloning constructor.
71  		 *
72  		 * @param original
73  		 */
74  		public Record(Record original) {
75  		   
76  		        this.FileName = original.FileName;
77  		   
78  		}
79      
80  	        /**
81  	        
82  			Name of the saved demo file. The file will be located on the
83  			server.
84  		 
85  	        */
86  	        protected
87  	         String FileName =
88  	       	
89  	        		null
90  	        	;
91  	
92  	        
93  	        
94   		/**
95           * 
96  			Name of the saved demo file. The file will be located on the
97  			server.
98  		 
99           */
100         public String getFileName()
101  	
102 	        {
103 	            return
104 	        	 FileName;
105 	        }
106 	        
107 	        
108 	        
109  		
110  		/**
111          * 
112 			Name of the saved demo file. The file will be located on the
113 			server.
114 		 
115          */
116         public Record 
117         setFileName(String FileName)
118  	
119 			{
120 				this.FileName = FileName;
121 				return this;
122 			}
123 		
124  	    public String toString() {
125             return toMessage();
126         }
127  	
128  		public String toHtmlString() {
129 			return super.toString() + "[<br/>" +
130             	
131             	"<b>FileName</b> = " +
132             	String.valueOf(getFileName()
133  	) +
134             	" <br/> " +
135             	 
136             	"<br/>]"
137             ;
138 		}
139  	
140 		public String toMessage() {
141      		StringBuffer buf = new StringBuffer();
142      		buf.append("REC");
143      		
144 						if (FileName != null) {
145 							buf.append(" {FileName " + FileName + "}");
146 						}
147 					
148    			return buf.toString();
149    		}
150  	
151  		// --- Extra Java from XML BEGIN (extra/code/java)
152         	
153 		// --- Extra Java from XML END (extra/code/java)
154  	
155 	        }
156