Added a bunch of @private tags to remove clutter from the game API docs.

git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@545 c613c5cb-e716-0410-b11b-feb51c14d237
This commit is contained in:
Ray Greenwell
2008-01-10 00:28:43 +00:00
parent 989d145b1d
commit 249e5174ad
14 changed files with 103 additions and 15 deletions
@@ -72,6 +72,7 @@ public class AbstractControl extends EventDispatcher
/** /**
* Populate any properties or functions we want to expose to the host code. * Populate any properties or functions we want to expose to the host code.
* @private
*/ */
protected function populateProperties (o :Object) :void protected function populateProperties (o :Object) :void
{ {
@@ -80,6 +81,7 @@ public class AbstractControl extends EventDispatcher
/** /**
* Grab any properties needed from our host code. * Grab any properties needed from our host code.
* @private
*/ */
protected function setHostProps (o :Object) :void protected function setHostProps (o :Object) :void
{ {
@@ -88,6 +90,7 @@ public class AbstractControl extends EventDispatcher
/** /**
* Your own events may not be dispatched here. * Your own events may not be dispatched here.
* @private
*/ */
override public function dispatchEvent (event :Event) :Boolean override public function dispatchEvent (event :Event) :Boolean
{ {
@@ -99,6 +102,7 @@ public class AbstractControl extends EventDispatcher
/** /**
* Secret function to dispatch property changed events. * Secret function to dispatch property changed events.
* @private
*/ */
protected function dispatch (event :Event) :void protected function dispatch (event :Event) :void
{ {
@@ -112,6 +116,7 @@ public class AbstractControl extends EventDispatcher
/** /**
* Call a method exposed by the host code. * Call a method exposed by the host code.
* @private
*/ */
protected function callHostCode (name :String, ... args) :* protected function callHostCode (name :String, ... args) :*
{ {
@@ -120,6 +125,7 @@ public class AbstractControl extends EventDispatcher
/** /**
* Exposed to sub controls. * Exposed to sub controls.
* @private
*/ */
internal function callHostCodeFriend (name :String, args :Array) :* internal function callHostCodeFriend (name :String, args :Array) :*
{ {
@@ -129,6 +135,7 @@ public class AbstractControl extends EventDispatcher
/** /**
* Helper method to throw an error if we're not connected. * Helper method to throw an error if we're not connected.
* @private
*/ */
protected function checkIsConnected () :void protected function checkIsConnected () :void
{ {
@@ -73,6 +73,9 @@ public class AbstractGameControl extends AbstractControl
disp.root.loaderInfo.addEventListener(Event.UNLOAD, dispatch); disp.root.loaderInfo.addEventListener(Event.UNLOAD, dispatch);
} }
/**
* @inheritDoc
*/
override public function isConnected () :Boolean override public function isConnected () :Boolean
{ {
return _connected; return _connected;
@@ -80,6 +83,7 @@ public class AbstractGameControl extends AbstractControl
/** /**
* Create any subcontrols used by this game. * Create any subcontrols used by this game.
* @private
*/ */
protected function createSubControls () :void protected function createSubControls () :void
{ {
@@ -94,6 +98,7 @@ public class AbstractGameControl extends AbstractControl
/** /**
* Create the 'local' subcontrol. * Create the 'local' subcontrol.
* @private
*/ */
protected function createLocalControl () :EZLocalSubControl protected function createLocalControl () :EZLocalSubControl
{ {
@@ -102,6 +107,7 @@ public class AbstractGameControl extends AbstractControl
/** /**
* Create the 'net' subcontrol. * Create the 'net' subcontrol.
* @private
*/ */
protected function createNetControl () :EZNetSubControl protected function createNetControl () :EZNetSubControl
{ {
@@ -110,6 +116,7 @@ public class AbstractGameControl extends AbstractControl
/** /**
* Create the 'player' subcontrol. * Create the 'player' subcontrol.
* @private
*/ */
protected function createPlayerControl () :EZPlayerSubControl protected function createPlayerControl () :EZPlayerSubControl
{ {
@@ -118,6 +125,7 @@ public class AbstractGameControl extends AbstractControl
/** /**
* Create the 'game' subcontrol. * Create the 'game' subcontrol.
* @private
*/ */
protected function createGameControl () :EZGameSubControl protected function createGameControl () :EZGameSubControl
{ {
@@ -126,6 +134,7 @@ public class AbstractGameControl extends AbstractControl
/** /**
* Create the 'services' subcontrol. * Create the 'services' subcontrol.
* @private
*/ */
protected function createServicesControl () :EZServicesSubControl protected function createServicesControl () :EZServicesSubControl
{ {
@@ -135,6 +144,7 @@ public class AbstractGameControl extends AbstractControl
/** /**
* Populate any properties or functions we want to expose to the other side of the ezgame * Populate any properties or functions we want to expose to the other side of the ezgame
* security boundary. * security boundary.
* @private
*/ */
override protected function populateProperties (o :Object) :void override protected function populateProperties (o :Object) :void
{ {
@@ -150,6 +160,7 @@ public class AbstractGameControl extends AbstractControl
/** /**
* Sets the properties we received from the host framework on the other side of the security * Sets the properties we received from the host framework on the other side of the security
* boundary. * boundary.
* @private
*/ */
override protected function setHostProps (o :Object) :void override protected function setHostProps (o :Object) :void
{ {
@@ -166,6 +177,9 @@ public class AbstractGameControl extends AbstractControl
_funcs = o; _funcs = o;
} }
/**
* @private
*/
override protected function callHostCode (name :String, ... args) :* override protected function callHostCode (name :String, ... args) :*
{ {
if (_funcs != null) { if (_funcs != null) {
@@ -188,6 +202,7 @@ public class AbstractGameControl extends AbstractControl
/** /**
* Internal method that is called whenever the mouse clicks our root. * Internal method that is called whenever the mouse clicks our root.
* @private
*/ */
protected function handleRootClick (evt :MouseEvent) :void protected function handleRootClick (evt :MouseEvent) :void
{ {
@@ -211,20 +226,28 @@ public class AbstractGameControl extends AbstractControl
_connected = false; _connected = false;
} }
/** Are we connected? */ /** Are we connected? @private */
protected var _connected :Boolean; protected var _connected :Boolean;
/** Contains functions exposed to us from the EZGame host. */ /** Contains functions exposed to us from the EZGame host. @private */
protected var _funcs :Object; protected var _funcs :Object;
/** Holds all our sub-controls. */ /** Holds all our sub-controls. @private */
protected var _subControls :Array = []; protected var _subControls :Array = [];
/** Specific sub-controls. */ /** The local sub-control. @private */
protected var _localCtrl :EZLocalSubControl; protected var _localCtrl :EZLocalSubControl;
/** The net sub-control. @private */
protected var _netCtrl :EZNetSubControl; protected var _netCtrl :EZNetSubControl;
/** The player sub-control. @private */
protected var _playerCtrl :EZPlayerSubControl; protected var _playerCtrl :EZPlayerSubControl;
/** The game sub-control. @private */
protected var _gameCtrl :EZGameSubControl; protected var _gameCtrl :EZGameSubControl;
/** The services sub-control. @private */
protected var _servicesCtrl :EZServicesSubControl; protected var _servicesCtrl :EZServicesSubControl;
} }
} }
@@ -38,31 +38,47 @@ public class AbstractSubControl extends AbstractControl
_parent = parent; _parent = parent;
} }
/**
* @inheritDoc
*/
override public function isConnected () :Boolean override public function isConnected () :Boolean
{ {
return _parent.isConnected(); return _parent.isConnected();
} }
/**
* @inheritDoc
*/
override public function doBatch (fn :Function) :void override public function doBatch (fn :Function) :void
{ {
return _parent.doBatch(fn); return _parent.doBatch(fn);
} }
/**
* @private
*/
override protected function callHostCode (name :String, ... args) :* override protected function callHostCode (name :String, ... args) :*
{ {
return _parent.callHostCodeFriend(name, args); return _parent.callHostCodeFriend(name, args);
} }
/**
* @private
*/
internal function populatePropertiesFriend (o :Object) :void internal function populatePropertiesFriend (o :Object) :void
{ {
populateProperties(o); populateProperties(o);
} }
/**
* @private
*/
internal function setHostPropsFriend (o :Object) :void internal function setHostPropsFriend (o :Object) :void
{ {
setHostProps(o); setHostProps(o);
} }
/** @private */
protected var _parent :AbstractControl; protected var _parent :AbstractControl;
} }
} }
@@ -117,6 +117,7 @@ public class EZBagsSubControl extends AbstractSubControl
/** /**
* Helper method for create and addTo. * Helper method for create and addTo.
* @private
*/ */
protected function populate ( protected function populate (
bagName :String, values :Array, clearExisting :Boolean) :void bagName :String, values :Array, clearExisting :Boolean) :void
@@ -126,6 +127,7 @@ public class EZBagsSubControl extends AbstractSubControl
/** /**
* Helper method for pick and deal. * Helper method for pick and deal.
* @private
*/ */
protected function getFrom ( protected function getFrom (
bagName :String, count :int, msgOrPropName :String, playerId :int, bagName :String, count :int, msgOrPropName :String, playerId :int,
+3 -1
View File
@@ -23,6 +23,8 @@ package com.threerings.ezgame {
import flash.events.Event; import flash.events.Event;
/**
*/
public /*abstract*/ class EZEvent extends Event public /*abstract*/ class EZEvent extends Event
{ {
/** /**
@@ -40,7 +42,7 @@ public /*abstract*/ class EZEvent extends Event
_gameCtrl = gameCtrl as AbstractGameControl; _gameCtrl = gameCtrl as AbstractGameControl;
} }
/** The game control for this event. */ /** The game control for this event. @private */
protected var _gameCtrl :AbstractGameControl; protected var _gameCtrl :AbstractGameControl;
} }
} }
@@ -254,12 +254,16 @@ public class EZGameSubControl extends AbstractSubControl
/** /**
* Create the 'seating' subcontrol. * Create the 'seating' subcontrol.
* @private
*/ */
protected function createSeatingControl () :EZSeatingSubControl protected function createSeatingControl () :EZSeatingSubControl
{ {
return new EZSeatingSubControl(_parent, this); return new EZSeatingSubControl(_parent, this);
} }
/**
* @private
*/
override protected function populateProperties (o :Object) :void override protected function populateProperties (o :Object) :void
{ {
super.populateProperties(o); super.populateProperties(o);
@@ -274,6 +278,9 @@ public class EZGameSubControl extends AbstractSubControl
_seatingCtrl.populatePropertiesFriend(o); _seatingCtrl.populatePropertiesFriend(o);
} }
/**
* @private
*/
override protected function setHostProps (o :Object) :void override protected function setHostProps (o :Object) :void
{ {
super.setHostProps(o); super.setHostProps(o);
@@ -335,10 +342,10 @@ public class EZGameSubControl extends AbstractSubControl
dispatch(new UserChatEvent(_parent, speaker, message)); dispatch(new UserChatEvent(_parent, speaker, message));
} }
/** Contains any custom game configuration data. */ /** Contains any custom game configuration data. @private */
protected var _gameConfig :Object = {}; protected var _gameConfig :Object = {};
/** The seating sub-control. */ /** The seating sub-control. @private */
protected var _seatingCtrl :EZSeatingSubControl; protected var _seatingCtrl :EZSeatingSubControl;
} }
} }
@@ -57,7 +57,9 @@ public class EZLocalSubControl extends AbstractSubControl
super(parent); super(parent);
} }
// documentation inherited /**
* @inheritDoc
*/
override public function addEventListener ( override public function addEventListener (
type :String, listener :Function, useCapture :Boolean = false, type :String, listener :Function, useCapture :Boolean = false,
priority :int = 0, useWeakReference :Boolean = false) :void priority :int = 0, useWeakReference :Boolean = false) :void
@@ -74,7 +76,9 @@ public class EZLocalSubControl extends AbstractSubControl
} }
} }
// documentation inherited /**
* @inheritDoc
*/
override public function removeEventListener ( override public function removeEventListener (
type :String, listener :Function, useCapture :Boolean = false) :void type :String, listener :Function, useCapture :Boolean = false) :void
{ {
@@ -119,6 +123,9 @@ public class EZLocalSubControl extends AbstractSubControl
return (callHostCode("filter_v1", text) as String); return (callHostCode("filter_v1", text) as String);
} }
/**
* @private
*/
override protected function populateProperties (o :Object) :void override protected function populateProperties (o :Object) :void
{ {
super.populateProperties(o); super.populateProperties(o);
@@ -137,6 +137,9 @@ public class EZNetSubControl extends AbstractSubControl
callHostCode("sendMessage_v2", messageName, value, playerId); callHostCode("sendMessage_v2", messageName, value, playerId);
} }
/**
* @private
*/
override protected function populateProperties (o :Object) :void override protected function populateProperties (o :Object) :void
{ {
super.populateProperties(o); super.populateProperties(o);
@@ -145,6 +148,9 @@ public class EZNetSubControl extends AbstractSubControl
o["messageReceived_v1"] = messageReceived_v1; o["messageReceived_v1"] = messageReceived_v1;
} }
/**
* @private
*/
override protected function setHostProps (o :Object) :void override protected function setHostProps (o :Object) :void
{ {
super.setHostProps(o); super.setHostProps(o);
@@ -169,7 +175,7 @@ public class EZNetSubControl extends AbstractSubControl
dispatch(new MessageReceivedEvent(_parent, name, value)); dispatch(new MessageReceivedEvent(_parent, name, value));
} }
/** Game properties. */ /** Game properties. @private */
protected var _gameData :Object; protected var _gameData :Object;
} }
} }
@@ -74,7 +74,7 @@ public class EZSeatingSubControl extends AbstractSubControl
); );
} }
/** Our direct parent. */ /** Our direct parent. @private */
protected var _game :EZGameSubControl; protected var _game :EZGameSubControl;
} }
} }
@@ -100,12 +100,16 @@ public class EZServicesSubControl extends AbstractSubControl
/** /**
* Create the 'bags' subcontrol. * Create the 'bags' subcontrol.
* @private
*/ */
protected function createBagsControl () :EZBagsSubControl protected function createBagsControl () :EZBagsSubControl
{ {
return new EZBagsSubControl(_parent); return new EZBagsSubControl(_parent);
} }
/**
* @private
*/
override protected function populateProperties (o :Object) :void override protected function populateProperties (o :Object) :void
{ {
super.populateProperties(o); super.populateProperties(o);
@@ -113,6 +117,9 @@ public class EZServicesSubControl extends AbstractSubControl
_bagsCtrl.populatePropertiesFriend(o); _bagsCtrl.populatePropertiesFriend(o);
} }
/**
* @private
*/
override protected function setHostProps (o :Object) :void override protected function setHostProps (o :Object) :void
{ {
super.setHostProps(o); super.setHostProps(o);
@@ -120,7 +127,7 @@ public class EZServicesSubControl extends AbstractSubControl
_bagsCtrl.setHostPropsFriend(o); _bagsCtrl.setHostPropsFriend(o);
} }
/** The bags sub-control. */ /** The bags sub-control. @private */
protected var _bagsCtrl :EZBagsSubControl; protected var _bagsCtrl :EZBagsSubControl;
} }
} }
@@ -60,7 +60,10 @@ public class OccupantChangedEvent extends EZEvent
return new OccupantChangedEvent(type, _gameCtrl, _occupantId, _player); return new OccupantChangedEvent(type, _gameCtrl, _occupantId, _player);
} }
/** @private */
protected var _occupantId :int; protected var _occupantId :int;
/** @private */
protected var _player :Boolean; protected var _player :Boolean;
} }
} }
@@ -89,10 +89,16 @@ public class PropertyChangedEvent extends EZEvent
return new PropertyChangedEvent(_gameCtrl, _name, _newValue, _oldValue, _index); return new PropertyChangedEvent(_gameCtrl, _name, _newValue, _oldValue, _index);
} }
/** Our implementation details. */ /** @private */
protected var _name :String; protected var _name :String;
/** @private */
protected var _newValue :Object; protected var _newValue :Object;
/** @private */
protected var _oldValue :Object; protected var _oldValue :Object;
/** @private */
protected var _index :int; protected var _index :int;
} }
} }
@@ -62,7 +62,7 @@ public class SizeChangedEvent extends EZEvent
return new SizeChangedEvent(_gameCtrl, _size.clone()); return new SizeChangedEvent(_gameCtrl, _size.clone());
} }
/** Our implementation details. */ /** Our implementation details. @private */
protected var _size: Point; protected var _size: Point;
} }
} }
@@ -67,8 +67,10 @@ public class UserChatEvent extends EZEvent
return new UserChatEvent(_gameCtrl, _speaker, _message); return new UserChatEvent(_gameCtrl, _speaker, _message);
} }
/** Our implementation details. */ /** @private */
protected var _speaker: int; protected var _speaker: int;
/** @private */
protected var _message :String; protected var _message :String;
} }
} }