diff --git a/src/as/com/threerings/crowd/data/LocationMarshaller.as b/src/as/com/threerings/crowd/data/LocationMarshaller.as
index 6d0f82dfb..f568d2e8f 100644
--- a/src/as/com/threerings/crowd/data/LocationMarshaller.as
+++ b/src/as/com/threerings/crowd/data/LocationMarshaller.as
@@ -55,7 +55,7 @@ public class LocationMarshaller extends InvocationMarshaller
// documentation inherited from interface
public function moveTo (arg1 :Client, arg2 :int, arg3 :MoveListener) :void
{
- var listener3 :MoveMarshaller = new MoveMarshaller();
+ var listener3 :LocationMarshaller_MoveMarshaller = new LocationMarshaller_MoveMarshaller();
listener3.listener = arg3;
sendRequest(arg1, MOVE_TO, [ new Integer(arg2), listener3 ]);
}
diff --git a/src/as/com/threerings/crowd/data/MoveMarshaller.as b/src/as/com/threerings/crowd/data/LocationMarshaller_MoveMarshaller.as
similarity index 89%
rename from src/as/com/threerings/crowd/data/MoveMarshaller.as
rename to src/as/com/threerings/crowd/data/LocationMarshaller_MoveMarshaller.as
index ba94816e1..3e7dc3df2 100644
--- a/src/as/com/threerings/crowd/data/MoveMarshaller.as
+++ b/src/as/com/threerings/crowd/data/LocationMarshaller_MoveMarshaller.as
@@ -4,7 +4,7 @@ import com.threerings.presents.data.ListenerMarshaller;
import com.threerings.crowd.client.MoveListener
-public class MoveMarshaller extends ListenerMarshaller
+public class LocationMarshaller_MoveMarshaller extends ListenerMarshaller
{
/** The method id used to dispatch {@link #moveSucceeded}
* responses. */
diff --git a/src/as/com/threerings/crowd/data/OccupantInfo.as b/src/as/com/threerings/crowd/data/OccupantInfo.as
index 808610a95..d331c5f79 100644
--- a/src/as/com/threerings/crowd/data/OccupantInfo.as
+++ b/src/as/com/threerings/crowd/data/OccupantInfo.as
@@ -24,7 +24,7 @@ package com.threerings.crowd.data {
import com.threerings.util.Integer;
import com.threerings.util.Name;
-import com.threerings.presents.dobj.DSetEntry;
+import com.threerings.presents.dobj.DSet_Entry;
import com.threerings.crowd.data.BodyObject;
@@ -48,7 +48,7 @@ import com.threerings.io.ObjectOutputStream;
* is requested.
*/
public class OccupantInfo
- implements DSetEntry
+ implements DSet_Entry
{
/** Constant value for {@link #status}. */
public static const ACTIVE :int = 0;
@@ -77,7 +77,7 @@ public class OccupantInfo
return bodyOid.value;
}
- // documentation inherited from interface DSetEntry
+ // documentation inherited from interface DSet_Entry
public function getKey () :Object
{
return bodyOid;
diff --git a/src/as/com/threerings/crowd/data/PlaceObject.as b/src/as/com/threerings/crowd/data/PlaceObject.as
index 5c2fb63d7..53b950488 100644
--- a/src/as/com/threerings/crowd/data/PlaceObject.as
+++ b/src/as/com/threerings/crowd/data/PlaceObject.as
@@ -29,7 +29,7 @@ import com.threerings.io.ObjectOutputStream;
import com.threerings.presents.dobj.DObject;
import com.threerings.presents.dobj.DSet;
-import com.threerings.presents.dobj.DSetEntry;
+import com.threerings.presents.dobj.DSet_Entry;
import com.threerings.presents.dobj.OidList;
import com.threerings.crowd.Log;
@@ -121,7 +121,7 @@ public class PlaceObject extends DObject
* occupantInfo set. The set will not change until the event is
* actually propagated through the system.
*/
- public function addToOccupantInfo (elem :DSetEntry) :void
+ public function addToOccupantInfo (elem :DSet_Entry) :void
{
requestEntryAdd(OCCUPANT_INFO, elem);
}
@@ -141,7 +141,7 @@ public class PlaceObject extends DObject
* occupantInfo set. The set will not change until the event is
* actually propagated through the system.
*/
- public function updateOccupantInfo (elem :DSetEntry) :void
+ public function updateOccupantInfo (elem :DSet_Entry) :void
{
requestEntryUpdate(OCCUPANT_INFO, elem);
}
diff --git a/src/as/com/threerings/io/Translations.as b/src/as/com/threerings/io/Translations.as
index 49eb4f2d2..9ae1a0762 100644
--- a/src/as/com/threerings/io/Translations.as
+++ b/src/as/com/threerings/io/Translations.as
@@ -11,13 +11,13 @@ public class Translations
public static function getToServer (asName :String) :String
{
var javaName :String = (_toServer.get(asName) as String);
- return (javaName == null) ? asName : javaName;
+ return (javaName == null) ? asName.replace("_", "$") : javaName;
}
public static function getFromServer (javaName :String) :String
{
var asName :String = (_fromServer.get(javaName) as String);
- return (asName == null) ? javaName : asName;
+ return (asName == null) ? javaName.replace("$", "_") : asName;
}
public static function addTranslation (
diff --git a/src/as/com/threerings/presents/client/Communicator.as b/src/as/com/threerings/presents/client/Communicator.as
index 622c81ed7..5eba62ab1 100644
--- a/src/as/com/threerings/presents/client/Communicator.as
+++ b/src/as/com/threerings/presents/client/Communicator.as
@@ -51,21 +51,9 @@ public class Communicator
inputFrameReceived);
_inStream = new ObjectInputStream();
- addClassTranslations();
-
_socket.connect(_client.getHostname(), _client.getPort());
}
- private function addClassTranslations () :void
- {
- Translations.addTranslation(
- "com.threerings.presents.dobj.DSetEntry",
- "com.threerings.presents.dobj.DSet$Entry");
- Translations.addTranslation(
- "com.threerings.crowd.data.MoveMarshaller",
- "com.threerings.crowd.data.LocationMarshaller$MoveMarshaller");
- }
-
public function logoff () :void
{
if (_socket == null) {
diff --git a/src/as/com/threerings/presents/client/InvocationRegistration.as b/src/as/com/threerings/presents/client/InvocationRegistration.as
index 061c34400..6f95367fc 100644
--- a/src/as/com/threerings/presents/client/InvocationRegistration.as
+++ b/src/as/com/threerings/presents/client/InvocationRegistration.as
@@ -6,7 +6,7 @@ import com.threerings.io.ObjectInputStream;
import com.threerings.io.ObjectOutputStream;
import com.threerings.presents.dobj.DSet;
-import com.threerings.presents.dobj.DSetEntry;
+import com.threerings.presents.dobj.DSet_Entry;
/**
* Used to maintain a registry of invocation receivers that can be
@@ -14,7 +14,7 @@ import com.threerings.presents.dobj.DSetEntry;
* numbers.
*/
public class InvocationRegistration
- implements DSetEntry
+ implements DSet_Entry
{
/** The unique hash code associated with this invocation receiver class. */
public var receiverCode :String;
@@ -31,7 +31,7 @@ public class InvocationRegistration
this.receiverId = receiverId;
}
- // documentation inherited from interface DSetEntry
+ // documentation inherited from interface DSet_Entry
public function getKey () :Object
{
return receiverCode;
diff --git a/src/as/com/threerings/presents/data/ClientObject.as b/src/as/com/threerings/presents/data/ClientObject.as
index 2b34813e7..aa38b4d13 100644
--- a/src/as/com/threerings/presents/data/ClientObject.as
+++ b/src/as/com/threerings/presents/data/ClientObject.as
@@ -71,7 +71,7 @@ public class ClientObject extends DObject
}
// AUTO-GENERATED: METHODS START
- public function addToReceivers (elem :DSetEntry) :void
+ public function addToReceivers (elem :DSet_Entry) :void
{
requestEntryAdd(RECEIVERS, elem);
}
@@ -81,7 +81,7 @@ public class ClientObject extends DObject
requestEntryRemove(RECEIVERS, key);
}
- public function updateReceivers (elem :DSetEntry) :void
+ public function updateReceivers (elem :DSet_Entry) :void
{
requestEntryUpdate(RECEIVERS, elem);
}
diff --git a/src/as/com/threerings/presents/dobj/DEvent.as b/src/as/com/threerings/presents/dobj/DEvent.as
index fec01fea4..64292c7e7 100644
--- a/src/as/com/threerings/presents/dobj/DEvent.as
+++ b/src/as/com/threerings/presents/dobj/DEvent.as
@@ -98,17 +98,17 @@ public /* abstract */ class DEvent
/** The oid of the object that is the target of this event. */
protected var _toid :int;
- protected static const UNSET_OLD_ENTRY :DSetEntry = new DummyEntry();
+ protected static const UNSET_OLD_ENTRY :DSet_Entry = new DummyEntry();
}
}
/*
-import com.threerings.presents.dobj.DSetEntry;
+import com.threerings.presents.dobj.DSet_Entry;
import com.threerings.io.ObjectInputStream;
import com.threerings.io.ObjectOutputStream;
-class DummyEntry implements DSetEntry
+class DummyEntry implements DSet_Entry
{
public function DummyEntry ()
{
diff --git a/src/as/com/threerings/presents/dobj/DObject.as b/src/as/com/threerings/presents/dobj/DObject.as
index 67d28ee20..6666951f2 100644
--- a/src/as/com/threerings/presents/dobj/DObject.as
+++ b/src/as/com/threerings/presents/dobj/DObject.as
@@ -240,7 +240,7 @@ public class DObject // extends EventDispatcher
/**
* Calls by derived instances when a set adder method was called.
*/
- protected function requestEntryAdd (name :String, entry :DSetEntry) :void
+ protected function requestEntryAdd (name :String, entry :DSet_Entry) :void
{
// dispatch an entry added event
postEvent(new EntryAddedEvent(_oid, name, entry));
@@ -258,7 +258,7 @@ public class DObject // extends EventDispatcher
/**
* Calls by derived instances when a set updater method was called.
*/
- protected function requestEntryUpdate (name :String, entry :DSetEntry) :void
+ protected function requestEntryUpdate (name :String, entry :DSet_Entry) :void
{
// dispatch an entry updated event
postEvent(new EntryUpdatedEvent(_oid, name, entry, null));
diff --git a/src/as/com/threerings/presents/dobj/DSet.as b/src/as/com/threerings/presents/dobj/DSet.as
index 7787e700e..8b7c0a286 100644
--- a/src/as/com/threerings/presents/dobj/DSet.as
+++ b/src/as/com/threerings/presents/dobj/DSet.as
@@ -49,7 +49,7 @@ public class DSet
* equals() the key returned by getKey() of
* the supplied entry. Returns false otherwise.
*/
- public function contains (elem :DSetEntry) :Boolean
+ public function contains (elem :DSet_Entry) :Boolean
{
return containsKey(elem.getKey());
}
@@ -68,10 +68,10 @@ public class DSet
* the specified key or null if no entry could be found that matches
* the key.
*/
- public function get (key :Object) :DSetEntry
+ public function get (key :Object) :DSet_Entry
{
// o(n) for now
- for each (var entry :DSetEntry in _entries) {
+ for each (var entry :DSet_Entry in _entries) {
if (isSameKey(key, entry.getKey())) {
return entry;
}
@@ -112,7 +112,7 @@ public class DSet
* @return true if the entry was added, false if it was already in
* the set.
*/
- internal function add (elem :DSetEntry) :Boolean
+ internal function add (elem :DSet_Entry) :Boolean
{
if (_entries.length == 0) {
// there is nothing in the map yet, check the key validity
@@ -140,7 +140,7 @@ public class DSet
* @return true if the entry was removed, false if it was not in the
* set.
*/
- internal function remove (elem :DSetEntry) :Boolean
+ internal function remove (elem :DSet_Entry) :Boolean
{
return (null != removeKey(elem.getKey()));
}
@@ -154,11 +154,11 @@ public class DSet
* @return the old matching entry if found and removed, null if not
* found.
*/
- internal function removeKey (key :Object) :DSetEntry
+ internal function removeKey (key :Object) :DSet_Entry
{
// o(n) for now
for (var ii :int = 0; ii < _entries.length; ii++) {
- var entry :DSetEntry = _entries[ii];
+ var entry :DSet_Entry = _entries[ii];
if (isSameKey(key, entry.getKey())) {
_entries.splice(ii, 1);
return entry;
@@ -177,11 +177,11 @@ public class DSet
* @return the old entry that was replaced, or null if it was not
* found (in which case nothing is updated).
*/
- internal function update (elem :DSetEntry) :DSetEntry
+ internal function update (elem :DSet_Entry) :DSet_Entry
{
var key :Object = elem.getKey();
for (var ii :int = 0; ii < _entries.length; ii++) {
- var entry :DSetEntry = _entries[ii];
+ var entry :DSet_Entry = _entries[ii];
if (isSameKey(key, entry.getKey())) {
_entries[ii] = elem;
return entry; // return the old entry
diff --git a/src/as/com/threerings/presents/dobj/DSetEntry.as b/src/as/com/threerings/presents/dobj/DSet_Entry.as
similarity index 89%
rename from src/as/com/threerings/presents/dobj/DSetEntry.as
rename to src/as/com/threerings/presents/dobj/DSet_Entry.as
index 5d08d738b..106b5adf9 100644
--- a/src/as/com/threerings/presents/dobj/DSetEntry.as
+++ b/src/as/com/threerings/presents/dobj/DSet_Entry.as
@@ -4,7 +4,7 @@ import com.threerings.util.Equalable;
import com.threerings.io.Streamable;
-public interface DSetEntry extends Streamable
+public interface DSet_Entry extends Streamable
{
/**
* Get the key used to identify this object. On the java side of things,
diff --git a/src/as/com/threerings/presents/dobj/DummyEntry.as b/src/as/com/threerings/presents/dobj/DummyEntry.as
index f4d94a9c9..0f5bb6cfb 100644
--- a/src/as/com/threerings/presents/dobj/DummyEntry.as
+++ b/src/as/com/threerings/presents/dobj/DummyEntry.as
@@ -4,13 +4,13 @@ import com.threerings.io.ObjectInputStream;
import com.threerings.io.ObjectOutputStream;
public class DummyEntry
- implements DSetEntry
+ implements DSet_Entry
{
public function DummyEntry ()
{
}
- // documentation inherited from interface DSetEntry
+ // documentation inherited from interface DSet_Entry
public function getKey () :Object
{
return null; // dummy
diff --git a/src/as/com/threerings/presents/dobj/EntryAddedEvent.as b/src/as/com/threerings/presents/dobj/EntryAddedEvent.as
index d42696cdc..5ddccdd7b 100644
--- a/src/as/com/threerings/presents/dobj/EntryAddedEvent.as
+++ b/src/as/com/threerings/presents/dobj/EntryAddedEvent.as
@@ -27,7 +27,7 @@ public class EntryAddedEvent extends NamedEvent
* @param entry the entry to add to the set attribute.
*/
public function EntryAddedEvent (
- targetOid :int = 0, name :String = null, entry :DSetEntry = null)
+ targetOid :int = 0, name :String = null, entry :DSet_Entry = null)
{
super(targetOid, name);
_entry = entry;
@@ -36,7 +36,7 @@ public class EntryAddedEvent extends NamedEvent
/**
* Returns the entry that has been added.
*/
- public function getEntry () :DSetEntry
+ public function getEntry () :DSet_Entry
{
return _entry;
}
@@ -79,9 +79,9 @@ public class EntryAddedEvent extends NamedEvent
public override function readObject (ins :ObjectInputStream) :void
{
super.readObject(ins);
- _entry = (ins.readObject() as DSetEntry);
+ _entry = (ins.readObject() as DSet_Entry);
}
- protected var _entry :DSetEntry;
+ protected var _entry :DSet_Entry;
}
}
diff --git a/src/as/com/threerings/presents/dobj/EntryRemovedEvent.as b/src/as/com/threerings/presents/dobj/EntryRemovedEvent.as
index 129676608..cdac9b579 100644
--- a/src/as/com/threerings/presents/dobj/EntryRemovedEvent.as
+++ b/src/as/com/threerings/presents/dobj/EntryRemovedEvent.as
@@ -30,7 +30,7 @@ public class EntryRemovedEvent extends NamedEvent
*/
public function EntryRemovedEvent (
targetOid :int = 0, name :String = null, key :Object = null,
- oldEntry :DSetEntry = null)
+ oldEntry :DSet_Entry = null)
{
super(targetOid, name);
_key = key;
@@ -50,7 +50,7 @@ public class EntryRemovedEvent extends NamedEvent
/**
* Returns the entry that was in the set prior to being updated.
*/
- public function getOldEntry () :DSetEntry
+ public function getOldEntry () :DSet_Entry
{
return _oldEntry;
}
@@ -104,6 +104,6 @@ public class EntryRemovedEvent extends NamedEvent
}
protected var _key :Object;
- protected var _oldEntry :DSetEntry = UNSET_OLD_ENTRY;
+ protected var _oldEntry :DSet_Entry = UNSET_OLD_ENTRY;
}
}
diff --git a/src/as/com/threerings/presents/dobj/EntryUpdatedEvent.as b/src/as/com/threerings/presents/dobj/EntryUpdatedEvent.as
index 678ad4166..6f6791015 100644
--- a/src/as/com/threerings/presents/dobj/EntryUpdatedEvent.as
+++ b/src/as/com/threerings/presents/dobj/EntryUpdatedEvent.as
@@ -28,8 +28,8 @@ public class EntryUpdatedEvent extends NamedEvent
* @param oldEntry the previous value of the entry.
*/
public function EntryUpdatedEvent (
- targetOid :int = 0, name :String = null, entry :DSetEntry = null,
- oldEntry :DSetEntry = null)
+ targetOid :int = 0, name :String = null, entry :DSet_Entry = null,
+ oldEntry :DSet_Entry = null)
{
super(targetOid, name);
_entry = entry;
@@ -41,7 +41,7 @@ public class EntryUpdatedEvent extends NamedEvent
/**
* Returns the entry that has been updated.
*/
- public function getEntry () :DSetEntry
+ public function getEntry () :DSet_Entry
{
return _entry;
}
@@ -49,7 +49,7 @@ public class EntryUpdatedEvent extends NamedEvent
/**
* Returns the entry that was in the set prior to being updated.
*/
- public function getOldEntry ():DSetEntry
+ public function getOldEntry ():DSet_Entry
{
return _oldEntry;
}
@@ -100,10 +100,10 @@ public class EntryUpdatedEvent extends NamedEvent
public override function readObject (ins :ObjectInputStream) :void
{
super.readObject(ins);
- _entry = (ins.readObject() as DSetEntry);
+ _entry = (ins.readObject() as DSet_Entry);
}
- protected var _entry :DSetEntry;
- protected var _oldEntry :DSetEntry = UNSET_OLD_ENTRY;
+ protected var _entry :DSet_Entry;
+ protected var _oldEntry :DSet_Entry = UNSET_OLD_ENTRY;
}
}