Merry Christmas to the server CPUs. It occurred to me that we could
accomplish our "previous value" support in the distributed object system without using reflection and could also avoid using reflection in the case where we have already applied the event on the server (which is generally the case on the server). Rather than hacking up the gendobj script, I took this opportunity also to rewrite the DObject generation script as an Ant task and in doing so, implemented another recent idea which is that we can just augment the FooObject.java file instead of having a separate .dobj and .java file. You'd think it was spring there's so much cleaning going on. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3284 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
/**
|
||||
* Requests that the <code>$field</code> field be set to the
|
||||
* specified value. The local value will be updated immediately and an
|
||||
* event will be propagated through the system to notify all listeners
|
||||
* that the attribute did change. Proxied copies of this object (on
|
||||
* clients) will apply the value change when they received the
|
||||
* attribute changed notification.
|
||||
*/
|
||||
public void set$upfield ($type value)
|
||||
{
|
||||
$type ovalue = this.$field;
|
||||
requestAttributeChange(
|
||||
$capfield, $wrapfield, $wrapofield);
|
||||
this.$field = value;
|
||||
}
|
||||
#if ($elemtype)
|
||||
|
||||
/**
|
||||
* Requests that the <code>index</code>th element of
|
||||
* <code>$field</code> field be set to the specified value.
|
||||
* The local value will be updated immediately and an event will be
|
||||
* propagated through the system to notify all listeners that the
|
||||
* attribute did change. Proxied copies of this object (on clients)
|
||||
* will apply the value change when they received the attribute
|
||||
* changed notification.
|
||||
*/
|
||||
public void set${upfield}At ($elemtype value, int index)
|
||||
{
|
||||
$elemtype ovalue = this.$field[index];
|
||||
requestElementUpdate(
|
||||
$capfield, index, $wrapelem, $wrapoelem);
|
||||
this.$field[index] = value;
|
||||
}
|
||||
#end
|
||||
Reference in New Issue
Block a user