Added build directives to generate dobj source files; made test object a
generated dobj class. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@969 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
+9
-1
@@ -25,8 +25,16 @@
|
|||||||
<fileset dir="${java.libraries}" includes="**/*.jar"/>
|
<fileset dir="${java.libraries}" includes="**/*.jar"/>
|
||||||
</path>
|
</path>
|
||||||
|
|
||||||
|
<!-- generates .java files for all .dobj files -->
|
||||||
|
<target name="gendobj">
|
||||||
|
<apply executable="../bin/gendobj" failonerror="true">
|
||||||
|
<srcfile/>
|
||||||
|
<fileset dir="src/java" includes="**/*.dobj"/>
|
||||||
|
</apply>
|
||||||
|
</target>
|
||||||
|
|
||||||
<!-- prepares the application directories -->
|
<!-- prepares the application directories -->
|
||||||
<target name="prepare">
|
<target name="prepare" depends="gendobj">
|
||||||
<mkdir dir="${deploy.dir}"/>
|
<mkdir dir="${deploy.dir}"/>
|
||||||
<mkdir dir="${deploy.dir}/classes"/>
|
<mkdir dir="${deploy.dir}/classes"/>
|
||||||
<copy todir="${deploy.dir}/classes">
|
<copy todir="${deploy.dir}/classes">
|
||||||
|
|||||||
@@ -1,49 +1,16 @@
|
|||||||
//
|
//
|
||||||
// $Id: TestObject.dobj,v 1.6 2002/02/05 20:27:59 mdb Exp $
|
// $Id: TestObject.dobj,v 1.7 2002/02/08 23:17:38 mdb Exp $
|
||||||
|
|
||||||
package com.threerings.presents.server;
|
package com.threerings.presents.server;
|
||||||
|
|
||||||
import com.threerings.presents.dobj.*;
|
import com.threerings.presents.dobj.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* I use this to test until I get the actual DObject generation script
|
* A test distributed object.
|
||||||
* working.
|
|
||||||
*/
|
*/
|
||||||
public class TestObject extends DObject
|
public class TestObject extends DObject
|
||||||
{
|
{
|
||||||
public static final String FOO = "foo";
|
|
||||||
public static final String BAR = "bar";
|
|
||||||
public static final String LIST = "list";
|
|
||||||
|
|
||||||
public int foo;
|
public int foo;
|
||||||
public String bar;
|
public String bar;
|
||||||
public OidList list = new OidList();
|
public OidList list = new OidList();
|
||||||
|
|
||||||
public void setFoo (int foo)
|
|
||||||
{
|
|
||||||
requestAttributeChange(FOO, new Integer(foo));
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setBar (String bar)
|
|
||||||
{
|
|
||||||
requestAttributeChange(BAR, bar);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Requests that the specified oid be added to the
|
|
||||||
* <code>list</code> oid list.
|
|
||||||
*/
|
|
||||||
public void addToList (int oid)
|
|
||||||
{
|
|
||||||
requestOidAdd(LIST, oid);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Requests that the specified oid be removed from the
|
|
||||||
* <code>list</code> oid list.
|
|
||||||
*/
|
|
||||||
public void removeFromList (int oid)
|
|
||||||
{
|
|
||||||
requestOidRemove(LIST, oid);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,85 @@
|
|||||||
|
//
|
||||||
|
// $Id: TestObject.java,v 1.1 2002/02/08 23:17:38 mdb Exp $
|
||||||
|
|
||||||
|
package com.threerings.presents.server;
|
||||||
|
|
||||||
|
import com.threerings.presents.dobj.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A test distributed object.
|
||||||
|
*/
|
||||||
|
public class TestObject extends DObject
|
||||||
|
{
|
||||||
|
/** The field name of the <code>foo</code> field. */
|
||||||
|
public static final String FOO = "foo";
|
||||||
|
|
||||||
|
/** The field name of the <code>bar</code> field. */
|
||||||
|
public static final String BAR = "bar";
|
||||||
|
|
||||||
|
/** The field name of the <code>list</code> field. */
|
||||||
|
public static final String LIST = "list";
|
||||||
|
|
||||||
|
public int foo;
|
||||||
|
public String bar;
|
||||||
|
public OidList list = new OidList();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Requests that the <code>foo</code> field be set to the specified
|
||||||
|
* value.
|
||||||
|
*/
|
||||||
|
public void setFoo (int foo)
|
||||||
|
{
|
||||||
|
requestAttributeChange(FOO, new Integer(foo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Requests that the <code>foo</code> field be set to the
|
||||||
|
* specified value and immediately updates the state of the object
|
||||||
|
* to reflect the change. This should <em>only</em> be called on the
|
||||||
|
* server and only then if you know what you're doing.
|
||||||
|
*/
|
||||||
|
public void setFooImmediate (int foo)
|
||||||
|
{
|
||||||
|
this.foo = foo;
|
||||||
|
requestAttributeChange(FOO, new Integer(foo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Requests that the <code>bar</code> field be set to the specified
|
||||||
|
* value.
|
||||||
|
*/
|
||||||
|
public void setBar (String bar)
|
||||||
|
{
|
||||||
|
requestAttributeChange(BAR, bar);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Requests that the <code>bar</code> field be set to the
|
||||||
|
* specified value and immediately updates the state of the object
|
||||||
|
* to reflect the change. This should <em>only</em> be called on the
|
||||||
|
* server and only then if you know what you're doing.
|
||||||
|
*/
|
||||||
|
public void setBarImmediate (String bar)
|
||||||
|
{
|
||||||
|
this.bar = bar;
|
||||||
|
requestAttributeChange(BAR, bar);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Requests that the specified oid be added to the
|
||||||
|
* <code>list</code> oid list.
|
||||||
|
*/
|
||||||
|
public void addToList (int oid)
|
||||||
|
{
|
||||||
|
requestOidAdd(LIST, oid);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Requests that the specified oid be removed from the
|
||||||
|
* <code>list</code> oid list.
|
||||||
|
*/
|
||||||
|
public void removeFromList (int oid)
|
||||||
|
{
|
||||||
|
requestOidRemove(LIST, oid);
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user