Public Member Functions | Static Public Member Functions | Protected Attributes

ObjectDefs Class Reference

Singleton that gives you access to all Object Definitions and is the central class for creating MovingObject types. More...

#import <ObjectDefs.h>

Collaboration diagram for ObjectDefs:
[legend]

List of all members.

Public Member Functions

(MovingObject *) - createMovingObjectOfType:
 returns a new autorelease MovingObject instance which has ObjectDef set to the given type
(ObjectDef- getObjectDefByType:
 returns the ObjectDef for a given ObjectTypes type
(ObjectDefs *) - init [implementation]
(void) - dealloc [implementation]
(void) - initAllObjects [implementation]

Static Public Member Functions

(ObjectDefs *) + sharedObjectDefs
 returns the singleton object, like this: [ObjectDefs sharedObjectDefs]
(id) + alloc [implementation]

Protected Attributes

ObjectDef objectTypes [ObjectTypes_MAX]

Detailed Description

Singleton that gives you access to all Object Definitions and is the central class for creating MovingObject types.

It doubles as a factory for creating MovingObject instances by calling createMovingObjectOfType: - you should not create MovingObject objects yourself but route it through this class instead by extending it as needed. That way you keep definitions central as well as error handling.


Member Function Documentation

+ (id) alloc   [implementation]
- (MovingObject *) createMovingObjectOfType: (ObjectTypes type  

returns a new autorelease MovingObject instance which has ObjectDef set to the given type

- (void) dealloc   [implementation]
- (ObjectDef) getObjectDefByType: (ObjectTypes type  

returns the ObjectDef for a given ObjectTypes type

- (ObjectDefs *) init   [implementation]
- (void) initAllObjects   [implementation]
+ (ObjectDefs *) sharedObjectDefs  

returns the singleton object, like this: [ObjectDefs sharedObjectDefs]


Member Data Documentation

- (ObjectDef objectTypes[ObjectTypes_MAX]) [protected]

The documentation for this class was generated from the following files:
 All Classes Files Functions Variables Enumerations Enumerator Properties