// Generated by http://code.google.com/p/protostuff/ ... DO NOT EDIT!
// Generated from Cellbots.proto
package com.cellbots.cellserv.client;
import com.google.gwt.core.client.*;
public final class ControllerState extends JavaScriptObject {
public static final class KeyEvent extends JavaScriptObject {
/**
* Creates a new KeyEvent instance
*
* @return new KeyEvent instance
*/
public static native KeyEvent create() /*-{
return {
};
}-*/;
/**
* Creates a new JsArray<KeyEvent> instance
*
* @return new JsArray<KeyEvent> instance
*/
public static native JsArray<KeyEvent> createArray() /*-{
return [];
}-*/;
/**
* Gets a KeyEvent (casting) from a JavaScriptObject
*
* @param JavaScriptObject to cast
* @return KeyEvent
*/
public static native KeyEvent get(JavaScriptObject jso) /*-{
return jso;
}-*/;
/**
* Gets a JsArray<KeyEvent> (casting) from a JavaScriptObject
*
* @param JavaScriptObject to cast
* @return JsArray<KeyEvent>
*/
public static native JsArray<KeyEvent> getArray(JavaScriptObject jso) /*-{
return jso;
}-*/;
/**
* Parses a KeyEvent from a json string
*
* @param json string to be parsed/evaluated
* @return KeyEvent
*/
public static native KeyEvent parse(String json) /*-{
return $wnd.JSON.parse(json);
}-*/;
/**
* Parses a JsArray<KeyEvent> from a json string
*
* @param json string to be parsed/evaluated
* @return JsArray<KeyEvent>
*/
public static native JsArray<KeyEvent> parseArray(String json) /*-{
return $wnd.JSON.parse(json);
}-*/;
/**
* Serializes a json object to a json string.
*
* @param KeyEvent the object to serialize
* @return String the serialized json string
*/
public static native String stringify(KeyEvent obj) /*-{
return $wnd.JSON.stringify(obj);
}-*/;
public static native boolean isInitialized(KeyEvent obj) /*-{
return
obj["keyCode"] != null;
}-*/;
protected KeyEvent() {}
// getters and setters
// keyCode
public native String getKeyCode() /*-{
return this["keyCode"] || "";
}-*/;
public native void setKeyCode(String keyCode) /*-{
this["keyCode"] = keyCode;
}-*/;
public native void clearKeyCode() /*-{
delete this["keyCode"];
}-*/;
public native boolean hasKeyCode() /*-{
return this["keyCode"] != null;
}-*/;
// keyDown
public native boolean getKeyDown() /*-{
return this["keyDown"] || false;
}-*/;
public native void setKeyDown(boolean keyDown) /*-{
this["keyDown"] = keyDown;
}-*/;
public native void clearKeyDown() /*-{
delete this["keyDown"];
}-*/;
public native boolean hasKeyDown() /*-{
return this["keyDown"] != null;
}-*/;
// keyUp
public native boolean getKeyUp() /*-{
return this["keyUp"] || false;
}-*/;
public native void setKeyUp(boolean keyUp) /*-{
this["keyUp"] = keyUp;
}-*/;
public native void clearKeyUp() /*-{
delete this["keyUp"];
}-*/;
public native boolean hasKeyUp() /*-{
return this["keyUp"] != null;
}-*/;
// keyPressure
public native double getKeyPressure() /*-{
return this["keyPressure"] || 0;
}-*/;
public native void setKeyPressure(double keyPressure) /*-{
this["keyPressure"] = keyPressure;
}-*/;
public native void clearKeyPressure() /*-{
delete this["keyPressure"];
}-*/;
public native boolean hasKeyPressure() /*-{
return this["keyPressure"] != null;
}-*/;
}
public static final class StickEvent extends JavaScriptObject {
public static final class StickType extends JavaScriptObject {
public static final StickType ANALOG = create(1);
public static final StickType ORIENTATION = create(2);
public static final StickType LINEAR_ACCEL = create(3);
public static final StickType ANGULAR_ACCEL = create(4);
public static final StickType SLIDER = create(5);
public static final StickType WHEEL = create(6);
public static final StickType MOUSE = create(7);
private static native StickType create(int number) /*-{
return number;
}-*/;
protected StickType() {}
public native int getNumber() /*-{
return this;
}-*/;
}
/**
* Creates a new StickEvent instance
*
* @return new StickEvent instance
*/
public static native StickEvent create() /*-{
return {
};
}-*/;
/**
* Creates a new JsArray<StickEvent> instance
*
* @return new JsArray<StickEvent> instance
*/
public static native JsArray<StickEvent> createArray() /*-{
return [];
}-*/;
/**
* Gets a StickEvent (casting) from a JavaScriptObject
*
* @param JavaScriptObject to cast
* @return StickEvent
*/
public static native StickEvent get(JavaScriptObject jso) /*-{
return jso;
}-*/;
/**
* Gets a JsArray<StickEvent> (casting) from a JavaScriptObject
*
* @param JavaScriptObject to cast
* @return JsArray<StickEvent>
*/
public static native JsArray<StickEvent> getArray(JavaScriptObject jso) /*-{
return jso;
}-*/;
/**
* Parses a StickEvent from a json string
*
* @param json string to be parsed/evaluated
* @return StickEvent
*/
public static native StickEvent parse(String json) /*-{
return $wnd.JSON.parse(json);
}-*/;
/**
* Parses a JsArray<StickEvent> from a json string
*
* @param json string to be parsed/evaluated
* @return JsArray<StickEvent>
*/
public static native JsArray<StickEvent> parseArray(String json) /*-{
return $wnd.JSON.parse(json);
}-*/;
/**
* Serializes a json object to a json string.
*
* @param StickEvent the object to serialize
* @return String the serialized json string
*/
public static native String stringify(StickEvent obj) /*-{
return $wnd.JSON.stringify(obj);
}-*/;
public static native boolean isInitialized(StickEvent obj) /*-{
return
obj["stickType"] != null
&& obj["stickNumber"] != null;
}-*/;
protected StickEvent() {}
// getters and setters
// stickType
public native StickType getStickType() /*-{
var v = this["stickType"];
return v == null ? 1 : v;
}-*/;
public native void setStickType(StickType stickType) /*-{
this["stickType"] = stickType;
}-*/;
public native void clearStickType() /*-{
delete this["stickType"];
}-*/;
public native boolean hasStickType() /*-{
return this["stickType"] != null;
}-*/;
// stickNumber
public native int getStickNumber() /*-{
return this["stickNumber"] || 0;
}-*/;
public native void setStickNumber(int stickNumber) /*-{
this["stickNumber"] = stickNumber;
}-*/;
public native void clearStickNumber() /*-{
delete this["stickNumber"];
}-*/;
public native boolean hasStickNumber() /*-{
return this["stickNumber"] != null;
}-*/;
// x
public native double getX() /*-{
return this["x"] || 0;
}-*/;
public native void setX(double x) /*-{
this["x"] = x;
}-*/;
public native void clearX() /*-{
delete this["x"];
}-*/;
public native boolean hasX() /*-{
return this["x"] != null;
}-*/;
// y
public native double getY() /*-{
return this["y"] || 0;
}-*/;
public native void setY(double y) /*-{
this["y"] = y;
}-*/;
public native void clearY() /*-{
delete this["y"];
}-*/;
public native boolean hasY() /*-{
return this["y"] != null;
}-*/;
// z
public native double getZ() /*-{
return this["z"] || 0;
}-*/;
public native void setZ(double z) /*-{
this["z"] = z;
}-*/;
public native void clearZ() /*-{
delete this["z"];
}-*/;
public native boolean hasZ() /*-{
return this["z"] != null;
}-*/;
}
/**
* Creates a new ControllerState instance
*
* @return new ControllerState instance
*/
public static native ControllerState create() /*-{
return {
};
}-*/;
/**
* Creates a new JsArray<ControllerState> instance
*
* @return new JsArray<ControllerState> instance
*/
public static native JsArray<ControllerState> createArray() /*-{
return [];
}-*/;
/**
* Gets a ControllerState (casting) from a JavaScriptObject
*
* @param JavaScriptObject to cast
* @return ControllerState
*/
public static native ControllerState get(JavaScriptObject jso) /*-{
return jso;
}-*/;
/**
* Gets a JsArray<ControllerState> (casting) from a JavaScriptObject
*
* @param JavaScriptObject to cast
* @return JsArray<ControllerState>
*/
public static native JsArray<ControllerState> getArray(JavaScriptObject jso) /*-{
return jso;
}-*/;
/**
* Parses a ControllerState from a json string
*
* @param json string to be parsed/evaluated
* @return ControllerState
*/
public static native ControllerState parse(String json) /*-{
return $wnd.JSON.parse(json);
}-*/;
/**
* Parses a JsArray<ControllerState> from a json string
*
* @param json string to be parsed/evaluated
* @return JsArray<ControllerState>
*/
public static native JsArray<ControllerState> parseArray(String json) /*-{
return $wnd.JSON.parse(json);
}-*/;
/**
* Serializes a json object to a json string.
*
* @param ControllerState the object to serialize
* @return String the serialized json string
*/
public static native String stringify(ControllerState obj) /*-{
return $wnd.JSON.stringify(obj);
}-*/;
public static native boolean isInitialized(ControllerState obj) /*-{
return
obj["timestamp"] != null;
}-*/;
protected ControllerState() {}
// getters and setters
// timestamp
public native double getTimestamp() /*-{
return this["timestamp"] || 0;
}-*/;
public native void setTimestamp(double timestamp) /*-{
this["timestamp"] = timestamp;
}-*/;
public native void clearTimestamp() /*-{
delete this["timestamp"];
}-*/;
public native boolean hasTimestamp() /*-{
return this["timestamp"] != null;
}-*/;
// keyEvent
public native JsArray<KeyEvent> getKeyEventArray() /*-{
return this["keyEvent"];
}-*/;
public native void setKeyEventArray(JsArray<KeyEvent> keyEvent) /*-{
this["keyEvent"] = keyEvent;
}-*/;
public native JsArray<KeyEvent> clearKeyEventArray() /*-{
return (this["keyEvent"] = []);
}-*/;
public KeyEvent getKeyEvent(int index) {
JsArray<KeyEvent> array = getKeyEventArray();
return array == null ? null : array.get(index);
}
public int getKeyEventCount() {
JsArray<KeyEvent> array = getKeyEventArray();
return array == null ? 0 : array.length();
}
public void addKeyEvent(KeyEvent keyEvent) {
JsArray<KeyEvent> array = getKeyEventArray();
if(array == null)
array = clearKeyEventArray();
array.push(keyEvent);
}
// stickEvent
public native JsArray<StickEvent> getStickEventArray() /*-{
return this["stickEvent"];
}-*/;
public native void setStickEventArray(JsArray<StickEvent> stickEvent) /*-{
this["stickEvent"] = stickEvent;
}-*/;
public native JsArray<StickEvent> clearStickEventArray() /*-{
return (this["stickEvent"] = []);
}-*/;
public StickEvent getStickEvent(int index) {
JsArray<StickEvent> array = getStickEventArray();
return array == null ? null : array.get(index);
}
public int getStickEventCount() {
JsArray<StickEvent> array = getStickEventArray();
return array == null ? 0 : array.length();
}
public void addStickEvent(StickEvent stickEvent) {
JsArray<StickEvent> array = getStickEventArray();
if(array == null)
array = clearStickEventArray();
array.push(stickEvent);
}
// txtCommand
public native String getTxtCommand() /*-{
return this["txtCommand"] || "";
}-*/;
public native void setTxtCommand(String txtCommand) /*-{
this["txtCommand"] = txtCommand;
}-*/;
public native void clearTxtCommand() /*-{
delete this["txtCommand"];
}-*/;
public native boolean hasTxtCommand() /*-{
return this["txtCommand"] != null;
}-*/;
// controllerID
public native String getControllerID() /*-{
return this["controllerID"] || "";
}-*/;
public native void setControllerID(String controllerID) /*-{
this["controllerID"] = controllerID;
}-*/;
public native void clearControllerID() /*-{
delete this["controllerID"];
}-*/;
public native boolean hasControllerID() /*-{
return this["controllerID"] != null;
}-*/;
// botID
public native String getBotID() /*-{
return this["botID"] || "";
}-*/;
public native void setBotID(String botID) /*-{
this["botID"] = botID;
}-*/;
public native void clearBotID() /*-{
delete this["botID"];
}-*/;
public native boolean hasBotID() /*-{
return this["botID"] != null;
}-*/;
}