Packagecom.pblabs.engine.core
Classpublic class ObjectType
InheritanceObjectType Inheritance Object
Implements ISerializable

An ObjectType is an abstraction of a bitmask that can be used to associate objects with type names.

See also

ObjectTypeManager


Public Properties
 PropertyDefined By
  bits : int
[read-only] The bitmask that this type wraps.
ObjectType
  typeName : String
The name of the type associated with this object type.
ObjectType
  typeNames : Array
A list of all the type names associated with this object type.
ObjectType
  wildcard : ObjectType
[static] [read-only]
ObjectType
Public Methods
 MethodDefined By
  
ObjectType(... arguments)
ObjectType
  
add(typeName:String):void
Add typeName to current ObjectType
ObjectType
  
and(other:ObjectType):Boolean
Perform a bitwise-and against another ObjectType and return true if they match.
ObjectType
  
deserialize(xml:XML):*
The xml description for this class can be either a single string, which will then be assigned to the TypeName property, or a list of strings, each in their own child tag (the name of which doesn't matter).
ObjectType
  
remove(typeName:String):void
Remove typeName from current ObjectType
ObjectType
  
serialize(xml:XML):void
serializes the object to XML.
ObjectType
Property Detail
bitsproperty
bits:int  [read-only]

The bitmask that this type wraps. This should not be used directly. Instead, use the various test methods on the ObjectTypeManager.


Implementation
    public function get bits():int

See also

com.pblabs.engine.core.ObjectTypeManager.doesTypeMatch()
com.pblabs.engine.core.ObjectTypeManager.doesTypeOverlap()
com.pblabs.engine.core.ObjectTypeManager.doTypesMatch()
com.pblabs.engine.core.ObjectTypeManager.doTypesOverlap()
typeNameproperty 
typeName:String

The name of the type associated with this object type. If multiple names have been assigned, the one with the least significant bit is returned.


Implementation
    public function get typeName():String
    public function set typeName(value:String):void
typeNamesproperty 
typeNames:Array

A list of all the type names associated with this object type.


Implementation
    public function get typeNames():Array
    public function set typeNames(value:Array):void
wildcardproperty 
wildcard:ObjectType  [read-only]


Implementation
    public static function get wildcard():ObjectType
Constructor Detail
ObjectType()Constructor
public function ObjectType(... arguments)



Parameters
... arguments
Method Detail
add()method
public function add(typeName:String):void

Add typeName to current ObjectType

Parameters

typeName:String

and()method 
public function and(other:ObjectType):Boolean

Perform a bitwise-and against another ObjectType and return true if they match.

Parameters

other:ObjectType

Returns
Boolean
deserialize()method 
public function deserialize(xml:XML):*

The xml description for this class can be either a single string, which will then be assigned to the TypeName property, or a list of strings, each in their own child tag (the name of which doesn't matter). deserializes the object from xml. The format of the xml passed is custom, depending on the way the object was serialized with the serialize method.

Parameters

xml:XML — The xml containing the serialized definition of the class.

Returns
* — The deserialized object. Usually 'this' should be returned, but in some cases it may be useful to return something else. The Enumerable class does this to force all values to be a member of the enumeration.
remove()method 
public function remove(typeName:String):void

Remove typeName from current ObjectType

Parameters

typeName:String

serialize()method 
public function serialize(xml:XML):void

serializes the object to XML. This should not include the main tag defining the class itself.

Parameters

xml:XML — The xml object to which the serialization of this class should be added. This xml object is a single tag containing the main class definition, so only children of this class should be added to it.