I decided to go hog wild and clean up all the type use in Presents which
required some serious bending and folding of the generic type system, but for the most part we managed to avoid any mutilating. The gendobj task now generates properly typed "addToXXX" and "updateXXX" DSet methods based on the parameterized type of the DSet. This might cause unrecompiled code to break, but I don't think there are many cases in the base toolkit where people call DSet adders or updaters. We'll see and I'll add backwards compatibility versions for cases where we need them to support GG games (everything else we can just recompile). git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4245 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -21,6 +21,8 @@
|
||||
|
||||
package com.threerings.presents.data;
|
||||
|
||||
import com.threerings.presents.client.InvocationReceiver;
|
||||
|
||||
import com.threerings.presents.dobj.DObject;
|
||||
import com.threerings.presents.dobj.DSet;
|
||||
|
||||
@@ -43,7 +45,8 @@ public class ClientObject extends DObject
|
||||
|
||||
/** Used to publish all invocation service receivers registered on
|
||||
* this client. */
|
||||
public DSet receivers = new DSet();
|
||||
public DSet<InvocationReceiver.Registration> receivers =
|
||||
new DSet<InvocationReceiver.Registration>();
|
||||
|
||||
/**
|
||||
* Returns a short string identifying this client.
|
||||
@@ -87,7 +90,7 @@ public class ClientObject extends DObject
|
||||
* <code>receivers</code> set. The set will not change until the event is
|
||||
* actually propagated through the system.
|
||||
*/
|
||||
public void addToReceivers (DSet.Entry elem)
|
||||
public void addToReceivers (InvocationReceiver.Registration elem)
|
||||
{
|
||||
requestEntryAdd(RECEIVERS, receivers, elem);
|
||||
}
|
||||
@@ -107,7 +110,7 @@ public class ClientObject extends DObject
|
||||
* <code>receivers</code> set. The set will not change until the event is
|
||||
* actually propagated through the system.
|
||||
*/
|
||||
public void updateReceivers (DSet.Entry elem)
|
||||
public void updateReceivers (InvocationReceiver.Registration elem)
|
||||
{
|
||||
requestEntryUpdate(RECEIVERS, receivers, elem);
|
||||
}
|
||||
@@ -122,7 +125,7 @@ public class ClientObject extends DObject
|
||||
* change. Proxied copies of this object (on clients) will apply the
|
||||
* value change when they received the attribute changed notification.
|
||||
*/
|
||||
public void setReceivers (DSet value)
|
||||
public void setReceivers (DSet<com.threerings.presents.client.InvocationReceiver.Registration> value)
|
||||
{
|
||||
requestAttributeChange(RECEIVERS, value, this.receivers);
|
||||
this.receivers = (value == null) ? null : value.typedClone();
|
||||
|
||||
Reference in New Issue
Block a user