Regenerated our DObject derivations in the new world order.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3288 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// $Id: SceneObject.java,v 1.3 2004/08/27 02:20:42 mdb Exp $
|
||||
// $Id$
|
||||
//
|
||||
// Narya library - tools for developing networked games
|
||||
// Copyright (C) 2002-2004 Three Rings Design, Inc., All Rights Reserved
|
||||
|
||||
@@ -1,47 +0,0 @@
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
// Narya library - tools for developing networked games
|
||||
// Copyright (C) 2002-2004 Three Rings Design, Inc., All Rights Reserved
|
||||
// http://www.threerings.net/code/narya/
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it
|
||||
// under the terms of the GNU Lesser General Public License as published
|
||||
// by the Free Software Foundation; either version 2.1 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
package com.threerings.whirled.spot.data;
|
||||
|
||||
import com.threerings.presents.dobj.DObject;
|
||||
import com.threerings.presents.dobj.OidList;
|
||||
|
||||
import com.threerings.crowd.chat.data.SpeakObject;
|
||||
|
||||
/**
|
||||
* Used to dispatch chat in clusters.
|
||||
*/
|
||||
public class ClusterObject extends DObject
|
||||
implements SpeakObject
|
||||
{
|
||||
/**
|
||||
* Tracks the oid of the body objects that occupy this cluster.
|
||||
*/
|
||||
public OidList occupants = new OidList();
|
||||
|
||||
// documentation inherited
|
||||
public void applyToListeners (ListenerOp op)
|
||||
{
|
||||
for (int ii = 0, ll = occupants.size(); ii < ll; ii++) {
|
||||
op.apply(occupants.get(ii));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -32,8 +32,10 @@ import com.threerings.crowd.chat.data.SpeakObject;
|
||||
public class ClusterObject extends DObject
|
||||
implements SpeakObject
|
||||
{
|
||||
// AUTO-GENERATED: FIELDS START
|
||||
/** The field name of the <code>occupants</code> field. */
|
||||
public static final String OCCUPANTS = "occupants";
|
||||
// AUTO-GENERATED: FIELDS END
|
||||
|
||||
/**
|
||||
* Tracks the oid of the body objects that occupy this cluster.
|
||||
@@ -48,10 +50,11 @@ public class ClusterObject extends DObject
|
||||
}
|
||||
}
|
||||
|
||||
// AUTO-GENERATED: METHODS START
|
||||
/**
|
||||
* Requests that the specified oid be added to the
|
||||
* <code>occupants</code> oid list. The list will not change until the
|
||||
* event is actually propagated through the system.
|
||||
* Requests that <code>oid</code> be added to the <code>occupants</code>
|
||||
* oid list. The list will not change until the event is actually
|
||||
* propagated through the system.
|
||||
*/
|
||||
public void addToOccupants (int oid)
|
||||
{
|
||||
@@ -59,7 +62,7 @@ public class ClusterObject extends DObject
|
||||
}
|
||||
|
||||
/**
|
||||
* Requests that the specified oid be removed from the
|
||||
* Requests that <code>oid</code> be removed from the
|
||||
* <code>occupants</code> oid list. The list will not change until the
|
||||
* event is actually propagated through the system.
|
||||
*/
|
||||
@@ -67,4 +70,5 @@ public class ClusterObject extends DObject
|
||||
{
|
||||
requestOidRemove(OCCUPANTS, oid);
|
||||
}
|
||||
// AUTO-GENERATED: METHODS END
|
||||
}
|
||||
|
||||
@@ -1,38 +0,0 @@
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
// Narya library - tools for developing networked games
|
||||
// Copyright (C) 2002-2004 Three Rings Design, Inc., All Rights Reserved
|
||||
// http://www.threerings.net/code/narya/
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it
|
||||
// under the terms of the GNU Lesser General Public License as published
|
||||
// by the Free Software Foundation; either version 2.1 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
package com.threerings.whirled.spot.data;
|
||||
|
||||
import com.threerings.presents.dobj.DSet;
|
||||
import com.threerings.whirled.data.SceneObject;
|
||||
|
||||
/**
|
||||
* Extends the {@link SceneObject} with information specific to spots.
|
||||
*/
|
||||
public class SpotSceneObject extends SceneObject
|
||||
{
|
||||
/** A distributed set containing {@link SceneLocation} records for all
|
||||
* occupants of this scene. */
|
||||
public DSet occupantLocs = new DSet();
|
||||
|
||||
/** Contains information on all {@link Cluster}s in this scene. */
|
||||
public DSet clusters = new DSet();
|
||||
}
|
||||
@@ -29,11 +29,13 @@ import com.threerings.whirled.data.SceneObject;
|
||||
*/
|
||||
public class SpotSceneObject extends SceneObject
|
||||
{
|
||||
// AUTO-GENERATED: FIELDS START
|
||||
/** The field name of the <code>occupantLocs</code> field. */
|
||||
public static final String OCCUPANT_LOCS = "occupantLocs";
|
||||
|
||||
/** The field name of the <code>clusters</code> field. */
|
||||
public static final String CLUSTERS = "clusters";
|
||||
// AUTO-GENERATED: FIELDS END
|
||||
|
||||
/** A distributed set containing {@link SceneLocation} records for all
|
||||
* occupants of this scene. */
|
||||
@@ -42,6 +44,7 @@ public class SpotSceneObject extends SceneObject
|
||||
/** Contains information on all {@link Cluster}s in this scene. */
|
||||
public DSet clusters = new DSet();
|
||||
|
||||
// AUTO-GENERATED: METHODS START
|
||||
/**
|
||||
* Requests that the specified entry be added to the
|
||||
* <code>occupantLocs</code> set. The set will not change until the event is
|
||||
@@ -49,7 +52,7 @@ public class SpotSceneObject extends SceneObject
|
||||
*/
|
||||
public void addToOccupantLocs (DSet.Entry elem)
|
||||
{
|
||||
requestEntryAdd(OCCUPANT_LOCS, elem);
|
||||
requestEntryAdd(OCCUPANT_LOCS, occupantLocs, elem);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -59,7 +62,7 @@ public class SpotSceneObject extends SceneObject
|
||||
*/
|
||||
public void removeFromOccupantLocs (Comparable key)
|
||||
{
|
||||
requestEntryRemove(OCCUPANT_LOCS, key);
|
||||
requestEntryRemove(OCCUPANT_LOCS, occupantLocs, key);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -69,7 +72,7 @@ public class SpotSceneObject extends SceneObject
|
||||
*/
|
||||
public void updateOccupantLocs (DSet.Entry elem)
|
||||
{
|
||||
requestEntryUpdate(OCCUPANT_LOCS, elem);
|
||||
requestEntryUpdate(OCCUPANT_LOCS, occupantLocs, elem);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -84,7 +87,7 @@ public class SpotSceneObject extends SceneObject
|
||||
*/
|
||||
public void setOccupantLocs (DSet occupantLocs)
|
||||
{
|
||||
requestAttributeChange(OCCUPANT_LOCS, occupantLocs);
|
||||
requestAttributeChange(OCCUPANT_LOCS, occupantLocs, this.occupantLocs);
|
||||
this.occupantLocs = occupantLocs;
|
||||
}
|
||||
|
||||
@@ -95,7 +98,7 @@ public class SpotSceneObject extends SceneObject
|
||||
*/
|
||||
public void addToClusters (DSet.Entry elem)
|
||||
{
|
||||
requestEntryAdd(CLUSTERS, elem);
|
||||
requestEntryAdd(CLUSTERS, clusters, elem);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -105,7 +108,7 @@ public class SpotSceneObject extends SceneObject
|
||||
*/
|
||||
public void removeFromClusters (Comparable key)
|
||||
{
|
||||
requestEntryRemove(CLUSTERS, key);
|
||||
requestEntryRemove(CLUSTERS, clusters, key);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -115,7 +118,7 @@ public class SpotSceneObject extends SceneObject
|
||||
*/
|
||||
public void updateClusters (DSet.Entry elem)
|
||||
{
|
||||
requestEntryUpdate(CLUSTERS, elem);
|
||||
requestEntryUpdate(CLUSTERS, clusters, elem);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -130,7 +133,8 @@ public class SpotSceneObject extends SceneObject
|
||||
*/
|
||||
public void setClusters (DSet clusters)
|
||||
{
|
||||
requestAttributeChange(CLUSTERS, clusters);
|
||||
requestAttributeChange(CLUSTERS, clusters, this.clusters);
|
||||
this.clusters = clusters;
|
||||
}
|
||||
// AUTO-GENERATED: METHODS END
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user