Changeset 9715 in orxonox.OLD for branches/new_class_id/src/lib
- Timestamp:
- Sep 1, 2006, 8:06:39 PM (18 years ago)
- Location:
- branches/new_class_id/src/lib
- Files:
-
- 278 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/new_class_id/src/lib/collision_detection/aabb.cc
r9687 r9715 21 21 22 22 23 NewObjectListDefinition(AABB);23 ObjectListDefinition(AABB); 24 24 /** 25 25 * standard constructor -
branches/new_class_id/src/lib/collision_detection/aabb.h
r9687 r9715 13 13 //! A class representing an extended bounding volume tree: an obb tree 14 14 class AABB : public BoundingVolume { 15 NewObjectListDeclaration(AABB);15 ObjectListDeclaration(AABB); 16 16 17 17 public: -
branches/new_class_id/src/lib/collision_detection/aabb_tree_node.cc
r9687 r9715 34 34 GLUquadricObj* AABBTreeNode_sphereObj = NULL; 35 35 36 NewObjectListDefinition(AABBTreeNode);36 ObjectListDefinition(AABBTreeNode); 37 37 /** 38 38 * standard constructor -
branches/new_class_id/src/lib/collision_detection/aabb_tree_node.h
r9687 r9715 21 21 class AABBTreeNode : public BVTreeNode 22 22 { 23 NewObjectListDeclaration(AABBTreeNode);23 ObjectListDeclaration(AABBTreeNode); 24 24 25 25 -
branches/new_class_id/src/lib/collision_detection/bounding_sphere.cc
r9687 r9715 20 20 21 21 22 NewObjectListDefinition(BoundingSphere);22 ObjectListDefinition(BoundingSphere); 23 23 /** 24 24 * standard constructor -
branches/new_class_id/src/lib/collision_detection/bounding_sphere.h
r9687 r9715 14 14 //! A class representing an extended bounding volume tree: an sphere 15 15 class BoundingSphere : public BoundingVolume { 16 NewObjectListDeclaration(BoundingSphere);16 ObjectListDeclaration(BoundingSphere); 17 17 18 18 public: -
branches/new_class_id/src/lib/collision_detection/bounding_volume.cc
r9687 r9715 20 20 21 21 22 NewObjectListDefinition(BoundingVolume);22 ObjectListDefinition(BoundingVolume); 23 23 /** 24 24 * standard constructor -
branches/new_class_id/src/lib/collision_detection/bounding_volume.h
r9687 r9715 17 17 //! An abstract class representing a bounding volume 18 18 class BoundingVolume : public BaseObject { 19 NewObjectListDeclaration(BoundingVolume);19 ObjectListDeclaration(BoundingVolume); 20 20 21 21 public: -
branches/new_class_id/src/lib/collision_detection/bv_tree.cc
r9687 r9715 21 21 22 22 23 NewObjectListDefinition(BVTree);23 ObjectListDefinition(BVTree); 24 24 /** 25 25 * standard constructor -
branches/new_class_id/src/lib/collision_detection/bv_tree.h
r9687 r9715 36 36 class BVTree : public BaseObject 37 37 { 38 NewObjectListDeclaration(BVTree);38 ObjectListDeclaration(BVTree); 39 39 40 40 public: -
branches/new_class_id/src/lib/collision_detection/bv_tree_node.cc
r9687 r9715 20 20 21 21 22 NewObjectListDefinition(BVTreeNode);22 ObjectListDefinition(BVTreeNode); 23 23 /** 24 24 * standard constructor -
branches/new_class_id/src/lib/collision_detection/bv_tree_node.h
r9687 r9715 24 24 //! A class that represents a bounding volume tree 25 25 class BVTreeNode : public BaseObject { 26 NewObjectListDeclaration(BVTreeNode);26 ObjectListDeclaration(BVTreeNode); 27 27 28 28 -
branches/new_class_id/src/lib/collision_detection/cd_engine.cc
r9687 r9715 34 34 35 35 36 NewObjectListDefinition(CDEngine);36 ObjectListDefinition(CDEngine); 37 37 /** 38 38 * @brief standard constructor … … 103 103 std::list<WorldEntity*>::iterator entityIterator; 104 104 // for all bsp managers check all entities 105 for( NewObjectList<BspEntity>::const_iterator bspIterator = BspEntity::objectList().begin();105 for( ObjectList<BspEntity>::const_iterator bspIterator = BspEntity::objectList().begin(); 106 106 bspIterator != BspEntity::objectList().end(); 107 107 bspIterator++) { -
branches/new_class_id/src/lib/collision_detection/cd_engine.h
r9687 r9715 36 36 //! The class representing the collision detection system of orxonox 37 37 class CDEngine : public BaseObject { 38 NewObjectListDeclaration(CDEngine);38 ObjectListDeclaration(CDEngine); 39 39 40 40 friend class WorldEntity; -
branches/new_class_id/src/lib/collision_detection/obb.cc
r9687 r9715 21 21 22 22 23 NewObjectListDefinition(OBB);23 ObjectListDefinition(OBB); 24 24 /** 25 25 * standard constructor -
branches/new_class_id/src/lib/collision_detection/obb.h
r9687 r9715 15 15 //! A class representing an extended bounding volume tree: an obb tree 16 16 class OBB : public BoundingVolume { 17 NewObjectListDeclaration(OBB);17 ObjectListDeclaration(OBB); 18 18 19 19 public: -
branches/new_class_id/src/lib/collision_detection/obb_tree.cc
r9687 r9715 27 27 28 28 29 NewObjectListDefinition(OBBTree);29 ObjectListDefinition(OBBTree); 30 30 /** 31 31 * standard constructor -
branches/new_class_id/src/lib/collision_detection/obb_tree.h
r9687 r9715 20 20 class OBBTree : public BVTree 21 21 { 22 NewObjectListDeclaration(OBBTree);22 ObjectListDeclaration(OBBTree); 23 23 24 24 public: -
branches/new_class_id/src/lib/collision_detection/obb_tree_node.cc
r9687 r9715 38 38 GLUquadricObj* OBBTreeNode_sphereObj = NULL; 39 39 40 NewObjectListDefinition(OBBTreeNode);40 ObjectListDefinition(OBBTreeNode); 41 41 /** 42 42 * standard constructor -
branches/new_class_id/src/lib/collision_detection/obb_tree_node.h
r9687 r9715 20 20 class OBBTreeNode : public BVTreeNode 21 21 { 22 NewObjectListDeclaration(OBBTreeNode);22 ObjectListDeclaration(OBBTreeNode); 23 23 public: 24 24 OBBTreeNode(const OBBTree& tree, OBBTreeNode* prev, int depth); -
branches/new_class_id/src/lib/collision_reaction/collision_handle.cc
r9688 r9715 30 30 31 31 32 NewObjectListDefinition(CollisionHandle);32 ObjectListDefinition(CollisionHandle); 33 33 34 34 /** … … 94 94 * @param classID the classid to look for 95 95 */ 96 void CollisionHandle::addTarget(const NewClassID& target)96 void CollisionHandle::addTarget(const ClassID& target) 97 97 { 98 98 // make sure there is no dublicate 99 std::vector< NewClassID>::iterator it = this->targetList.begin();99 std::vector<ClassID>::iterator it = this->targetList.begin(); 100 100 for( ; it < this->targetList.end(); it++) 101 101 if( (*it) == target) … … 227 227 bool CollisionHandle::filterCollisionEvent(CollisionEvent* collisionEvent) 228 228 { 229 std::vector< NewClassID>::iterator it = this->targetList.begin();229 std::vector<ClassID>::iterator it = this->targetList.begin(); 230 230 for(; it < this->targetList.end(); it++) 231 231 { … … 276 276 bool CollisionHandle::filterCollision(Collision* collision) 277 277 { 278 std::vector< NewClassID>::iterator it = this->targetList.begin();278 std::vector<ClassID>::iterator it = this->targetList.begin(); 279 279 for(; it < this->targetList.end(); it++) 280 280 { -
branches/new_class_id/src/lib/collision_reaction/collision_handle.h
r9688 r9715 23 23 class CollisionHandle : public BaseObject 24 24 { 25 NewObjectListDeclaration(CollisionHandle);25 ObjectListDeclaration(CollisionHandle); 26 26 public: 27 27 CollisionHandle(WorldEntity* owner, CREngine::CRType type); … … 30 30 void reset(); 31 31 32 void addTarget(const NewClassID& target);32 void addTarget(const ClassID& target); 33 33 Collision* registerCollision(WorldEntity* entityA, WorldEntity* entityB); 34 34 void registerSharedCollision(Collision* collision); … … 64 64 65 65 std::vector<Collision*> collisionList; //!< a list full of collisions 66 std::vector< NewClassID> targetList; //!< a list of target classes for filtering @TODO TAKE SET INSTEAD OF VECTOR HERE66 std::vector<ClassID> targetList; //!< a list of target classes for filtering @TODO TAKE SET INSTEAD OF VECTOR HERE 67 67 68 68 CollisionReaction* collisionReaction; //!< reference to the collision reaction object -
branches/new_class_id/src/lib/collision_reaction/collision_reaction.cc
r9688 r9715 20 20 21 21 22 NewObjectListDefinition(CollisionReaction);22 ObjectListDefinition(CollisionReaction); 23 23 24 24 /** -
branches/new_class_id/src/lib/collision_reaction/collision_reaction.h
r9688 r9715 18 18 class CollisionReaction : public BaseObject 19 19 { 20 NewObjectListDeclaration(CollisionReaction);20 ObjectListDeclaration(CollisionReaction); 21 21 public: 22 22 CollisionReaction(); -
branches/new_class_id/src/lib/collision_reaction/cr_engine.cc
r9688 r9715 29 29 30 30 31 NewObjectListDefinition(CREngine);31 ObjectListDefinition(CREngine); 32 32 /** 33 33 * standard constructor -
branches/new_class_id/src/lib/collision_reaction/cr_engine.h
r9688 r9715 25 25 class CREngine : public BaseObject 26 26 { 27 NewObjectListDeclaration(CREngine);27 ObjectListDeclaration(CREngine); 28 28 29 29 public: -
branches/new_class_id/src/lib/collision_reaction/cr_object_damage.cc
r9688 r9715 28 28 29 29 30 NewObjectListDefinition(CRObjectDamage);30 ObjectListDefinition(CRObjectDamage); 31 31 /** 32 32 * standard constructor -
branches/new_class_id/src/lib/collision_reaction/cr_object_damage.h
r9688 r9715 15 15 class CRObjectDamage : public CollisionReaction 16 16 { 17 NewObjectListDeclaration(CRObjectDamage);17 ObjectListDeclaration(CRObjectDamage); 18 18 public: 19 19 CRObjectDamage(); -
branches/new_class_id/src/lib/collision_reaction/cr_physics_full_walk.cc
r9688 r9715 35 35 36 36 37 NewObjectListDefinition(CRPhysicsFullWalk);37 ObjectListDefinition(CRPhysicsFullWalk); 38 38 /** 39 39 * standard constructor -
branches/new_class_id/src/lib/collision_reaction/cr_physics_full_walk.h
r9688 r9715 15 15 class CRPhysicsFullWalk : public CollisionReaction 16 16 { 17 NewObjectListDeclaration(CRPhysicsFullWalk);17 ObjectListDeclaration(CRPhysicsFullWalk); 18 18 public: 19 19 CRPhysicsFullWalk(); -
branches/new_class_id/src/lib/collision_reaction/cr_physics_ground_walk.cc
r9688 r9715 35 35 36 36 37 NewObjectListDefinition(CRPhysicsGroundWalk);37 ObjectListDefinition(CRPhysicsGroundWalk); 38 38 /** 39 39 * standard constructor -
branches/new_class_id/src/lib/collision_reaction/cr_physics_ground_walk.h
r9688 r9715 15 15 class CRPhysicsGroundWalk : public CollisionReaction 16 16 { 17 NewObjectListDeclaration(CRPhysicsGroundWalk);17 ObjectListDeclaration(CRPhysicsGroundWalk); 18 18 public: 19 19 CRPhysicsGroundWalk(); -
branches/new_class_id/src/lib/coord/p_node.cc
r9709 r9715 30 30 31 31 32 NewObjectListDefinition(PNode);32 ObjectListDefinition(PNode); 33 33 /** 34 34 * @brief standard constructor … … 1107 1107 } 1108 1108 1109 NewObjectListDefinition(NullParent);1109 ObjectListDefinition(NullParent); 1110 1110 1111 1111 NullParent::NullParent() -
branches/new_class_id/src/lib/coord/p_node.h
r9691 r9715 75 75 class PNode : virtual public BaseObject, virtual public Synchronizeable 76 76 { 77 NewObjectListDeclaration(PNode);77 ObjectListDeclaration(PNode); 78 78 79 79 public: … … 263 263 class NullParent : public PNode 264 264 { 265 NewObjectListDeclaration(NullParent);265 ObjectListDeclaration(NullParent); 266 266 friend class PNode; 267 267 NullParent(); -
branches/new_class_id/src/lib/event/event_handler.cc
r9686 r9715 29 29 30 30 31 NewObjectListDefinition(EventHandler);31 ObjectListDefinition(EventHandler); 32 32 /** 33 33 * @brief standard constructor -
branches/new_class_id/src/lib/event/event_handler.h
r9686 r9715 21 21 class EventHandler : public BaseObject 22 22 { 23 NewObjectListDeclaration(EventHandler);23 ObjectListDeclaration(EventHandler); 24 24 public: 25 25 virtual ~EventHandler(); -
branches/new_class_id/src/lib/event/event_listener.cc
r9686 r9715 19 19 #include "event_handler.h" 20 20 21 NewObjectListDefinition(EventListener);21 ObjectListDefinition(EventListener); 22 22 /** 23 23 * @brief standard constructor -
branches/new_class_id/src/lib/event/event_listener.h
r9686 r9715 14 14 class EventListener : virtual public BaseObject 15 15 { 16 NewObjectListDeclaration(EventListener);16 ObjectListDeclaration(EventListener); 17 17 public: 18 18 EventListener(); -
branches/new_class_id/src/lib/event/key_mapper.cc
r9686 r9715 32 32 33 33 34 NewObjectListDefinition(KeyMapper);34 ObjectListDefinition(KeyMapper); 35 35 36 36 /* initialize all variables to a reasonable value*/ -
branches/new_class_id/src/lib/event/key_mapper.h
r9686 r9715 16 16 class KeyMapper : public BaseObject 17 17 { 18 NewObjectListDeclaration(KeyMapper);18 ObjectListDeclaration(KeyMapper); 19 19 public: 20 20 //! A mapping from key-name to key-id -
branches/new_class_id/src/lib/graphics/effects/atmospheric_engine.cc
r9694 r9715 23 23 #include "util/loading/factory.h" 24 24 25 NewObjectListDefinition(AtmosphericEngine);25 ObjectListDefinition(AtmosphericEngine); 26 26 27 27 /** … … 94 94 void AtmosphericEngine::draw() const 95 95 { 96 for ( NewObjectList<WeatherEffect>::const_iterator it = WeatherEffect::objectList().begin();96 for (ObjectList<WeatherEffect>::const_iterator it = WeatherEffect::objectList().begin(); 97 97 it != WeatherEffect::objectList().end(); 98 98 ++it) … … 108 108 { 109 109 110 for ( NewObjectList<WeatherEffect>::const_iterator it = WeatherEffect::objectList().begin();110 for (ObjectList<WeatherEffect>::const_iterator it = WeatherEffect::objectList().begin(); 111 111 it != WeatherEffect::objectList().end(); 112 112 ++it) -
branches/new_class_id/src/lib/graphics/effects/atmospheric_engine.h
r9685 r9715 14 14 class AtmosphericEngine : public BaseObject 15 15 { 16 NewObjectListDeclaration(AtmosphericEngine);16 ObjectListDeclaration(AtmosphericEngine); 17 17 public: 18 18 ~AtmosphericEngine(); -
branches/new_class_id/src/lib/graphics/effects/cloud_effect.cc
r9709 r9715 40 40 float CloudEffect::fadeTime; 41 41 42 NewObjectListDefinitionID(CloudEffect, CL_CLOUD_EFFECT);42 ObjectListDefinitionID(CloudEffect, CL_CLOUD_EFFECT); 43 43 44 44 -
branches/new_class_id/src/lib/graphics/effects/cloud_effect.h
r9686 r9715 37 37 38 38 class CloudEffect : public WeatherEffect { 39 NewObjectListDeclaration(CloudEffect);39 ObjectListDeclaration(CloudEffect); 40 40 41 41 public: -
branches/new_class_id/src/lib/graphics/effects/fog_effect.cc
r9709 r9715 22 22 #include "cloud_effect.h" 23 23 24 NewObjectListDefinition(FogEffect);24 ObjectListDefinition(FogEffect); 25 25 // Define shell commands 26 26 //SHELL_COMMAND(activate, FogEffect, activateFog); -
branches/new_class_id/src/lib/graphics/effects/fog_effect.h
r9686 r9715 15 15 class FogEffect : public WeatherEffect 16 16 { 17 NewObjectListDeclaration(FogEffect);17 ObjectListDeclaration(FogEffect); 18 18 public: 19 19 FogEffect(const TiXmlElement* root = NULL); -
branches/new_class_id/src/lib/graphics/effects/graphics_effect.cc
r9685 r9715 22 22 #include "util/loading/load_param.h" 23 23 24 NewObjectListDefinition(GraphicsEffect);24 ObjectListDefinition(GraphicsEffect); 25 25 26 26 /** -
branches/new_class_id/src/lib/graphics/effects/graphics_effect.h
r9685 r9715 13 13 //! A class that handles GraphicsEffects. The GraphicsEffectManager operates on this. 14 14 class GraphicsEffect : public BaseObject { 15 NewObjectListDeclaration(GraphicsEffect);15 ObjectListDeclaration(GraphicsEffect); 16 16 public: 17 17 GraphicsEffect(const TiXmlElement* root = NULL); -
branches/new_class_id/src/lib/graphics/effects/lense_flare.cc
r9709 r9715 35 35 #include "class_id.h" 36 36 37 NewObjectListDefinitionID(LenseFlare, CL_LENSE_FLARE);37 ObjectListDefinitionID(LenseFlare, CL_LENSE_FLARE); 38 38 CREATE_FACTORY(LenseFlare); 39 39 -
branches/new_class_id/src/lib/graphics/effects/lense_flare.h
r9686 r9715 26 26 class LenseFlare : public GraphicsEffect 27 27 { 28 NewObjectListDeclaration(LenseFlare);28 ObjectListDeclaration(LenseFlare); 29 29 public: 30 30 LenseFlare(const TiXmlElement* root = NULL); -
branches/new_class_id/src/lib/graphics/effects/lightning_effect.cc
r9709 r9715 29 29 #include "class_id.h" 30 30 31 NewObjectListDefinitionID(LightningEffect, CL_LIGHTNING_EFFECT);31 ObjectListDefinitionID(LightningEffect, CL_LIGHTNING_EFFECT); 32 32 33 33 SHELL_COMMAND(activate, LightningEffect, activateLightning); -
branches/new_class_id/src/lib/graphics/effects/lightning_effect.h
r9686 r9715 19 19 class LightningEffect : public WeatherEffect 20 20 { 21 NewObjectListDeclaration(LightningEffect);21 ObjectListDeclaration(LightningEffect); 22 22 public: 23 23 LightningEffect(const TiXmlElement* root = NULL); -
branches/new_class_id/src/lib/graphics/effects/rain_effect.cc
r9709 r9715 33 33 #include "class_id.h" 34 34 35 NewObjectListDefinitionID(RainEffect, CL_RAIN_EFFECT);35 ObjectListDefinitionID(RainEffect, CL_RAIN_EFFECT); 36 36 37 37 // Define shell commands -
branches/new_class_id/src/lib/graphics/effects/rain_effect.h
r9686 r9715 25 25 class RainEffect : public WeatherEffect 26 26 { 27 NewObjectListDeclaration(RainEffect);27 ObjectListDeclaration(RainEffect); 28 28 public: 29 29 RainEffect(const TiXmlElement* root = NULL); -
branches/new_class_id/src/lib/graphics/effects/snow_effect.cc
r9709 r9715 32 32 #include "class_id.h" 33 33 34 NewObjectListDefinitionID(SnowEffect, CL_SNOW_EFFECT);34 ObjectListDefinitionID(SnowEffect, CL_SNOW_EFFECT); 35 35 SHELL_COMMAND(activate, SnowEffect, activateSnow); 36 36 SHELL_COMMAND(deactivate, SnowEffect, deactivateSnow); -
branches/new_class_id/src/lib/graphics/effects/snow_effect.h
r9686 r9715 23 23 class SnowEffect : public WeatherEffect 24 24 { 25 NewObjectListDeclaration(SnowEffect);25 ObjectListDeclaration(SnowEffect); 26 26 public: 27 27 SnowEffect(const TiXmlElement* root = NULL); -
branches/new_class_id/src/lib/graphics/effects/volfog_effect.cc
r9709 r9715 48 48 49 49 #include "class_id.h" 50 NewObjectListDefinitionID(VolFogEffect, CL_VOLFOG_EFFECT);50 ObjectListDefinitionID(VolFogEffect, CL_VOLFOG_EFFECT); 51 51 CREATE_FACTORY(VolFogEffect); 52 52 -
branches/new_class_id/src/lib/graphics/effects/volfog_effect.h
r9686 r9715 13 13 class VolFogEffect : public WeatherEffect 14 14 { 15 NewObjectListDeclaration(VolFogEffect);15 ObjectListDeclaration(VolFogEffect); 16 16 public: 17 17 VolFogEffect(const TiXmlElement* root = NULL); -
branches/new_class_id/src/lib/graphics/effects/weather_effect.cc
r9685 r9715 20 20 #include "util/loading/load_param.h" 21 21 22 NewObjectListDefinition(WeatherEffect);22 ObjectListDefinition(WeatherEffect); 23 23 24 24 /** -
branches/new_class_id/src/lib/graphics/effects/weather_effect.h
r9685 r9715 12 12 class WeatherEffect : public BaseObject 13 13 { 14 NewObjectListDeclaration(WeatherEffect);14 ObjectListDeclaration(WeatherEffect); 15 15 16 16 public: -
branches/new_class_id/src/lib/graphics/graphics_engine.cc
r9685 r9715 53 53 SHELL_COMMAND(fps, GraphicsEngine, toggleFPSdisplay); 54 54 55 NewObjectListDefinition(GraphicsEngine);55 ObjectListDefinition(GraphicsEngine); 56 56 57 57 /** … … 591 591 592 592 // tick the graphics effects 593 for ( NewObjectList<GraphicsEffect>::const_iterator it = GraphicsEffect::objectList().begin();593 for (ObjectList<GraphicsEffect>::const_iterator it = GraphicsEffect::objectList().begin(); 594 594 it != GraphicsEffect::objectList().end(); 595 595 ++it) -
branches/new_class_id/src/lib/graphics/graphics_engine.h
r9685 r9715 30 30 class GraphicsEngine : public EventListener 31 31 { 32 NewObjectListDeclaration(GraphicsEngine);32 ObjectListDeclaration(GraphicsEngine); 33 33 public: 34 34 virtual ~GraphicsEngine(); -
branches/new_class_id/src/lib/graphics/importer/height_map.cc
r9684 r9715 327 327 328 328 329 NewObjectListDefinition(HeightMap);329 ObjectListDefinition(HeightMap); 330 330 331 331 -
branches/new_class_id/src/lib/graphics/importer/height_map.h
r9684 r9715 72 72 class HeightMap : public VertexArrayModel 73 73 { 74 NewObjectListDeclaration(HeightMap);74 ObjectListDeclaration(HeightMap); 75 75 friend class Tile; 76 76 -
branches/new_class_id/src/lib/graphics/importer/interactive_model.cc
r9684 r9715 22 22 23 23 24 NewObjectListDefinition(InteractiveModel);24 ObjectListDefinition(InteractiveModel); 25 25 26 26 /** -
branches/new_class_id/src/lib/graphics/importer/interactive_model.h
r9684 r9715 30 30 class InteractiveModel : public Model 31 31 { 32 NewObjectListDeclaration(InteractiveModel);32 ObjectListDeclaration(InteractiveModel); 33 33 public: 34 34 InteractiveModel(); -
branches/new_class_id/src/lib/graphics/importer/material.cc
r9685 r9715 27 27 #include "util/loading/resource_manager.h" 28 28 29 NewObjectListDefinition(Material);29 ObjectListDefinition(Material); 30 30 31 31 /** -
branches/new_class_id/src/lib/graphics/importer/material.h
r9685 r9715 24 24 class Material : public BaseObject 25 25 { 26 NewObjectListDeclaration(Material);26 ObjectListDeclaration(Material); 27 27 public: 28 28 Material (const std::string& mtlName = ""); -
branches/new_class_id/src/lib/graphics/importer/md2/md2Model.cc
r9685 r9715 22 22 23 23 24 NewObjectListDefinition(MD2Model);24 ObjectListDefinition(MD2Model); 25 25 26 26 //! the model anorms -
branches/new_class_id/src/lib/graphics/importer/md2/md2Model.h
r9685 r9715 149 149 //! This is a MD2 Model class 150 150 class MD2Model : public InteractiveModel { 151 NewObjectListDeclaration(MD2Model);151 ObjectListDeclaration(MD2Model); 152 152 public: 153 153 MD2Model(const std::string& modelFileName, const std::string& skinFileName = "", float scale = 1.0f); -
branches/new_class_id/src/lib/graphics/importer/media_container.cc
r9685 r9715 30 30 #include "debug.h" 31 31 32 NewObjectListDefinition(MediaContainer);32 ObjectListDefinition(MediaContainer); 33 33 34 34 /** -
branches/new_class_id/src/lib/graphics/importer/media_container.h
r9685 r9715 24 24 class MediaContainer : public TextureSequence 25 25 { 26 NewObjectListDeclaration(MediaContainer);26 ObjectListDeclaration(MediaContainer); 27 27 private: 28 28 -
branches/new_class_id/src/lib/graphics/importer/model.cc
r9684 r9715 20 20 #include "glincl.h" 21 21 22 NewObjectListDefinition(Model);22 ObjectListDefinition(Model); 23 23 24 24 /** -
branches/new_class_id/src/lib/graphics/importer/model.h
r9684 r9715 54 54 //! This class defines the basic components of a model 55 55 class Model : virtual public BaseObject { 56 NewObjectListDeclaration(Model);56 ObjectListDeclaration(Model); 57 57 58 58 public: -
branches/new_class_id/src/lib/graphics/importer/movie_player.cc
r9685 r9715 30 30 #include "debug.h" 31 31 32 NewObjectListDefinition(MoviePlayer);32 ObjectListDefinition(MoviePlayer); 33 33 34 34 MoviePlayer::MoviePlayer(const std::string& filename) -
branches/new_class_id/src/lib/graphics/importer/movie_player.h
r9685 r9715 31 31 class MoviePlayer : public BaseObject 32 32 { 33 NewObjectListDeclaration(MoviePlayer);33 ObjectListDeclaration(MoviePlayer); 34 34 35 35 private: -
branches/new_class_id/src/lib/graphics/importer/objModel.cc
r9684 r9715 27 27 #include "compiler.h" 28 28 29 NewObjectListDefinition(OBJModel);29 ObjectListDefinition(OBJModel); 30 30 /** 31 31 * @brief Crates a 3D-Model, loads in a File and scales it. -
branches/new_class_id/src/lib/graphics/importer/objModel.h
r9684 r9715 12 12 class OBJModel : public StaticModel 13 13 { 14 NewObjectListDeclaration(OBJModel);14 ObjectListDeclaration(OBJModel); 15 15 public: 16 16 OBJModel(const std::string& fileName, float scaling = 1.0); -
branches/new_class_id/src/lib/graphics/importer/static_model.cc
r9684 r9715 134 134 /// MODEL /// 135 135 ///////////// 136 NewObjectListDefinition(StaticModel);136 ObjectListDefinition(StaticModel); 137 137 138 138 /** -
branches/new_class_id/src/lib/graphics/importer/static_model.h
r9684 r9715 94 94 class StaticModel : public Model 95 95 { 96 NewObjectListDeclaration(StaticModel);96 ObjectListDeclaration(StaticModel); 97 97 public: 98 98 StaticModel(const std::string& modelName = ""); -
branches/new_class_id/src/lib/graphics/importer/texture.cc
r9685 r9715 64 64 #endif 65 65 66 NewObjectListDefinition(Texture);66 ObjectListDefinition(Texture); 67 67 68 68 /** -
branches/new_class_id/src/lib/graphics/importer/texture.h
r9685 r9715 20 20 class Texture : public BaseObject 21 21 { 22 NewObjectListDeclaration(Texture);22 ObjectListDeclaration(Texture); 23 23 public: 24 24 Texture(); -
branches/new_class_id/src/lib/graphics/importer/texture_sequence.cc
r9685 r9715 28 28 #endif 29 29 30 NewObjectListDefinition(TextureSequence);30 ObjectListDefinition(TextureSequence); 31 31 32 32 /** -
branches/new_class_id/src/lib/graphics/importer/texture_sequence.h
r9685 r9715 15 15 class TextureSequence : public Texture 16 16 { 17 NewObjectListDeclaration(TextureSequence);17 ObjectListDeclaration(TextureSequence); 18 18 public: 19 19 TextureSequence(unsigned int count = 0, ...); -
branches/new_class_id/src/lib/graphics/importer/vertex_array_model.cc
r9684 r9715 24 24 25 25 26 NewObjectListDefinition(VertexArrayModel);26 ObjectListDefinition(VertexArrayModel); 27 27 28 28 ///////////// -
branches/new_class_id/src/lib/graphics/importer/vertex_array_model.h
r9684 r9715 27 27 class VertexArrayModel : public Model 28 28 { 29 NewObjectListDeclaration(VertexArrayModel);29 ObjectListDeclaration(VertexArrayModel); 30 30 public: 31 31 VertexArrayModel(); -
branches/new_class_id/src/lib/graphics/light.cc
r9709 r9715 29 29 #include "class_id.h" 30 30 31 NewObjectListDefinitionID(Light, CL_LIGHT);31 ObjectListDefinitionID(Light, CL_LIGHT); 32 32 CREATE_FACTORY(Light); 33 33 … … 215 215 ** LIGHT-MANAGER ** 216 216 ******************/ 217 NewObjectListDefinition(LightManager);217 ObjectListDefinition(LightManager); 218 218 /** 219 219 * standard constructor for a Light -
branches/new_class_id/src/lib/graphics/light.h
r9685 r9715 25 25 class Light : public PNode 26 26 { 27 NewObjectListDeclaration(Light);27 ObjectListDeclaration(Light); 28 28 public: 29 29 Light(const TiXmlElement* root = NULL); … … 89 89 class LightManager : public BaseObject 90 90 { 91 NewObjectListDeclaration(LightManager);91 ObjectListDeclaration(LightManager); 92 92 93 93 friend class Light; -
branches/new_class_id/src/lib/graphics/render2D/element_2d.cc
r9685 r9715 35 35 SHELL_COMMAND(debug, Element2D, debug2D); 36 36 37 NewObjectListDefinition(Element2D);37 ObjectListDefinition(Element2D); 38 38 39 39 -
branches/new_class_id/src/lib/graphics/render2D/element_2d.h
r9685 r9715 89 89 class Element2D : virtual public BaseObject 90 90 { 91 NewObjectListDeclaration(Element2D);91 ObjectListDeclaration(Element2D); 92 92 93 93 public: -
branches/new_class_id/src/lib/graphics/render2D/image_plane.cc
r9709 r9715 26 26 #include "class_id.h" 27 27 28 NewObjectListDefinitionID(ImagePlane, CL_IMAGE_PLANE);28 ObjectListDefinitionID(ImagePlane, CL_IMAGE_PLANE); 29 29 CREATE_FACTORY(ImagePlane); 30 30 -
branches/new_class_id/src/lib/graphics/render2D/image_plane.h
r9685 r9715 17 17 class ImagePlane : public Element2D 18 18 { 19 NewObjectListDeclaration(ImagePlane);19 ObjectListDeclaration(ImagePlane); 20 20 public: 21 21 ImagePlane(const TiXmlElement* root = NULL); -
branches/new_class_id/src/lib/graphics/render2D/render_2d.cc
r9685 r9715 21 21 #include "element_2d.h" 22 22 23 NewObjectListDefinition(Render2D);23 ObjectListDefinition(Render2D); 24 24 25 25 -
branches/new_class_id/src/lib/graphics/render2D/render_2d.h
r9685 r9715 14 14 class Render2D : public BaseObject 15 15 { 16 NewObjectListDeclaration(Render2D);16 ObjectListDeclaration(Render2D); 17 17 18 18 friend class Element2D; -
branches/new_class_id/src/lib/graphics/shader.cc
r9685 r9715 33 33 34 34 35 NewObjectListDefinition(Shader);35 ObjectListDefinition(Shader); 36 36 37 37 /** -
branches/new_class_id/src/lib/graphics/shader.h
r9685 r9715 19 19 class Shader : public BaseObject 20 20 { 21 NewObjectListDeclaration(Shader);21 ObjectListDeclaration(Shader); 22 22 public: 23 23 class Uniform -
branches/new_class_id/src/lib/graphics/spatial_separation/quadtree.cc
r9685 r9715 27 27 #define QUADTREE_MATERIAL_COUNT 4 28 28 29 NewObjectListDefinition(Quadtree);29 ObjectListDefinition(Quadtree); 30 30 /** 31 31 * standard constructor -
branches/new_class_id/src/lib/graphics/spatial_separation/quadtree.h
r9685 r9715 21 21 //! A class for quadtree separation of the world 22 22 class Quadtree : public BaseObject { 23 NewObjectListDeclaration(Quadtree);23 ObjectListDeclaration(Quadtree); 24 24 25 25 public: -
branches/new_class_id/src/lib/graphics/spatial_separation/quadtree_node.cc
r9685 r9715 27 27 28 28 29 NewObjectListDefinition(QuadtreeNode);29 ObjectListDefinition(QuadtreeNode); 30 30 31 31 /** -
branches/new_class_id/src/lib/graphics/spatial_separation/quadtree_node.h
r9685 r9715 26 26 //! A class for a Quadtree Node representation 27 27 class QuadtreeNode : public BaseObject { 28 NewObjectListDeclaration(QuadtreeNode);28 ObjectListDeclaration(QuadtreeNode); 29 29 30 30 public: -
branches/new_class_id/src/lib/graphics/spatial_separation/spatial_separation.cc
r9685 r9715 24 24 25 25 26 NewObjectListDefinition(SpatialSeparation);26 ObjectListDefinition(SpatialSeparation); 27 27 28 28 /** -
branches/new_class_id/src/lib/graphics/spatial_separation/spatial_separation.h
r9685 r9715 19 19 //! A class for spatial separation of vertices based arrays 20 20 class SpatialSeparation : public BaseObject { 21 NewObjectListDeclaration(SpatialSeparation);21 ObjectListDeclaration(SpatialSeparation); 22 22 23 23 public: -
branches/new_class_id/src/lib/graphics/text_engine/font.cc
r9685 r9715 29 29 #include "compiler.h" 30 30 31 NewObjectListDefinition(Font);31 ObjectListDefinition(Font); 32 32 33 33 Font::Font() -
branches/new_class_id/src/lib/graphics/text_engine/font.h
r9685 r9715 19 19 class Font : public Material 20 20 { 21 NewObjectListDeclaration(Font);21 ObjectListDeclaration(Font); 22 22 23 23 public: -
branches/new_class_id/src/lib/graphics/text_engine/limited_width_text.cc
r9685 r9715 19 19 #include "font.h" 20 20 21 NewObjectListDefinition(LimitedWidthText);21 ObjectListDefinition(LimitedWidthText); 22 22 /** 23 23 * @brief creates a new Text Element -
branches/new_class_id/src/lib/graphics/text_engine/limited_width_text.h
r9685 r9715 14 14 class LimitedWidthText : public Text 15 15 { 16 NewObjectListDeclaration(LimitedWidthText);16 ObjectListDeclaration(LimitedWidthText); 17 17 public: 18 18 typedef enum { -
branches/new_class_id/src/lib/graphics/text_engine/multi_line_text.cc
r9685 r9715 19 19 #include "font.h" 20 20 21 NewObjectListDefinition(MultiLineText);21 ObjectListDefinition(MultiLineText); 22 22 23 23 /** -
branches/new_class_id/src/lib/graphics/text_engine/multi_line_text.h
r9685 r9715 14 14 class MultiLineText : public Text 15 15 { 16 NewObjectListDeclaration(MultiLineText);16 ObjectListDeclaration(MultiLineText); 17 17 public: 18 18 MultiLineText(const std::string& fontFile = "", unsigned int fontSize = TEXT_DEFAULT_SIZE, float lineWidth = 100.0); -
branches/new_class_id/src/lib/graphics/text_engine/text.cc
r9685 r9715 22 22 #include "debug.h" 23 23 24 NewObjectListDefinition(Text);24 ObjectListDefinition(Text); 25 25 26 26 /** -
branches/new_class_id/src/lib/graphics/text_engine/text.h
r9685 r9715 26 26 class Text : public Element2D 27 27 { 28 NewObjectListDeclaration(Text);28 ObjectListDeclaration(Text); 29 29 public: 30 30 Text(const std::string& fontFile = "", unsigned int fontSize = TEXT_DEFAULT_SIZE); -
branches/new_class_id/src/lib/graphics/text_engine/text_engine.cc
r9685 r9715 39 39 /// TEXT-ENGINE /// 40 40 /////////////////// 41 NewObjectListDefinition(TextEngine);41 ObjectListDefinition(TextEngine); 42 42 /** 43 43 * standard constructor … … 124 124 PRINT(0)("Reference: %p; Text Counts: %d\n", this, Text::objectList().size()); 125 125 126 for ( NewObjectList<Text>::const_iterator it = Text::objectList().begin();126 for (ObjectList<Text>::const_iterator it = Text::objectList().begin(); 127 127 it != Text::objectList().end(); 128 128 ++it) -
branches/new_class_id/src/lib/graphics/text_engine/text_engine.h
r9685 r9715 24 24 class TextEngine : public BaseObject 25 25 { 26 NewObjectListDeclaration(TextEngine);26 ObjectListDeclaration(TextEngine); 27 27 public: 28 28 virtual ~TextEngine(); -
branches/new_class_id/src/lib/gui/gl/glgui_bar.cc
r9689 r9715 23 23 { 24 24 25 NewObjectListDefinition(GLGuiBar);25 ObjectListDefinition(GLGuiBar); 26 26 /** 27 27 * @brief standard constructor -
branches/new_class_id/src/lib/gui/gl/glgui_bar.h
r9689 r9715 21 21 class GLGuiBar : public GLGuiWidget 22 22 { 23 NewObjectListDeclaration(GLGuiBar);23 ObjectListDeclaration(GLGuiBar); 24 24 public: 25 25 GLGuiBar(); -
branches/new_class_id/src/lib/gui/gl/glgui_box.cc
r9689 r9715 22 22 namespace OrxGui 23 23 { 24 NewObjectListDefinition(GLGuiBox);24 ObjectListDefinition(GLGuiBox); 25 25 /** 26 26 * standard constructor -
branches/new_class_id/src/lib/gui/gl/glgui_box.h
r9689 r9715 19 19 class GLGuiBox : public GLGuiContainer 20 20 { 21 NewObjectListDeclaration(GLGuiBox);21 ObjectListDeclaration(GLGuiBox); 22 22 public: 23 23 GLGuiBox(OrxGui::Orientation orientation = OrxGui::Vertical); -
branches/new_class_id/src/lib/gui/gl/glgui_button.cc
r9689 r9715 23 23 namespace OrxGui 24 24 { 25 NewObjectListDefinition(GLGuiButton);25 ObjectListDefinition(GLGuiButton); 26 26 /** 27 27 * standard constructor -
branches/new_class_id/src/lib/gui/gl/glgui_button.h
r9689 r9715 31 31 class GLGuiButton : public GLGuiWidget 32 32 { 33 NewObjectListDeclaration(GLGuiButton);33 ObjectListDeclaration(GLGuiButton); 34 34 public: 35 35 GLGuiButton(const std::string& label); -
branches/new_class_id/src/lib/gui/gl/glgui_checkbutton.cc
r9689 r9715 22 22 namespace OrxGui 23 23 { 24 NewObjectListDefinition(GLGuiCheckButton);24 ObjectListDefinition(GLGuiCheckButton); 25 25 26 26 /** -
branches/new_class_id/src/lib/gui/gl/glgui_checkbutton.h
r9689 r9715 21 21 class GLGuiCheckButton : public GLGuiButton 22 22 { 23 NewObjectListDeclaration(GLGuiCheckButton);23 ObjectListDeclaration(GLGuiCheckButton); 24 24 public: 25 25 GLGuiCheckButton(const std::string& label = "", bool active = false); -
branches/new_class_id/src/lib/gui/gl/glgui_colorselector.h
r9689 r9715 21 21 class GLGui : public GLGui 22 22 { 23 NewObjectListDeclaration(GLGuiColorSelector);23 ObjectListDeclaration(GLGuiColorSelector); 24 24 public: 25 25 GLGui(); -
branches/new_class_id/src/lib/gui/gl/glgui_container.cc
r9689 r9715 20 20 namespace OrxGui 21 21 { 22 NewObjectListDefinition(GLGuiContainer);22 ObjectListDefinition(GLGuiContainer); 23 23 /** 24 24 * standard constructor -
branches/new_class_id/src/lib/gui/gl/glgui_container.h
r9689 r9715 20 20 class GLGuiContainer : public GLGuiWidget 21 21 { 22 NewObjectListDeclaration(GLGuiContainer);22 ObjectListDeclaration(GLGuiContainer); 23 23 public: 24 24 GLGuiContainer(); -
branches/new_class_id/src/lib/gui/gl/glgui_cursor.cc
r9689 r9715 23 23 namespace OrxGui 24 24 { 25 NewObjectListDefinition(GLGuiCursor);25 ObjectListDefinition(GLGuiCursor); 26 26 /** 27 27 * standard constructor -
branches/new_class_id/src/lib/gui/gl/glgui_cursor.h
r9689 r9715 26 26 class GLGuiCursor : public GLGuiWidget, public EventListener 27 27 { 28 NewObjectListDeclaration(GLGuiCursor);28 ObjectListDeclaration(GLGuiCursor); 29 29 public: 30 30 GLGuiCursor(); -
branches/new_class_id/src/lib/gui/gl/glgui_fixedposition_box.cc
r9689 r9715 23 23 namespace OrxGui 24 24 { 25 NewObjectListDefinition(GLGuiFixedpositionBox);25 ObjectListDefinition(GLGuiFixedpositionBox); 26 26 /** 27 27 * standard constructor -
branches/new_class_id/src/lib/gui/gl/glgui_fixedposition_box.h
r9689 r9715 21 21 class GLGuiFixedpositionBox : public OrxGui::GLGuiBox, EventListener 22 22 { 23 NewObjectListDeclaration(GLGuiFixedpositionBox);23 ObjectListDeclaration(GLGuiFixedpositionBox); 24 24 public: 25 25 GLGuiFixedpositionBox(OrxGui::Position position = OrxGui::Center, OrxGui::Orientation orientation = OrxGui::Vertical); -
branches/new_class_id/src/lib/gui/gl/glgui_frame.cc
r9689 r9715 21 21 namespace OrxGui 22 22 { 23 NewObjectListDefinition(GLGuiFrame);23 ObjectListDefinition(GLGuiFrame); 24 24 /** 25 25 * standard constructor -
branches/new_class_id/src/lib/gui/gl/glgui_frame.h
r9689 r9715 20 20 class GLGuiFrame : public GLGuiContainer 21 21 { 22 NewObjectListDeclaration(GLGuiFrame);22 ObjectListDeclaration(GLGuiFrame); 23 23 public: 24 24 GLGuiFrame(); -
branches/new_class_id/src/lib/gui/gl/glgui_handler.cc
r9689 r9715 34 34 namespace OrxGui 35 35 { 36 NewObjectListDefinition(GLGuiHandler);36 ObjectListDefinition(GLGuiHandler); 37 37 /** 38 38 * standard constructor … … 116 116 { 117 117 // retrieve Objects. 118 NewObjectList<GLGuiWidget>::const_iterator it, currentIt;118 ObjectList<GLGuiWidget>::const_iterator it, currentIt; 119 119 currentIt = GLGuiWidget::objectList().end(); 120 120 … … 154 154 void GLGuiHandler::selectPrevious() 155 155 { 156 NewObjectList<GLGuiWidget>::const_iterator it, currentIt;156 ObjectList<GLGuiWidget>::const_iterator it, currentIt; 157 157 currentIt = GLGuiWidget::objectList().begin(); 158 158 … … 286 286 if (this->_cursor != NULL) 287 287 { 288 for ( NewObjectList<GLGuiWidget>::const_iterator it = GLGuiWidget::objectList().begin();288 for (ObjectList<GLGuiWidget>::const_iterator it = GLGuiWidget::objectList().begin(); 289 289 it != GLGuiWidget::objectList().end(); 290 290 it++) -
branches/new_class_id/src/lib/gui/gl/glgui_handler.h
r9689 r9715 19 19 class GLGuiHandler : public EventListener 20 20 { 21 NewObjectListDeclaration(GLGuiHandler);21 ObjectListDeclaration(GLGuiHandler); 22 22 public: 23 23 /** @returns a Pointer to the only object of this Class */ -
branches/new_class_id/src/lib/gui/gl/glgui_image.cc
r9689 r9715 22 22 namespace OrxGui 23 23 { 24 NewObjectListDefinition(GLGuiImage);24 ObjectListDefinition(GLGuiImage); 25 25 /** 26 26 * standard constructor -
branches/new_class_id/src/lib/gui/gl/glgui_image.h
r9689 r9715 21 21 class GLGuiImage : public GLGuiWidget 22 22 { 23 NewObjectListDeclaration(GLGuiImage);23 ObjectListDeclaration(GLGuiImage); 24 24 public: 25 25 GLGuiImage(); -
branches/new_class_id/src/lib/gui/gl/glgui_inputline.cc
r9689 r9715 20 20 namespace OrxGui 21 21 { 22 NewObjectListDefinition(GLGuiInputLine);22 ObjectListDefinition(GLGuiInputLine); 23 23 /** 24 24 * @brief standard constructor -
branches/new_class_id/src/lib/gui/gl/glgui_inputline.h
r9689 r9715 25 25 class GLGuiInputLine : public OrxGui::GLGuiWidget 26 26 { 27 NewObjectListDeclaration(GLGuiInputLine);27 ObjectListDeclaration(GLGuiInputLine); 28 28 public: 29 29 GLGuiInputLine(); -
branches/new_class_id/src/lib/gui/gl/glgui_mainwidget.cc
r9689 r9715 20 20 namespace OrxGui 21 21 { 22 NewObjectListDefinition(GLGuiMainWidget);22 ObjectListDefinition(GLGuiMainWidget); 23 23 24 24 /** -
branches/new_class_id/src/lib/gui/gl/glgui_mainwidget.h
r9689 r9715 15 15 class GLGuiMainWidget : public GLGuiWidget 16 16 { 17 NewObjectListDeclaration(GLGuiMainWidget);17 ObjectListDeclaration(GLGuiMainWidget); 18 18 public: 19 19 virtual ~GLGuiMainWidget(void); -
branches/new_class_id/src/lib/gui/gl/glgui_menu.cc
r9689 r9715 20 20 namespace OrxGui 21 21 { 22 NewObjectListDefinition(GLGuiMenu);22 ObjectListDefinition(GLGuiMenu); 23 23 /** 24 24 * standard constructor -
branches/new_class_id/src/lib/gui/gl/glgui_menu.h
r9689 r9715 19 19 class GLGuiMenu : public GLGuiMenu 20 20 { 21 NewObjectListDeclaration(GLGuiMenu);21 ObjectListDeclaration(GLGuiMenu); 22 22 public: 23 23 GLGuiMenu(); -
branches/new_class_id/src/lib/gui/gl/glgui_pushbutton.cc
r9689 r9715 23 23 namespace OrxGui 24 24 { 25 NewObjectListDefinition(GLGuiPushButton);25 ObjectListDefinition(GLGuiPushButton); 26 26 /** 27 27 * @brief standard constructor -
branches/new_class_id/src/lib/gui/gl/glgui_pushbutton.h
r9689 r9715 21 21 class GLGuiPushButton : public GLGuiButton 22 22 { 23 NewObjectListDeclaration(GLGuiPushButton);23 ObjectListDeclaration(GLGuiPushButton); 24 24 public: 25 25 GLGuiPushButton(const std::string& label = ""); -
branches/new_class_id/src/lib/gui/gl/glgui_slider.cc
r9689 r9715 23 23 namespace OrxGui 24 24 { 25 NewObjectListDefinition(GLGuiSlider);25 ObjectListDefinition(GLGuiSlider); 26 26 /** 27 27 * @brief standard constructor -
branches/new_class_id/src/lib/gui/gl/glgui_slider.h
r9689 r9715 21 21 class GLGuiSlider : public GLGuiWidget 22 22 { 23 NewObjectListDeclaration(GLGuiSlider);23 ObjectListDeclaration(GLGuiSlider); 24 24 public: 25 25 GLGuiSlider(); -
branches/new_class_id/src/lib/gui/gl/glgui_table.cc
r9689 r9715 23 23 namespace OrxGui 24 24 { 25 NewObjectListDefinition(GLGuiTable);25 ObjectListDefinition(GLGuiTable); 26 26 /** 27 27 * @brief standard constructor -
branches/new_class_id/src/lib/gui/gl/glgui_table.h
r9689 r9715 25 25 class GLGuiTable : public OrxGui::GLGuiWidget 26 26 { 27 NewObjectListDeclaration(GLGuiTable);27 ObjectListDeclaration(GLGuiTable); 28 28 public: 29 29 GLGuiTable(unsigned int rows, unsigned int columns); -
branches/new_class_id/src/lib/gui/gl/glgui_text.cc
r9689 r9715 22 22 namespace OrxGui 23 23 { 24 NewObjectListDefinition(GLGuiText);24 ObjectListDefinition(GLGuiText); 25 25 /** 26 26 * standard constructor -
branches/new_class_id/src/lib/gui/gl/glgui_text.h
r9689 r9715 20 20 class GLGuiText : public GLGuiWidget 21 21 { 22 NewObjectListDeclaration(GLGuiText);22 ObjectListDeclaration(GLGuiText); 23 23 public: 24 24 GLGuiText(); -
branches/new_class_id/src/lib/gui/gl/glgui_textfield.cc
r9689 r9715 22 22 namespace OrxGui 23 23 { 24 NewObjectListDefinition(GLGuiTextfield);24 ObjectListDefinition(GLGuiTextfield); 25 25 /** 26 26 * standard constructor -
branches/new_class_id/src/lib/gui/gl/glgui_textfield.h
r9689 r9715 20 20 class GLGuiTextfield : public GLGuiWidget 21 21 { 22 NewObjectListDeclaration(GLGuiTextfield);22 ObjectListDeclaration(GLGuiTextfield); 23 23 public: 24 24 GLGuiTextfield(); -
branches/new_class_id/src/lib/gui/gl/glgui_widget.cc
r9689 r9715 31 31 namespace OrxGui 32 32 { 33 NewObjectListDefinition(GLGuiWidget);33 ObjectListDefinition(GLGuiWidget); 34 34 /** 35 35 * @brief standard constructor -
branches/new_class_id/src/lib/gui/gl/glgui_widget.h
r9689 r9715 30 30 class GLGuiWidget : public Element2D 31 31 { 32 NewObjectListDeclaration(GLGuiWidget);32 ObjectListDeclaration(GLGuiWidget); 33 33 public: 34 34 GLGuiWidget(GLGuiWidget* parent = NULL); -
branches/new_class_id/src/lib/gui/gl/glgui_window.cc
r9689 r9715 20 20 namespace OrxGui 21 21 { 22 NewObjectListDefinition(GLGuiWindow);22 ObjectListDefinition(GLGuiWindow); 23 23 /** 24 24 * standard constructor -
branches/new_class_id/src/lib/gui/gl/glgui_window.h
r9689 r9715 20 20 class GLGuiWindow : public GLGuiContainer 21 21 { 22 NewObjectListDeclaration(GLGuiWindow);22 ObjectListDeclaration(GLGuiWindow); 23 23 public: 24 24 GLGuiWindow(); -
branches/new_class_id/src/lib/gui/gl/glmenu/glmenu_imagescreen.cc
r9709 r9715 26 26 27 27 #include "class_id.h" 28 NewObjectListDefinitionID(GLMenuImageScreen, CL_GLMENU_IMAGE_SCREEN);28 ObjectListDefinitionID(GLMenuImageScreen, CL_GLMENU_IMAGE_SCREEN); 29 29 CREATE_FACTORY(GLMenuImageScreen); 30 30 -
branches/new_class_id/src/lib/gui/gl/glmenu/glmenu_imagescreen.h
r9689 r9715 15 15 class GLMenuImageScreen : public BaseObject 16 16 { 17 NewObjectListDeclaration(GLMenuImageScreen);17 ObjectListDeclaration(GLMenuImageScreen); 18 18 public: 19 19 GLMenuImageScreen (const TiXmlElement* root = NULL); -
branches/new_class_id/src/lib/gui/gl/specials/glgui_notifier.cc
r9689 r9715 23 23 namespace OrxGui 24 24 { 25 NewObjectListDefinition(GLGuiNotifier);25 ObjectListDefinition(GLGuiNotifier); 26 26 /** 27 27 * @brief standard constructor -
branches/new_class_id/src/lib/gui/gl/specials/glgui_notifier.h
r9689 r9715 24 24 class GLGuiNotifier : public GLGuiWidget 25 25 { 26 NewObjectListDeclaration(GLGuiNotifier);26 ObjectListDeclaration(GLGuiNotifier); 27 27 public: 28 28 GLGuiNotifier(); -
branches/new_class_id/src/lib/lang/base_object.cc
r9691 r9715 21 21 #include "util/loading/load_param.h" 22 22 23 NewObjectListDefinition(BaseObject);23 ObjectListDefinition(BaseObject); 24 24 25 25 /** … … 43 43 BaseObject::~BaseObject () 44 44 { 45 /// Remove from the NewObjectLists45 /// Remove from the ObjectLists 46 46 ClassList::iterator it; 47 47 for (it = this->_classes.begin(); it != this->_classes.end(); ++it) … … 89 89 * @return True if found, false if not. 90 90 */ 91 bool BaseObject::isA(const NewObjectListBase& objectList) const91 bool BaseObject::isA(const ObjectListBase& objectList) const 92 92 { 93 93 ClassList::const_iterator it; … … 104 104 * @return True if found, false if not. 105 105 */ 106 bool BaseObject::isA(const NewClassID& classID) const106 bool BaseObject::isA(const ClassID& classID) const 107 107 { 108 108 ClassList::const_iterator it; -
branches/new_class_id/src/lib/lang/base_object.h
r9709 r9715 26 26 class BaseObject : public sigslot::has_slots<> 27 27 { 28 NewObjectListDeclaration(BaseObject);28 ObjectListDeclaration(BaseObject); 29 29 public: 30 30 BaseObject (const std::string& objectName = ""); … … 48 48 inline const std::string& getClassName() const { return _classes.front()._objectList->name(); }; 49 49 50 inline const NewClassID& getClassID() const { return *_leafClassID; }50 inline const ClassID& getClassID() const { return *_leafClassID; } 51 51 /** @returns the ID of the Topmost object of the ClassStack */ 52 52 inline const int& getLeafClassID() const { return _leafClassID->id(); } 53 53 54 bool isA(const NewObjectListBase& objectList) const;55 bool isA(const NewClassID& classID) const;54 bool isA(const ObjectListBase& objectList) const; 55 bool isA(const ClassID& classID) const; 56 56 bool isA(int classID) const; 57 57 bool isA(const std::string& className) const; … … 65 65 66 66 protected: 67 template<class T> void registerObject(T* object, NewObjectList<T>& list);67 template<class T> void registerObject(T* object, ObjectList<T>& list); 68 68 69 69 protected: … … 80 80 struct ClassEntry 81 81 { 82 /** Simple Constuctor @param objectList the NewObjectList, @param iterator the (intrusive) Iterator inside of the ObjectList */83 inline ClassEntry ( NewObjectListBase* objectList, NewObjectListBase::IteratorBase* iterator) : _objectList(objectList), _iterator(iterator) {}84 NewObjectListBase* _objectList; //!< A ObjectList this Object is part of85 NewObjectListBase::IteratorBase* _iterator; //!< An iterator pointing to the position of the Object inside of the List.82 /** Simple Constuctor @param objectList the ObjectList, @param iterator the (intrusive) Iterator inside of the ObjectList */ 83 inline ClassEntry (ObjectListBase* objectList, ObjectListBase::IteratorBase* iterator) : _objectList(objectList), _iterator(iterator) {} 84 ObjectListBase* _objectList; //!< A ObjectList this Object is part of 85 ObjectListBase::IteratorBase* _iterator; //!< An iterator pointing to the position of the Object inside of the List. 86 86 }; 87 87 typedef std::list<ClassEntry> ClassList; //!< Type definition for the List. … … 89 89 std::string className; //!< the name of the class 90 90 ClassList _classes; //!< All Classes this object is part of. 91 const NewClassID* _leafClassID; //!< Topmost ClassID.91 const ClassID* _leafClassID; //!< Topmost ClassID. 92 92 }; 93 93 … … 103 103 */ 104 104 template<class T> 105 inline void BaseObject::registerObject(T* object, NewObjectList<T>& objectList)105 inline void BaseObject::registerObject(T* object, ObjectList<T>& objectList) 106 106 { 107 107 this->_leafClassID = &objectList.identity(); -
branches/new_class_id/src/lib/lang/new_class_id.cc
r9709 r9715 23 23 * this Always points to the ID of the NullClass. 24 24 */ 25 NewClassID::NewClassID()25 ClassID::ClassID() 26 26 { 27 27 NullClass::acquireID(this->_id, this->_name); … … 30 30 /** 31 31 * @brief Acquiring the ID of a objectList. 32 * @param objList The NewObjectList to acquire the ID from.32 * @param objList The ObjectList to acquire the ID from. 33 33 */ 34 NewClassID::NewClassID(const NewObjectListBase* const objList)34 ClassID::ClassID(const ObjectListBase* const objList) 35 35 { 36 36 objList->acquireID(this->_id, this->_name); … … 38 38 39 39 40 NewClassID NullClass::_classID;40 ClassID NullClass::_classID; 41 41 42 42 int NullClass::_nullID; -
branches/new_class_id/src/lib/lang/new_class_id.h
r9709 r9715 10 10 #include <string> 11 11 12 class NewObjectListBase;12 class ObjectListBase; 13 13 14 14 //! A class to dynamically allocate ClassID's and to support a isA operator 15 15 /** 16 * A NewClassID can only be aquired over a NewObjectList,16 * A ClassID can only be aquired over a ObjectList, 17 17 * thus enabling the developer to have permanent access to the correct ID and ClassName 18 18 * 19 * The Idea behind this concept is, that storing a NewClassID that changes its internal state20 * all NewClassID's will be updated correctly.19 * The Idea behind this concept is, that storing a ClassID that changes its internal state 20 * all ClassID's will be updated correctly. 21 21 * 22 * Since the Existance of any NewObjectList is a requirement during the working process all22 * Since the Existance of any ObjectList is a requirement during the working process all 23 23 * ID's should reference a valid ID and ClassName 24 24 */ 25 class NewClassID25 class ClassID 26 26 { 27 27 public: 28 NewClassID();29 NewClassID(const NewObjectListBase* const id);28 ClassID(); 29 ClassID(const ObjectListBase* const id); 30 30 /// the copy constructor is also defined implicitely. 31 31 … … 36 36 37 37 /** @param id the id to compare @returns true on match (match is same ID) @brief compares two id's */ 38 bool operator==(const NewClassID& id) const { return *_id == *id._id /* || _name == id._name */; };38 bool operator==(const ClassID& id) const { return *_id == *id._id /* || _name == id._name */; }; 39 39 /** @param id the id to compare @returns true on match (match is same ID) @brief compares two id's */ 40 40 bool operator==(int id) const { return *_id == id; }; … … 42 42 bool operator==(const std::string& name) const { return *_name == name; }; 43 43 /** @param id the id to compare @returns false on match (match is same ID) @brief compares two id's */ 44 bool operator!=(const NewClassID& id) const { return *_id != *id._id /* && _name != id._name*/; };44 bool operator!=(const ClassID& id) const { return *_id != *id._id /* && _name != id._name*/; }; 45 45 /** @param id the id to compare @returns false on match (match is same ID) @brief compares two id's */ 46 46 bool operator!=(int id) const { return *_id != id; }; … … 61 61 public: 62 62 /** @returns the NullClass' ID. */ 63 static const NewClassID& classID() { return NullClass::_classID; }63 static const ClassID& classID() { return NullClass::_classID; } 64 64 /** @param id the ID to acquire @param name the name to acquire @brief acquires the ID of this Class */ 65 65 static void acquireID(const int*& id, const std::string*& name) { id = &_nullID; name = &_nullName; }; … … 69 69 70 70 private: 71 static NewClassID _classID; //!< The NullClass' ID71 static ClassID _classID; //!< The NullClass' ID 72 72 static const std::string _nullName; //!< The NullClass' Name ("NullClass") 73 73 static int _nullID; //!< The NullClass' ID -
branches/new_class_id/src/lib/lang/new_object_list.cc
r9709 r9715 28 28 * @return a new NewObejctList 29 29 */ 30 NewObjectListBase::NewObjectListBase(const std::string& className, int id)30 ObjectListBase::ObjectListBase(const std::string& className, int id) 31 31 : _name(className) 32 32 { 33 printf(" NewObjectList, Registered %s::%d\n", className.c_str(), id);34 if ( NewObjectListBase::_classesByID == NULL)35 { 36 NewObjectListBase::_classesByID = new classIDMap;37 assert ( NewObjectListBase::_classesByName == NULL);38 NewObjectListBase::_classesByName = new classNameMap;39 } 40 assert(! NewObjectListBase::classNameExists(className) && "Classes should only be included once, and no two classes should have the same name (key value)");33 printf("ObjectList, Registered %s::%d\n", className.c_str(), id); 34 if (ObjectListBase::_classesByID == NULL) 35 { 36 ObjectListBase::_classesByID = new classIDMap; 37 assert (ObjectListBase::_classesByName == NULL); 38 ObjectListBase::_classesByName = new classNameMap; 39 } 40 assert(!ObjectListBase::classNameExists(className) && "Classes should only be included once, and no two classes should have the same name (key value)"); 41 41 42 42 if (id == -1) 43 43 { 44 id = NewObjectListBase::_classesByID->size();44 id = ObjectListBase::_classesByID->size(); 45 45 // searching for a free ID 46 while ( NewObjectListBase::classIDExists(id)) ++id;47 } 48 assert(! NewObjectListBase::classIDExists(id) && "Classes should only be included once, and no two classes should have the same ID (key value)");46 while (ObjectListBase::classIDExists(id)) ++id; 47 } 48 assert(!ObjectListBase::classIDExists(id) && "Classes should only be included once, and no two classes should have the same ID (key value)"); 49 49 50 50 _id = id; … … 52 52 std::cout << "register new ObjectList " << className << " ID: " << this->_id << std::endl; 53 53 54 this->_identity = NewClassID(this);55 (* NewObjectListBase::_classesByID)[this->_identity.id()] = this;56 (* NewObjectListBase::_classesByName)[this->_identity.name()] = this;54 this->_identity = ClassID(this); 55 (*ObjectListBase::_classesByID)[this->_identity.id()] = this; 56 (*ObjectListBase::_classesByName)[this->_identity.name()] = this; 57 57 } 58 58 … … 61 61 * Destructor. 62 62 * 63 * This destructor deletes the NewObjectList, and cleans up the NewObjectList sorted Maps.64 */ 65 NewObjectListBase::~NewObjectListBase()66 { 67 assert ( NewObjectListBase::_classesByName != NULL && NewObjectListBase::_classesByID != NULL);63 * This destructor deletes the ObjectList, and cleans up the ObjectList sorted Maps. 64 */ 65 ObjectListBase::~ObjectListBase() 66 { 67 assert (ObjectListBase::_classesByName != NULL && ObjectListBase::_classesByID != NULL); 68 68 /* 69 69 std::cout << "Erasing: " << this->_name << " "<< this->_id << std::endl; 70 std::cout << "SIZE OF _classByID: " << NewObjectListBase::_classesByID->size() << std::endl;71 std::cout << "SIZE OF _classByName: " << NewObjectListBase::_classesByName->size() << std::endl;70 std::cout << "SIZE OF _classByID: " << ObjectListBase::_classesByID->size() << std::endl; 71 std::cout << "SIZE OF _classByName: " << ObjectListBase::_classesByName->size() << std::endl; 72 72 */ 73 NewObjectListBase::_classesByID->erase(this->_identity.id());74 NewObjectListBase::_classesByName->erase(this->_identity.name());75 76 if ( NewObjectListBase::_classesByID->empty())77 { 78 delete NewObjectListBase::_classesByID;79 NewObjectListBase::_classesByID = NULL;80 assert( NewObjectListBase::_classesByName != NULL);81 delete NewObjectListBase::_classesByName;82 NewObjectListBase::_classesByName = NULL;83 } 84 } 85 86 NewObjectListBase::classIDMap* NewObjectListBase::_classesByID = NULL;87 NewObjectListBase::classNameMap* NewObjectListBase::_classesByName = NULL;73 ObjectListBase::_classesByID->erase(this->_identity.id()); 74 ObjectListBase::_classesByName->erase(this->_identity.name()); 75 76 if (ObjectListBase::_classesByID->empty()) 77 { 78 delete ObjectListBase::_classesByID; 79 ObjectListBase::_classesByID = NULL; 80 assert(ObjectListBase::_classesByName != NULL); 81 delete ObjectListBase::_classesByName; 82 ObjectListBase::_classesByName = NULL; 83 } 84 } 85 86 ObjectListBase::classIDMap* ObjectListBase::_classesByID = NULL; 87 ObjectListBase::classNameMap* ObjectListBase::_classesByName = NULL; 88 88 89 89 /** 90 90 * @returns the Registered Class Count. 91 91 */ 92 unsigned int NewObjectListBase::classCount()93 { 94 assert ( NewObjectListBase::_classesByID != NULL);95 return NewObjectListBase::_classesByID->size();92 unsigned int ObjectListBase::classCount() 93 { 94 assert (ObjectListBase::_classesByID != NULL); 95 return ObjectListBase::_classesByID->size(); 96 96 }; 97 97 … … 101 101 * @return true if such a class already exists. 102 102 */ 103 bool NewObjectListBase::classIDExists(int id)104 { 105 return ( NewObjectListBase::_classesByID->find(id) != NewObjectListBase::_classesByID->end());103 bool ObjectListBase::classIDExists(int id) 104 { 105 return (ObjectListBase::_classesByID->find(id) != ObjectListBase::_classesByID->end()); 106 106 } 107 107 … … 111 111 * @return true if such a class already exists. 112 112 */ 113 bool NewObjectListBase::classNameExists(const std::string& name)114 { 115 return ( NewObjectListBase::_classesByName->find(name) != NewObjectListBase::_classesByName->end());116 } 117 118 /** 119 * @brief searches for a NewClassID in the list of all NewObjectLists, and returns its Identity113 bool ObjectListBase::classNameExists(const std::string& name) 114 { 115 return (ObjectListBase::_classesByName->find(name) != ObjectListBase::_classesByName->end()); 116 } 117 118 /** 119 * @brief searches for a ClassID in the list of all ObjectLists, and returns its Identity 120 120 * @param id: The Id to search for 121 121 * @returns the ClassID if found and NullClass' identity if not. 122 122 */ 123 const NewClassID& NewObjectListBase::retrieveIdentity(int id)124 { 125 const NewObjectListBase* const base = NewObjectListBase::getObjectList(id);123 const ClassID& ObjectListBase::retrieveIdentity(int id) 124 { 125 const ObjectListBase* const base = ObjectListBase::getObjectList(id); 126 126 127 127 if (base != NULL) … … 133 133 134 134 /** 135 * @brief searches for a NewClassID in the list of all NewObjectLists, and returns its Identity135 * @brief searches for a ClassID in the list of all ObjectLists, and returns its Identity 136 136 * @param name: The Name to search for 137 137 * @returns the ClassID if found and NullClass' identity if not. 138 138 */ 139 const NewClassID& NewObjectListBase::retrieveIdentity(const std::string& name)140 { 141 const NewObjectListBase* const base = NewObjectListBase::getObjectList(name);139 const ClassID& ObjectListBase::retrieveIdentity(const std::string& name) 140 { 141 const ObjectListBase* const base = ObjectListBase::getObjectList(name); 142 142 143 143 if (base != NULL) … … 151 151 * @brief Searches for a ObjectList with the ID classID 152 152 * @param classID the ID to search for. 153 * @return The NewObjectList if found, NULL otherwise.154 */ 155 const NewObjectListBase* const NewObjectListBase::getObjectList(int classID)156 { 157 assert ( NewObjectListBase::_classesByID != NULL);158 NewObjectListBase::classIDMap::iterator it = NewObjectListBase::_classesByID->find(classID);159 if (it != NewObjectListBase::_classesByID->end())153 * @return The ObjectList if found, NULL otherwise. 154 */ 155 const ObjectListBase* const ObjectListBase::getObjectList(int classID) 156 { 157 assert (ObjectListBase::_classesByID != NULL); 158 ObjectListBase::classIDMap::iterator it = ObjectListBase::_classesByID->find(classID); 159 if (it != ObjectListBase::_classesByID->end()) 160 160 return (*it).second; 161 161 else … … 166 166 * @brief Searches for a ObjectList with the Name className 167 167 * @param className the Name to search for. 168 * @return The NewObjectList if found, NULL otherwise.169 */ 170 const NewObjectListBase* const NewObjectListBase::getObjectList(const std::string& className)171 { 172 assert ( NewObjectListBase::_classesByName != NULL);173 NewObjectListBase::classNameMap::iterator it = NewObjectListBase::_classesByName->find(className);174 if (it != NewObjectListBase::_classesByName->end())168 * @return The ObjectList if found, NULL otherwise. 169 */ 170 const ObjectListBase* const ObjectListBase::getObjectList(const std::string& className) 171 { 172 assert (ObjectListBase::_classesByName != NULL); 173 ObjectListBase::classNameMap::iterator it = ObjectListBase::_classesByName->find(className); 174 if (it != ObjectListBase::_classesByName->end()) 175 175 return (*it).second; 176 176 else … … 179 179 180 180 /** 181 * @brief Searches for a ObjectList with the NewClassID classID181 * @brief Searches for a ObjectList with the ClassID classID 182 182 * @param classID the ID to search for. 183 * @return The NewObjectList if found, NULL otherwise.184 */ 185 const NewObjectListBase* const NewObjectListBase::getObjectList(const NewClassID& classID)186 { 187 return NewObjectListBase::getObjectList(classID.id());183 * @return The ObjectList if found, NULL otherwise. 184 */ 185 const ObjectListBase* const ObjectListBase::getObjectList(const ClassID& classID) 186 { 187 return ObjectListBase::getObjectList(classID.id()); 188 188 } 189 189 … … 193 193 * @param objectName the Name of the Object to search for 194 194 */ 195 BaseObject* NewObjectListBase::getBaseObject(int classID, const std::string& objectName)196 { 197 const NewObjectListBase* const base = NewObjectListBase::getObjectList(classID);195 BaseObject* ObjectListBase::getBaseObject(int classID, const std::string& objectName) 196 { 197 const ObjectListBase* const base = ObjectListBase::getObjectList(classID); 198 198 199 199 if (base != NULL) … … 208 208 * @param objectName the Name of the Object to search for 209 209 */ 210 BaseObject* NewObjectListBase::getBaseObject(const std::string& className, const std::string& objectName)211 { 212 const NewObjectListBase* const base = NewObjectListBase::getObjectList(className);210 BaseObject* ObjectListBase::getBaseObject(const std::string& className, const std::string& objectName) 211 { 212 const ObjectListBase* const base = ObjectListBase::getObjectList(className); 213 213 214 214 if (base != NULL) … … 220 220 /** 221 221 * @brief Retrieves the first BaseObject matching the name objectName from the List matching classID. 222 * @param classID The NewClassID of the List.222 * @param classID The ClassID of the List. 223 223 * @param objectName the Name of the Object to search for 224 224 */ 225 BaseObject* NewObjectListBase::getBaseObject(const NewClassID& classID, const std::string& objectName)226 { 227 const NewObjectListBase* const base = NewObjectListBase::getObjectList(classID);225 BaseObject* ObjectListBase::getBaseObject(const ClassID& classID, const std::string& objectName) 226 { 227 const ObjectListBase* const base = ObjectListBase::getObjectList(classID); 228 228 229 229 if (base != NULL) … … 238 238 * @brief Prints out some debugging information about a given List. 239 239 */ 240 void NewObjectListBase::debug(unsigned int level) const240 void ObjectListBase::debug(unsigned int level) const 241 241 { 242 242 base_list list; … … 259 259 260 260 261 void NewObjectListBase::debugAll(unsigned int level)262 { 263 printf("Listing all %d ObjectLists \n", NewObjectListBase::_classesByID->size());264 265 for (classNameMap::const_iterator it = NewObjectListBase::_classesByName->begin();266 it != NewObjectListBase::_classesByName->end();261 void ObjectListBase::debugAll(unsigned int level) 262 { 263 printf("Listing all %d ObjectLists \n", ObjectListBase::_classesByID->size()); 264 265 for (classNameMap::const_iterator it = ObjectListBase::_classesByName->begin(); 266 it != ObjectListBase::_classesByName->end(); 267 267 ++it) 268 268 { … … 280 280 * @return The ClassName or an empty string if the ID was not found. 281 281 */ 282 const std::string& NewObjectListBase::IDToString(int classID)283 { 284 const NewObjectListBase* const base = NewObjectListBase::getObjectList(classID);282 const std::string& ObjectListBase::IDToString(int classID) 283 { 284 const ObjectListBase* const base = ObjectListBase::getObjectList(classID); 285 285 286 286 if (base != NULL) … … 299 299 * @return The Classes ID if found, -1 otherwise. 300 300 */ 301 int NewObjectListBase::StringToID(const std::string& className)302 { 303 const NewObjectListBase* const base = NewObjectListBase::getObjectList(className);301 int ObjectListBase::StringToID(const std::string& className) 302 { 303 const ObjectListBase* const base = ObjectListBase::getObjectList(className); 304 304 305 305 if (base != NULL) -
branches/new_class_id/src/lib/lang/new_object_list.h
r9713 r9715 21 21 * two new functions objectList() and classID(). 22 22 */ 23 #define NewObjectListDeclaration(ClassName) \23 #define ObjectListDeclaration(ClassName) \ 24 24 public: \ 25 static inline const NewObjectList<ClassName>& objectList() { return ClassName::_objectList; }; \26 static inline const NewClassID& classID() { return ClassName::_objectList.identity(); }; \25 static inline const ObjectList<ClassName>& objectList() { return ClassName::_objectList; }; \ 26 static inline const ClassID& classID() { return ClassName::_objectList.identity(); }; \ 27 27 private: \ 28 static NewObjectList<ClassName> _objectList29 30 #define NewObjectListDefinitionID(ClassName, ID) \31 NewObjectList<ClassName> ClassName::_objectList(#ClassName, ID)32 33 34 #define NewObjectListDefinition(ClassName) \35 NewObjectListDefinitionID(ClassName, -1)28 static ObjectList<ClassName> _objectList 29 30 #define ObjectListDefinitionID(ClassName, ID) \ 31 ObjectList<ClassName> ClassName::_objectList(#ClassName, ID) 32 33 34 #define ObjectListDefinition(ClassName) \ 35 ObjectListDefinitionID(ClassName, -1) 36 36 37 37 class BaseObject; 38 //! The superclass that all NewObjectLists follow.39 /** 40 * @see template<class T> NewObjectList<T>41 */ 42 class NewObjectListBase38 //! The superclass that all ObjectLists follow. 39 /** 40 * @see template<class T> ObjectList<T> 41 */ 42 class ObjectListBase 43 43 { 44 44 public: … … 56 56 public: 57 57 /** @returns The Identity of the Class stored within. */ 58 inline const NewClassID& identity() const { return _identity; }58 inline const ClassID& identity() const { return _identity; } 59 59 /** @returns the ID of the Identity of the ObjectList */ 60 60 inline int id() const { return _id; }; … … 64 64 inline bool operator==(int id) const { return _id == id; }; 65 65 /** @param id The id to compare @returns true on match, false otherwise */ 66 inline bool operator==(const NewClassID& id) const { return id == _id; };66 inline bool operator==(const ClassID& id) const { return id == _id; }; 67 67 /** @param name The name to compare @returns true on match, false otherwise */ 68 68 inline bool operator==(const std::string& name) const { return _name == name; }; … … 72 72 virtual void getBaseObjectList(base_list* list) const = 0; 73 73 74 static const NewClassID& retrieveIdentity(int id);75 static const NewClassID& retrieveIdentity(const std::string& name);76 77 static const NewObjectListBase* const getObjectList(int classID);78 static const NewObjectListBase* const getObjectList(const std::string& className);79 static const NewObjectListBase* const getObjectList(const NewClassID& classID);74 static const ClassID& retrieveIdentity(int id); 75 static const ClassID& retrieveIdentity(const std::string& name); 76 77 static const ObjectListBase* const getObjectList(int classID); 78 static const ObjectListBase* const getObjectList(const std::string& className); 79 static const ObjectListBase* const getObjectList(const ClassID& classID); 80 80 81 81 static BaseObject* getBaseObject(int classID, const std::string& objectName); 82 82 static BaseObject* getBaseObject(const std::string& className, const std::string& objectName); 83 static BaseObject* getBaseObject(const NewClassID& classID, const std::string& objectName);83 static BaseObject* getBaseObject(const ClassID& classID, const std::string& objectName); 84 84 85 85 /** @returns an Object with Name name out of this List @param name the name of the Object. */ … … 100 100 101 101 protected: 102 NewObjectListBase(const std::string& className, int id = -1);103 virtual ~ NewObjectListBase();104 105 private: 106 NewObjectListBase(const NewObjectListBase&);102 ObjectListBase(const std::string& className, int id = -1); 103 virtual ~ObjectListBase(); 104 105 private: 106 ObjectListBase(const ObjectListBase&); 107 107 108 108 static bool classIDExists(int id); … … 111 111 112 112 protected: 113 typedef std::map<int, NewObjectListBase*> classIDMap; //!< The Generic Map.114 typedef std::map<std::string, NewObjectListBase*> classNameMap; //!< The Generic Map.113 typedef std::map<int, ObjectListBase*> classIDMap; //!< The Generic Map. 114 typedef std::map<std::string, ObjectListBase*> classNameMap; //!< The Generic Map. 115 115 116 116 private: 117 117 int _id; 118 118 const std::string _name; //!< The Name of the Class. 119 NewClassID _identity; //!< The Identity of the Class. (equal to _id and _name)119 ClassID _identity; //!< The Identity of the Class. (equal to _id and _name) 120 120 121 121 private: … … 135 135 * as with normal std::list. 136 136 * 137 * Furthermore the linkage over the single Lists is given over the Superclass NewObjectListBase.137 * Furthermore the linkage over the single Lists is given over the Superclass ObjectListBase. 138 138 * 139 139 * … … 141 141 * 142 142 * To define a Class with a ObjectList, you have to: 143 * 1. Include ' NewObjectListDeclaration(T);' in its Declaration (at the beginning)144 * 2. Include ' NewObjectListDefinition(T);' in some Definition file (cc-file)143 * 1. Include 'ObjectListDeclaration(T);' in its Declaration (at the beginning) 144 * 2. Include 'ObjectListDefinition(T);' in some Definition file (cc-file) 145 145 * 3. In the constructor add 'registerObject(this, objectList);' 146 146 * … … 154 154 * 155 155 * @example Iterating: Iteration is made easy, and fast as follows: 156 * for ( NewObjectList<PlayerStats>::const_iterator it = PlayerStats::objectList().begin();156 * for (ObjectList<PlayerStats>::const_iterator it = PlayerStats::objectList().begin(); 157 157 * it != PlayerStats::objectList().end(); 158 158 * ++it) … … 166 166 */ 167 167 template<class T> 168 class NewObjectList : public NewObjectListBase168 class ObjectList : public ObjectListBase 169 169 { 170 170 public: … … 174 174 175 175 176 class Iterator : public NewObjectListBase::IteratorBase176 class Iterator : public ObjectListBase::IteratorBase 177 177 { 178 178 public: 179 179 Iterator(iterator it) { _it = it; } 180 180 inline iterator& it() { return _it; } 181 typename NewObjectList::iterator _it;181 typename ObjectList::iterator _it; 182 182 }; 183 183 184 184 public: 185 NewObjectList(const std::string& name, int id = -1);186 ~ NewObjectList();185 ObjectList(const std::string& name, int id = -1); 186 ~ObjectList(); 187 187 188 188 virtual BaseObject* getBaseObject(const std::string& name) const; … … 210 210 211 211 212 NewObjectListBase::IteratorBase* registerObject(T* object);212 ObjectListBase::IteratorBase* registerObject(T* object); 213 213 virtual void unregisterObject(IteratorBase* iterator); 214 214 215 215 protected: 216 virtual void getBaseObjectList( NewObjectListBase::base_list* list) const;216 virtual void getBaseObjectList(ObjectListBase::base_list* list) const; 217 217 218 218 219 219 private: 220 220 //! the copy constructor will be hidden. 221 NewObjectList(const NewObjectList& definer) {};221 ObjectList(const ObjectList& definer) {}; 222 222 223 223 private: … … 233 233 ///////////////////////// 234 234 /** 235 * @brief creates a new NewObjectList235 * @brief creates a new ObjectList 236 236 * @param name The name of the Class. 237 237 * @param id The ID of the class if desired, or -1 if an id should be assigned automatically. 238 238 */ 239 239 template <class T> 240 NewObjectList<T>::NewObjectList(const std::string& name, int id)241 : NewObjectListBase(name, id)240 ObjectList<T>::ObjectList(const std::string& name, int id) 241 : ObjectListBase(name, id) 242 242 {} 243 243 244 244 /** 245 * @brief deletes the NewObjectList.246 */ 247 template <class T> 248 NewObjectList<T>::~NewObjectList()245 * @brief deletes the ObjectList. 246 */ 247 template <class T> 248 ObjectList<T>::~ObjectList() 249 249 { 250 250 if (!_objects.empty()) … … 260 260 */ 261 261 template <class T> 262 BaseObject* NewObjectList<T>::getBaseObject(const std::string& name) const262 BaseObject* ObjectList<T>::getBaseObject(const std::string& name) const 263 263 { 264 264 return this->getObject(name); … … 273 273 */ 274 274 template <class T> 275 T* NewObjectList<T>::getObject(const std::string& name) const275 T* ObjectList<T>::getObject(const std::string& name) const 276 276 { 277 277 const_iterator it; … … 288 288 */ 289 289 template <class T> 290 bool NewObjectList<T>::exists(const T* const object) const290 bool ObjectList<T>::exists(const T* const object) const 291 291 { 292 292 return (std::find(_objects.begin(), _objects.end(), object) != _objects.end()); … … 299 299 */ 300 300 template <class T> 301 void NewObjectList<T>::getBaseObjectList(NewObjectListBase::base_list* list) const301 void ObjectList<T>::getBaseObjectList(ObjectListBase::base_list* list) const 302 302 { 303 303 assert (list != NULL); … … 309 309 310 310 /** 311 * @brief registers an Object to the NewObjectList.311 * @brief registers an Object to the ObjectList. 312 312 * @param T object the Object to register. 313 313 * @returns a pointer to the iterator inside of the list. 314 314 */ 315 315 template <class T> 316 NewObjectListBase::IteratorBase* NewObjectList<T>::registerObject(T* object)316 ObjectListBase::IteratorBase* ObjectList<T>::registerObject(T* object) 317 317 { 318 318 this->_objects.push_back(object); … … 325 325 */ 326 326 template <class T> 327 void NewObjectList<T>::unregisterObject(IteratorBase* iterator)327 void ObjectList<T>::unregisterObject(IteratorBase* iterator) 328 328 { 329 329 this->_objects.erase(static_cast<Iterator*>(iterator)->it()); -
branches/new_class_id/src/lib/lang/test_object_list.cc
r9682 r9715 12 12 // bool operator==(const std::string& name) const { return _objectName == name; }; 13 13 14 NewObjectListDeclaration(NewBaseObject);14 ObjectListDeclaration(NewBaseObject); 15 15 16 16 protected: … … 20 20 }; 21 21 template<class T> 22 inline void registerObject(T* object, NewObjectList<T>& objectList) { _id.registerObject(object, objectList); };22 inline void registerObject(T* object, ObjectList<T>& objectList) { _id.registerObject(object, objectList); }; 23 23 protected: 24 NewClassID _id;24 ClassID _id; 25 25 std::string _objectName; 26 26 27 27 28 28 }; 29 NewObjectListDefinition(NewBaseObject);29 ObjectListDefinition(NewBaseObject); 30 30 31 31 … … 40 40 41 41 42 NewObjectListDeclaration(Test);42 ObjectListDeclaration(Test); 43 43 //ObjectListDeclaration(Test); 44 44 }; 45 NewObjectListDefinitionID(Test, -1);45 ObjectListDefinitionID(Test, -1); 46 46 47 47 Test::Test() … … 73 73 // std::cout << "~Bone()\n"; 74 74 }; 75 NewObjectListDeclaration(Bone);75 ObjectListDeclaration(Bone); 76 76 }; 77 NewObjectListDefinitionID(Bone, -1);77 ObjectListDefinitionID(Bone, -1); 78 78 79 79 int main() -
branches/new_class_id/src/lib/network/converter.cc
r9690 r9715 28 28 SHELL_COMMAND_STATIC(debug, Converter, Converter::debug); 29 29 30 NewObjectListDefinition(Converter);30 ObjectListDefinition(Converter); 31 31 /* using namespace std is default, this needs to be here */ 32 32 -
branches/new_class_id/src/lib/network/converter.h
r9690 r9715 24 24 class Converter : public BaseObject 25 25 { 26 NewObjectListDeclaration(Converter);26 ObjectListDeclaration(Converter); 27 27 public: 28 28 static byte* intToByteArray(int x); -
branches/new_class_id/src/lib/network/data_stream.cc
r9691 r9715 20 20 /* using namespace std is default, this needs to be here */ 21 21 22 NewObjectListDefinition(DataStream);22 ObjectListDefinition(DataStream); 23 23 24 24 /** -
branches/new_class_id/src/lib/network/data_stream.h
r9690 r9715 17 17 class DataStream : public BaseObject 18 18 { 19 NewObjectListDeclaration(DataStream);19 ObjectListDeclaration(DataStream); 20 20 public: 21 21 DataStream(); -
branches/new_class_id/src/lib/network/handshake.cc
r9691 r9715 23 23 24 24 25 NewObjectListDefinition(Handshake);25 ObjectListDefinition(Handshake); 26 26 27 27 -
branches/new_class_id/src/lib/network/handshake.h
r9690 r9715 42 42 class Handshake : public Synchronizeable 43 43 { 44 NewObjectListDeclaration(Handshake);44 ObjectListDeclaration(Handshake); 45 45 public: 46 46 Handshake( int nodeType, int clientId = 0, int networkGameManagerId = 0, int messageManagerId = 0 ); -
branches/new_class_id/src/lib/network/message_manager.cc
r9691 r9715 28 28 29 29 30 NewObjectListDefinition(MessageManager);30 ObjectListDefinition(MessageManager); 31 31 MessageManager* MessageManager::singletonRef = NULL; 32 32 -
branches/new_class_id/src/lib/network/message_manager.h
r9690 r9715 96 96 class MessageManager : public Synchronizeable { 97 97 98 NewObjectListDeclaration(MessageManager);98 ObjectListDeclaration(MessageManager); 99 99 public: 100 100 inline static MessageManager * getInstance(){ if (!singletonRef) singletonRef = new MessageManager(); return singletonRef; } -
branches/new_class_id/src/lib/network/monitor/connection_monitor.cc
r9691 r9715 23 23 /* using namespace std is default, this needs to be here */ 24 24 25 NewObjectListDefinition(ConnectionMonitor);25 ObjectListDefinition(ConnectionMonitor); 26 26 /** 27 27 * constructor -
branches/new_class_id/src/lib/network/monitor/connection_monitor.h
r9690 r9715 19 19 class ConnectionMonitor : virtual public BaseObject 20 20 { 21 NewObjectListDeclaration(ConnectionMonitor);21 ObjectListDeclaration(ConnectionMonitor); 22 22 public: 23 23 ConnectionMonitor( int userId ); -
branches/new_class_id/src/lib/network/monitor/network_monitor.cc
r9691 r9715 37 37 SHELL_COMMAND(debug, NetworkMonitor, debug); 38 38 39 NewObjectListDefinition(NetworkMonitor);39 ObjectListDefinition(NetworkMonitor); 40 40 41 41 -
branches/new_class_id/src/lib/network/monitor/network_monitor.h
r9690 r9715 27 27 class NetworkMonitor : public Synchronizeable 28 28 { 29 NewObjectListDeclaration(NetworkMonitor);29 ObjectListDeclaration(NetworkMonitor); 30 30 public: 31 31 NetworkMonitor(NetworkStream* networkStream); -
branches/new_class_id/src/lib/network/monitor/network_stats_widget.cc
r9709 r9715 211 211 212 212 213 NewObjectListDefinition(NetworkStatsWidget);213 ObjectListDefinition(NetworkStatsWidget); 214 214 /** 215 215 * @brief standard constructor -
branches/new_class_id/src/lib/network/monitor/network_stats_widget.h
r9691 r9715 81 81 class NetworkStatsWidget : public OrxGui::GLGuiFixedpositionBox 82 82 { 83 NewObjectListDeclaration(NetworkStatsWidget);83 ObjectListDeclaration(NetworkStatsWidget); 84 84 public: 85 85 static void toggleGUI(); -
branches/new_class_id/src/lib/network/network_game_manager.cc
r9691 r9715 46 46 47 47 48 NewObjectListDefinition(NetworkGameManager);48 ObjectListDefinition(NetworkGameManager); 49 49 NetworkGameManager* NetworkGameManager::singletonRef = NULL; 50 50 … … 97 97 98 98 int team = rules.getTeamForNewUser(); 99 NewClassID playableClassId = rules.getPlayableClassId( userId, team );99 ClassID playableClassId = rules.getPlayableClassId( userId, team ); 100 100 std::string playableModel = rules.getPlayableModelFileName( userId, team, playableClassId ); 101 101 std::string playableTexture = rules.getPlayableModelFileName( userId, team, playableClassId ); … … 186 186 } 187 187 188 for ( NewObjectList<Synchronizeable>::const_iterator it = Synchronizeable::objectList().begin();188 for (ObjectList<Synchronizeable>::const_iterator it = Synchronizeable::objectList().begin(); 189 189 it != Synchronizeable::objectList().end(); 190 190 ++it) -
branches/new_class_id/src/lib/network/network_game_manager.h
r9690 r9715 33 33 class NetworkGameManager: public Synchronizeable 34 34 { 35 NewObjectListDeclaration(NetworkGameManager);35 ObjectListDeclaration(NetworkGameManager); 36 36 public: 37 37 virtual ~NetworkGameManager(); -
branches/new_class_id/src/lib/network/network_manager.cc
r9691 r9715 40 40 41 41 42 NewObjectListDefinition(NetworkManager);42 ObjectListDefinition(NetworkManager); 43 43 NetworkManager* NetworkManager::singletonRef = NULL; 44 44 -
branches/new_class_id/src/lib/network/network_manager.h
r9690 r9715 25 25 class NetworkManager : public BaseObject 26 26 { 27 NewObjectListDeclaration(NetworkManager);27 ObjectListDeclaration(NetworkManager); 28 28 public: 29 29 -
branches/new_class_id/src/lib/network/network_protocol.cc
r9691 r9715 35 35 36 36 37 NewObjectListDefinition(NetworkProtocol);37 ObjectListDefinition(NetworkProtocol); 38 38 /** 39 39 standard constructor -
branches/new_class_id/src/lib/network/network_protocol.h
r9690 r9715 25 25 class NetworkProtocol : virtual public BaseObject 26 26 { 27 NewObjectListDeclaration(NetworkProtocol);27 ObjectListDeclaration(NetworkProtocol); 28 28 public: 29 29 NetworkProtocol(); -
branches/new_class_id/src/lib/network/network_socket.cc
r9690 r9715 24 24 #include "network_socket.h" 25 25 26 NewObjectListDefinition(NetworkSocket);26 ObjectListDefinition(NetworkSocket); 27 27 /** 28 28 * Default constructor -
branches/new_class_id/src/lib/network/network_socket.h
r9690 r9715 17 17 class NetworkSocket : public BaseObject 18 18 { 19 NewObjectListDeclaration(NetworkSocket);19 ObjectListDeclaration(NetworkSocket); 20 20 public: 21 21 NetworkSocket(); -
branches/new_class_id/src/lib/network/network_stream.cc
r9709 r9715 54 54 #define PACKAGE_SIZE 256 55 55 56 NewObjectListDefinition(NetworkStream);56 ObjectListDefinition(NetworkStream); 57 57 /** 58 58 * empty constructor -
branches/new_class_id/src/lib/network/network_stream.h
r9690 r9715 33 33 class NetworkStream : public DataStream 34 34 { 35 NewObjectListDeclaration(NetworkStream);35 ObjectListDeclaration(NetworkStream); 36 36 public: 37 37 NetworkStream(); -
branches/new_class_id/src/lib/network/player_stats.cc
r9709 r9715 32 32 #include "class_id.h" 33 33 34 NewObjectListDefinitionID(PlayerStats, CL_PLAYER_STATS);34 ObjectListDefinitionID(PlayerStats, CL_PLAYER_STATS); 35 35 CREATE_FACTORY(PlayerStats); 36 36 … … 123 123 PlayerStats * PlayerStats::getStats( int userId ) 124 124 { 125 for ( NewObjectList<PlayerStats>::const_iterator it = PlayerStats::objectList().begin();125 for (ObjectList<PlayerStats>::const_iterator it = PlayerStats::objectList().begin(); 126 126 it != PlayerStats::objectList().end(); 127 127 ++it) … … 142 142 { 143 143 this->playable = NULL; 144 for ( NewObjectList<Playable>::const_iterator it = Playable::objectList().begin();144 for (ObjectList<Playable>::const_iterator it = Playable::objectList().begin(); 145 145 it != Playable::objectList().end(); 146 146 ++it) … … 266 266 ScoreList result; 267 267 268 for ( NewObjectList<PlayerStats>::const_iterator it = PlayerStats::objectList().begin();268 for (ObjectList<PlayerStats>::const_iterator it = PlayerStats::objectList().begin(); 269 269 it != PlayerStats::objectList().end(); 270 270 ++it) -
branches/new_class_id/src/lib/network/player_stats.h
r9691 r9715 36 36 class PlayerStats : public Synchronizeable 37 37 { 38 NewObjectListDeclaration(PlayerStats);38 ObjectListDeclaration(PlayerStats); 39 39 public: 40 40 PlayerStats( const TiXmlElement* root = NULL ); … … 58 58 59 59 inline int getPlayableClassId(){ return playableClassId; } 60 void setPlayableClassId( const NewClassID& classId ){ this->playableClassId = classId.id(); };60 void setPlayableClassId( const ClassID& classId ){ this->playableClassId = classId.id(); }; 61 61 62 62 inline int getPlayableUniqueId(){ return playableUniqueId; } -
branches/new_class_id/src/lib/network/proxy/network_settings.cc
r9691 r9715 27 27 28 28 29 NewObjectListDefinition(NetworkSettings);29 ObjectListDefinition(NetworkSettings); 30 30 31 31 NetworkSettings* NetworkSettings::singletonRef = NULL; -
branches/new_class_id/src/lib/network/proxy/network_settings.h
r9690 r9715 24 24 class NetworkSettings : public BaseObject 25 25 { 26 NewObjectListDeclaration(NetworkSettings);26 ObjectListDeclaration(NetworkSettings); 27 27 public: 28 28 inline static NetworkSettings* getInstance() { if (!NetworkSettings::singletonRef) NetworkSettings::singletonRef = new NetworkSettings(); -
branches/new_class_id/src/lib/network/proxy/proxy_control.cc
r9691 r9715 40 40 41 41 SHELL_COMMAND(forceReconnect, ProxyControl, forceReconnectionShell); 42 NewObjectListDefinition(ProxyControl);42 ObjectListDefinition(ProxyControl); 43 43 44 44 /** -
branches/new_class_id/src/lib/network/proxy/proxy_control.h
r9690 r9715 30 30 class ProxyControl : public Synchronizeable 31 31 { 32 NewObjectListDeclaration(ProxyControl);32 ObjectListDeclaration(ProxyControl); 33 33 public: 34 34 inline static ProxyControl* getInstance() { if (!ProxyControl::singletonRef) ProxyControl::singletonRef = new ProxyControl(); -
branches/new_class_id/src/lib/network/server_socket.cc
r9690 r9715 23 23 #include "server_socket.h" 24 24 25 NewObjectListDefinition(ServerSocket);25 ObjectListDefinition(ServerSocket); 26 26 /** 27 27 * constructor -
branches/new_class_id/src/lib/network/server_socket.h
r9690 r9715 19 19 class ServerSocket : public BaseObject 20 20 { 21 NewObjectListDeclaration(ServerSocket);21 ObjectListDeclaration(ServerSocket); 22 22 public: 23 23 ServerSocket( int port); -
branches/new_class_id/src/lib/network/shared_network_data.cc
r9691 r9715 25 25 26 26 27 NewObjectListDefinition(SharedNetworkData);27 ObjectListDefinition(SharedNetworkData); 28 28 SharedNetworkData* SharedNetworkData::singletonRef = NULL; 29 29 -
branches/new_class_id/src/lib/network/shared_network_data.h
r9690 r9715 22 22 class SharedNetworkData : public BaseObject 23 23 { 24 NewObjectListDeclaration(SharedNetworkData);24 ObjectListDeclaration(SharedNetworkData); 25 25 public: 26 26 inline static SharedNetworkData* getInstance() { if (!SharedNetworkData::singletonRef) SharedNetworkData::singletonRef = new SharedNetworkData(); -
branches/new_class_id/src/lib/network/synchronizeable.cc
r9691 r9715 32 32 33 33 34 NewObjectListDefinition(Synchronizeable);34 ObjectListDefinition(Synchronizeable); 35 35 36 36 /** -
branches/new_class_id/src/lib/network/synchronizeable.h
r9690 r9715 41 41 class Synchronizeable : virtual public BaseObject 42 42 { 43 NewObjectListDeclaration(Synchronizeable);43 ObjectListDeclaration(Synchronizeable); 44 44 45 45 public: -
branches/new_class_id/src/lib/network/tcp_server_socket.cc
r9691 r9715 26 26 #include "debug.h" 27 27 28 NewObjectListDefinition(TcpServerSocket);28 ObjectListDefinition(TcpServerSocket); 29 29 TcpServerSocket::TcpServerSocket( int port ) : ServerSocket( port ) 30 30 { -
branches/new_class_id/src/lib/network/tcp_server_socket.h
r9690 r9715 19 19 class TcpServerSocket : public ServerSocket 20 20 { 21 NewObjectListDeclaration(TcpServerSocket);21 ObjectListDeclaration(TcpServerSocket); 22 22 public: 23 23 TcpServerSocket( int port ); -
branches/new_class_id/src/lib/network/tcp_socket.cc
r9691 r9715 30 30 #include "debug.h" 31 31 32 NewObjectListDefinition(TcpSocket);32 ObjectListDefinition(TcpSocket); 33 33 /** 34 34 * Default constructor -
branches/new_class_id/src/lib/network/tcp_socket.h
r9690 r9715 40 40 class TcpSocket : public NetworkSocket 41 41 { 42 NewObjectListDeclaration(TcpSocket);42 ObjectListDeclaration(TcpSocket); 43 43 public: 44 44 TcpSocket(); -
branches/new_class_id/src/lib/network/udp_server_socket.cc
r9690 r9715 18 18 19 19 20 NewObjectListDefinition(UdpServerSocket);20 ObjectListDefinition(UdpServerSocket); 21 21 /** 22 22 * constructor -
branches/new_class_id/src/lib/network/udp_server_socket.h
r9690 r9715 50 50 class UdpServerSocket : public ServerSocket 51 51 { 52 NewObjectListDeclaration(UdpServerSocket);52 ObjectListDeclaration(UdpServerSocket); 53 53 public: 54 54 UdpServerSocket( int port); -
branches/new_class_id/src/lib/network/udp_socket.cc
r9690 r9715 18 18 #include "debug.h" 19 19 20 NewObjectListDefinition(UdpSocket);20 ObjectListDefinition(UdpSocket); 21 21 22 22 void UdpSocket::init( ) -
branches/new_class_id/src/lib/network/udp_socket.h
r9690 r9715 24 24 class UdpSocket : public NetworkSocket 25 25 { 26 NewObjectListDeclaration(UdpSocket);26 ObjectListDeclaration(UdpSocket); 27 27 public: 28 28 UdpSocket(); -
branches/new_class_id/src/lib/particles/box_emitter.cc
r9709 r9715 26 26 #include "class_id.h" 27 27 28 NewObjectListDefinitionID(BoxEmitter, CL_BOX_EMITTER);28 ObjectListDefinitionID(BoxEmitter, CL_BOX_EMITTER); 29 29 CREATE_FACTORY(BoxEmitter); 30 30 -
branches/new_class_id/src/lib/particles/box_emitter.h
r9686 r9715 19 19 class BoxEmitter : public ParticleEmitter 20 20 { 21 NewObjectListDeclaration(BoxEmitter);21 ObjectListDeclaration(BoxEmitter); 22 22 friend class ParticleSystem; 23 23 public: -
branches/new_class_id/src/lib/particles/dot_emitter.cc
r9709 r9715 27 27 28 28 #include "class_id.h" 29 NewObjectListDefinitionID(DotEmitter, CL_DOT_EMITTER);29 ObjectListDefinitionID(DotEmitter, CL_DOT_EMITTER); 30 30 CREATE_FACTORY(DotEmitter); 31 31 -
branches/new_class_id/src/lib/particles/dot_emitter.h
r9686 r9715 12 12 class DotEmitter : public ParticleEmitter 13 13 { 14 NewObjectListDeclaration(DotEmitter);14 ObjectListDeclaration(DotEmitter); 15 15 16 16 friend class ParticleSystem; -
branches/new_class_id/src/lib/particles/dot_particles.cc
r9709 r9715 26 26 #include "class_id.h" 27 27 28 NewObjectListDefinitionID(DotParticles, CL_DOT_PARTICLES);28 ObjectListDefinitionID(DotParticles, CL_DOT_PARTICLES); 29 29 CREATE_FACTORY(DotParticles); 30 30 -
branches/new_class_id/src/lib/particles/dot_particles.h
r9686 r9715 13 13 class DotParticles : public ParticleSystem 14 14 { 15 NewObjectListDeclaration(DotParticles);15 ObjectListDeclaration(DotParticles); 16 16 17 17 public: -
branches/new_class_id/src/lib/particles/model_particles.cc
r9709 r9715 26 26 #include "class_id.h" 27 27 28 NewObjectListDefinitionID(ModelParticles, CL_MODEL_PARTICLES);28 ObjectListDefinitionID(ModelParticles, CL_MODEL_PARTICLES); 29 29 CREATE_FACTORY(ModelParticles); 30 30 -
branches/new_class_id/src/lib/particles/model_particles.h
r9686 r9715 13 13 class ModelParticles : public ParticleSystem 14 14 { 15 NewObjectListDeclaration(ModelParticles);15 ObjectListDeclaration(ModelParticles); 16 16 17 17 public: -
branches/new_class_id/src/lib/particles/particle_emitter.cc
r9686 r9715 23 23 #include "debug.h" 24 24 25 NewObjectListDefinition(ParticleEmitter);25 ObjectListDefinition(ParticleEmitter); 26 26 27 27 /** -
branches/new_class_id/src/lib/particles/particle_emitter.h
r9686 r9715 23 23 class ParticleEmitter : public PNode 24 24 { 25 NewObjectListDeclaration(ParticleEmitter);25 ObjectListDeclaration(ParticleEmitter); 26 26 friend class ParticleSystem; 27 27 public: -
branches/new_class_id/src/lib/particles/particle_system.cc
r9686 r9715 32 32 #include <algorithm> 33 33 34 NewObjectListDefinition(ParticleSystem);34 ObjectListDefinition(ParticleSystem); 35 35 36 36 /** -
branches/new_class_id/src/lib/particles/particle_system.h
r9686 r9715 56 56 //! A class to handle ParticleSystems 57 57 class ParticleSystem : public WorldEntity, public PhysicsInterface { 58 NewObjectListDeclaration(ParticleSystem);58 ObjectListDeclaration(ParticleSystem); 59 59 60 60 public: -
branches/new_class_id/src/lib/particles/plane_emitter.cc
r9709 r9715 26 26 #include "class_id.h" 27 27 28 NewObjectListDefinitionID(PlaneEmitter, CL_PLANE_EMITTER);28 ObjectListDefinitionID(PlaneEmitter, CL_PLANE_EMITTER); 29 29 CREATE_FACTORY(PlaneEmitter); 30 30 -
branches/new_class_id/src/lib/particles/plane_emitter.h
r9686 r9715 21 21 class PlaneEmitter : public ParticleEmitter 22 22 { 23 NewObjectListDeclaration(PlaneEmitter);23 ObjectListDeclaration(PlaneEmitter); 24 24 25 25 friend class ParticleSystem; -
branches/new_class_id/src/lib/particles/spark_particles.cc
r9709 r9715 26 26 #include "class_id.h" 27 27 28 NewObjectListDefinitionID(SparkParticles, CL_SPARK_PARTICLES);28 ObjectListDefinitionID(SparkParticles, CL_SPARK_PARTICLES); 29 29 CREATE_FACTORY(SparkParticles); 30 30 -
branches/new_class_id/src/lib/particles/spark_particles.h
r9686 r9715 13 13 class SparkParticles : public ParticleSystem 14 14 { 15 NewObjectListDeclaration(SparkParticles);15 ObjectListDeclaration(SparkParticles); 16 16 17 17 public: -
branches/new_class_id/src/lib/particles/sprite_particles.cc
r9709 r9715 26 26 #include "class_id.h" 27 27 28 NewObjectListDefinitionID(SpriteParticles, CL_SPRITE_PARTICLES);28 ObjectListDefinitionID(SpriteParticles, CL_SPRITE_PARTICLES); 29 29 CREATE_FACTORY(SpriteParticles); 30 30 -
branches/new_class_id/src/lib/particles/sprite_particles.h
r9686 r9715 13 13 class SpriteParticles : public ParticleSystem 14 14 { 15 NewObjectListDeclaration(SpriteParticles);15 ObjectListDeclaration(SpriteParticles); 16 16 17 17 public: -
branches/new_class_id/src/lib/physics/fields/field.cc
r9686 r9715 23 23 #include "util/loading/load_param.h" 24 24 25 NewObjectListDefinition(Field);25 ObjectListDefinition(Field); 26 26 27 27 /** -
branches/new_class_id/src/lib/physics/fields/field.h
r9686 r9715 34 34 class Field : public PNode 35 35 { 36 NewObjectListDeclaration(Field);36 ObjectListDeclaration(Field); 37 37 public: 38 38 Field(); -
branches/new_class_id/src/lib/physics/fields/gravity.cc
r9709 r9715 22 22 23 23 #include "class_id.h" 24 NewObjectListDefinitionID(Gravity, CL_FIELD_GRAVITY);24 ObjectListDefinitionID(Gravity, CL_FIELD_GRAVITY); 25 25 26 26 CREATE_FACTORY(Gravity); -
branches/new_class_id/src/lib/physics/fields/gravity.h
r9686 r9715 16 16 //! A class for ... 17 17 class Gravity : public Field { 18 NewObjectListDeclaration(Gravity);18 ObjectListDeclaration(Gravity); 19 19 20 20 public: -
branches/new_class_id/src/lib/physics/fields/point_gravity.cc
r9686 r9715 21 21 22 22 #include "class_id.h" 23 NewObjectListDefinitionID(PointGravity, CL_FIELD_POINT_GRAVITY);23 ObjectListDefinitionID(PointGravity, CL_FIELD_POINT_GRAVITY); 24 24 25 25 -
branches/new_class_id/src/lib/physics/fields/point_gravity.h
r9686 r9715 16 16 //! A class for ... 17 17 class PointGravity : public Field { 18 NewObjectListDeclaration(PointGravity);18 ObjectListDeclaration(PointGravity); 19 19 20 20 public: -
branches/new_class_id/src/lib/physics/fields/twirl.cc
r9686 r9715 21 21 22 22 #include "class_id.h" 23 NewObjectListDefinitionID(Twirl, CL_FIELD_TWIRL);23 ObjectListDefinitionID(Twirl, CL_FIELD_TWIRL); 24 24 25 25 -
branches/new_class_id/src/lib/physics/fields/twirl.h
r9686 r9715 16 16 //! A class for ... 17 17 class Twirl : public Field { 18 NewObjectListDeclaration(Twirl);18 ObjectListDeclaration(Twirl); 19 19 20 20 public: -
branches/new_class_id/src/lib/physics/physics_connection.cc
r9709 r9715 28 28 29 29 #include "class_id.h" 30 NewObjectListDefinition(PhysicsConnection);30 ObjectListDefinition(PhysicsConnection); 31 31 CREATE_FACTORY(PhysicsConnection); 32 32 /** -
branches/new_class_id/src/lib/physics/physics_connection.h
r9686 r9715 27 27 class PhysicsConnection : public BaseObject 28 28 { 29 NewObjectListDeclaration(PhysicsConnection);29 ObjectListDeclaration(PhysicsConnection); 30 30 public: 31 31 PhysicsConnection(PhysicsInterface* subject, Field* field); -
branches/new_class_id/src/lib/physics/physics_engine.cc
r9686 r9715 24 24 25 25 26 NewObjectListDefinition(PhysicsEngine);26 ObjectListDefinition(PhysicsEngine); 27 27 /** 28 28 * @brief standard constructor … … 222 222 /* actually tick all the PhysicsInterfaces. Move the objects around */ 223 223 224 NewObjectList<PhysicsInterface>::const_iterator it;224 ObjectList<PhysicsInterface>::const_iterator it; 225 225 for (it = PhysicsInterface::objectList().begin(); 226 226 it != PhysicsInterface::objectList().end(); -
branches/new_class_id/src/lib/physics/physics_engine.h
r9686 r9715 22 22 class PhysicsEngine : public BaseObject 23 23 { 24 NewObjectListDeclaration(PhysicsEngine);24 ObjectListDeclaration(PhysicsEngine); 25 25 public: 26 26 virtual ~PhysicsEngine(); -
branches/new_class_id/src/lib/physics/physics_interface.cc
r9686 r9715 31 31 32 32 33 NewObjectListDefinition(PhysicsInterface);33 ObjectListDefinition(PhysicsInterface); 34 34 /** 35 35 * @brief standard constructor -
branches/new_class_id/src/lib/physics/physics_interface.h
r9686 r9715 29 29 class PhysicsInterface : virtual public BaseObject 30 30 { 31 NewObjectListDeclaration(PhysicsInterface);31 ObjectListDeclaration(PhysicsInterface); 32 32 public: 33 33 PhysicsInterface(); -
branches/new_class_id/src/lib/script_engine/script.cc
r9713 r9715 23 23 #include "parser/tinyxml/tinyxml.h" 24 24 25 NewObjectListDefinition(Script);25 ObjectListDefinition(Script); 26 26 27 27 CREATE_SCRIPTABLE_CLASS(Script, Script::classID(), … … 155 155 } 156 156 157 BaseObject* object = NewObjectListBase::getBaseObject(objectName, className);157 BaseObject* object = ObjectListBase::getBaseObject(objectName, className); 158 158 // printf(("%s is at %p \n",objectName.c_str(),object); 159 159 if (object != NULL && !objectIsAdded(objectName)) -
branches/new_class_id/src/lib/script_engine/script.h
r9692 r9715 22 22 class Script : public BaseObject 23 23 { 24 NewObjectListDeclaration(Script);24 ObjectListDeclaration(Script); 25 25 public: 26 26 Script(const TiXmlElement* root = NULL); -
branches/new_class_id/src/lib/script_engine/script_class.cc
r9699 r9715 19 19 #include <cassert> 20 20 21 NewObjectListDefinition(ScriptClass);21 ObjectListDefinition(ScriptClass); 22 22 /** 23 23 * @brief standard constructor 24 24 * @todo this constructor is not jet implemented - do it 25 25 */ 26 ScriptClass::ScriptClass(const std::string& name, const NewClassID& classID, ScriptMethod* scriptMethods)26 ScriptClass::ScriptClass(const std::string& name, const ClassID& classID, ScriptMethod* scriptMethods) 27 27 : BaseObject(name), _classID(classID) 28 28 { -
branches/new_class_id/src/lib/script_engine/script_class.h
r9709 r9715 25 25 class ScriptClass : public BaseObject 26 26 { 27 NewObjectListDeclaration(ScriptClass);27 ObjectListDeclaration(ScriptClass); 28 28 29 29 public: … … 37 37 38 38 protected: 39 ScriptClass(const std::string& name, const NewClassID& classID, ScriptMethod* scriptMethods);39 ScriptClass(const std::string& name, const ClassID& classID, ScriptMethod* scriptMethods); 40 40 41 41 private: 42 NewClassID _classID;42 ClassID _classID; 43 43 ScriptMethod* _scriptMethods; 44 44 }; … … 51 51 { 52 52 public: 53 tScriptClass(const std::string& name, NewClassID classID, ScriptMethod* scriptMethods)53 tScriptClass(const std::string& name, ClassID classID, ScriptMethod* scriptMethods) 54 54 : ScriptClass(name, classID, scriptMethods) 55 55 { } -
branches/new_class_id/src/lib/script_engine/script_manager.cc
r9699 r9715 97 97 Script* ScriptManager::getScriptByFile(const std::string& file) 98 98 { 99 for ( NewObjectList<Script>::const_iterator it = Script::objectList().begin();99 for (ObjectList<Script>::const_iterator it = Script::objectList().begin(); 100 100 it != Script::objectList().end(); 101 101 ++it) -
branches/new_class_id/src/lib/shell/shell.cc
r9692 r9715 54 54 ->completionPlugin(0, OrxShell::CompletorFileSystem(".ttf", "fonts/")); 55 55 56 NewObjectListDefinition(Shell);56 ObjectListDefinition(Shell); 57 57 58 58 /** -
branches/new_class_id/src/lib/shell/shell.h
r9692 r9715 48 48 class Shell : public Element2D, public EventListener 49 49 { 50 NewObjectListDeclaration(Shell);50 ObjectListDeclaration(Shell); 51 51 public: 52 52 Shell(); -
branches/new_class_id/src/lib/shell/shell_command.cc
r9709 r9715 26 26 namespace OrxShell 27 27 { 28 NewObjectListDefinition(ShellCommand);28 ObjectListDefinition(ShellCommand); 29 29 SHELL_COMMAND(debug, ShellCommandClass, help); 30 30 … … 241 241 return false; 242 242 243 const NewObjectListBase* const objectList = NewObjectListBase::getObjectList(cmd->shellClass->getName());243 const ObjectListBase* const objectList = ObjectListBase::getObjectList(cmd->shellClass->getName()); 244 244 if (objectList != NULL) 245 245 { 246 NewObjectListBase::base_list list;246 ObjectListBase::base_list list; 247 247 objectList->getBaseObjectList(&list); 248 NewObjectListBase::base_iterator it;248 ObjectListBase::base_iterator it; 249 249 250 250 // No Description given (only for speedup) -
branches/new_class_id/src/lib/shell/shell_command.h
r9692 r9715 58 58 class ShellCommand : public BaseObject 59 59 { 60 NewObjectListDeclaration(ShellCommand);60 ObjectListDeclaration(ShellCommand); 61 61 62 62 friend class ShellCommandClass; -
branches/new_class_id/src/lib/shell/shell_command_class.cc
r9697 r9715 27 27 namespace OrxShell 28 28 { 29 NewObjectListDefinition(ShellCommandClass);29 ObjectListDefinition(ShellCommandClass); 30 30 31 31 CmdClassList* ShellCommandClass::_commandClassList = NULL; -
branches/new_class_id/src/lib/shell/shell_command_class.h
r9697 r9715 25 25 class ShellCommandClass : public BaseObject 26 26 { 27 NewObjectListDeclaration(ShellCommandClass);27 ObjectListDeclaration(ShellCommandClass); 28 28 29 29 friend class ShellCommand; … … 36 36 static void unregisterAllCommands(); 37 37 static ShellCommandClass* getCommandClass(const std::string& className); 38 NewClassID getClassID();38 ClassID getClassID(); 39 39 static bool exists(const std::string& className); 40 40 -
branches/new_class_id/src/lib/shell/shell_completion.cc
r9709 r9715 50 50 bool ShellCompletion::autoComplete(std::string& input) 51 51 { 52 NewClassID classID;53 const NewObjectListBase* objectList = NULL; //< the list of Objects stored in classID's ClassList52 ClassID classID; 53 const ObjectListBase* objectList = NULL; //< the list of Objects stored in classID's ClassList 54 54 bool emptyComplete = false; //< if the completion input is empty string. e.g "" 55 55 long completeType = NullCompletion; //< the Type we'd like to complete. … … 84 84 (!emptyComplete && inputSplits.size() == 2)) 85 85 { 86 objectList = NewObjectListBase::getObjectList(inputSplits[0]);86 objectList = ObjectListBase::getObjectList(inputSplits[0]); 87 87 if (objectList != NULL) 88 88 classID = objectList->identity(); … … 95 95 (!emptyComplete && inputSplits.size() == 3)) 96 96 { 97 if ( NewObjectListBase::getBaseObject(inputSplits[0], inputSplits[1]))97 if (ObjectListBase::getBaseObject(inputSplits[0], inputSplits[1])) 98 98 completeType |= FunctionCompletion; 99 99 } … … 133 133 * @return true on success, false otherwise 134 134 */ 135 bool ShellCompletion::objectComplete(const std::string& objectBegin, const NewObjectListBase* objectList)135 bool ShellCompletion::objectComplete(const std::string& objectBegin, const ObjectListBase* objectList) 136 136 { 137 137 assert (objectList != NULL); … … 141 141 type = ClassCompletion; 142 142 143 NewObjectListBase::base_list list;143 ObjectListBase::base_list list; 144 144 objectList->getBaseObjectList(&list); 145 145 -
branches/new_class_id/src/lib/shell/shell_completion.h
r9697 r9715 16 16 // FORWARD DECLARATION 17 17 class BaseObject; 18 class NewObjectListBase;18 class ObjectListBase; 19 19 20 20 namespace OrxShell … … 54 54 55 55 private: 56 bool objectComplete(const std::string& objectBegin, const NewObjectListBase* const objectList);56 bool objectComplete(const std::string& objectBegin, const ObjectListBase* const objectList); 57 57 bool commandComplete(const std::string& commandBegin, const std::string& className); 58 58 bool aliasComplete(const std::string& aliasBegin); -
branches/new_class_id/src/lib/shell/shell_input.cc
r9692 r9715 32 32 ->setAlias("help"); 33 33 34 NewObjectListDefinition(ShellInput);34 ObjectListDefinition(ShellInput); 35 35 36 36 /** -
branches/new_class_id/src/lib/shell/shell_input.h
r9692 r9715 30 30 class ShellInput : public Text, public EventListener 31 31 { 32 NewObjectListDeclaration(ShellInput);32 ObjectListDeclaration(ShellInput); 33 33 34 34 public: -
branches/new_class_id/src/lib/sound/ogg_player.cc
r9686 r9715 49 49 namespace OrxSound 50 50 { 51 NewObjectListDefinition(OggPlayer);51 ObjectListDefinition(OggPlayer); 52 52 /** 53 53 * initializes an Ogg-player from a file -
branches/new_class_id/src/lib/sound/ogg_player.h
r9686 r9715 25 25 class OggPlayer : public BaseObject 26 26 { 27 NewObjectListDeclaration(OggPlayer);27 ObjectListDeclaration(OggPlayer); 28 28 29 29 public: -
branches/new_class_id/src/lib/sound/sound_buffer.cc
r9686 r9715 35 35 namespace OrxSound 36 36 { 37 NewObjectListDefinition(SoundBuffer);37 ObjectListDefinition(SoundBuffer); 38 38 ////////////////// 39 39 /* SOUND-BUFFER */ -
branches/new_class_id/src/lib/sound/sound_buffer.h
r9686 r9715 18 18 class SoundBuffer : public BaseObject 19 19 { 20 NewObjectListDeclaration(SoundBuffer);20 ObjectListDeclaration(SoundBuffer); 21 21 public: 22 22 SoundBuffer(const std::string& fileName); -
branches/new_class_id/src/lib/sound/sound_engine.cc
r9686 r9715 29 29 namespace OrxSound 30 30 { 31 NewObjectListDefinition(SoundEngine);31 ObjectListDefinition(SoundEngine); 32 32 ////////////////// 33 33 /* SOUND-ENGINE */ … … 202 202 203 203 // updating all the Sources positions 204 NewObjectList<SoundSource>::const_iterator sourceIT;204 ObjectList<SoundSource>::const_iterator sourceIT; 205 205 for (sourceIT = SoundSource::objectList().begin(); 206 206 sourceIT != SoundSource::objectList().end(); -
branches/new_class_id/src/lib/sound/sound_engine.h
r9686 r9715 27 27 class SoundEngine : public BaseObject 28 28 { 29 NewObjectListDeclaration(SoundEngine);29 ObjectListDeclaration(SoundEngine); 30 30 public: 31 31 virtual ~SoundEngine(); -
branches/new_class_id/src/lib/sound/sound_source.cc
r9686 r9715 25 25 namespace OrxSound 26 26 { 27 NewObjectListDefinition(SoundSource);27 ObjectListDefinition(SoundSource); 28 28 /** 29 29 * @brief creates a SoundSource at position sourceNode with the SoundBuffer buffer -
branches/new_class_id/src/lib/sound/sound_source.h
r9686 r9715 18 18 class SoundSource : public BaseObject 19 19 { 20 NewObjectListDeclaration(SoundSource);20 ObjectListDeclaration(SoundSource); 21 21 public: 22 22 SoundSource(const PNode* sourceNode = NULL, const SoundBuffer* buffer = NULL); -
branches/new_class_id/src/lib/util/executor/executor.cc
r9684 r9715 19 19 20 20 21 NewObjectListDefinition(Executor);21 ObjectListDefinition(Executor); 22 22 23 23 /** -
branches/new_class_id/src/lib/util/executor/executor.h
r9684 r9715 38 38 class Executor : public BaseObject 39 39 { 40 NewObjectListDeclaration(Executor);40 ObjectListDeclaration(Executor); 41 41 public: 42 42 virtual ~Executor(); -
branches/new_class_id/src/lib/util/loading/dynamic_loader.cc
r9709 r9715 24 24 25 25 26 NewObjectListDefinition(DynamicLoader);26 ObjectListDefinition(DynamicLoader); 27 27 28 28 /** -
branches/new_class_id/src/lib/util/loading/dynamic_loader.h
r9684 r9715 19 19 class DynamicLoader : public Factory 20 20 { 21 NewObjectListDeclaration(DynamicLoader);21 ObjectListDeclaration(DynamicLoader); 22 22 23 23 public: -
branches/new_class_id/src/lib/util/loading/factory.cc
r9712 r9715 19 19 //#include "shell_command.h" 20 20 21 NewObjectListDefinition(Factory);21 ObjectListDefinition(Factory); 22 22 23 23 //SHELL_COMMAND(create, Factory, fabricate); … … 28 28 * set everything to zero and define factoryName 29 29 */ 30 Factory::Factory (const NewClassID& classID)30 Factory::Factory (const ClassID& classID) 31 31 : _classID(classID) 32 32 { … … 140 140 * @returns a new Object of Type classID on match, NULL otherwise 141 141 */ 142 BaseObject* Factory::fabricate(const NewClassID& classID)142 BaseObject* Factory::fabricate(const ClassID& classID) 143 143 { 144 144 if (Factory::_factoryList == NULL) -
branches/new_class_id/src/lib/util/loading/factory.h
r9709 r9715 39 39 class Factory : public BaseObject 40 40 { 41 NewObjectListDeclaration(Factory);41 ObjectListDeclaration(Factory); 42 42 public: 43 43 virtual ~Factory (); … … 46 46 47 47 static BaseObject* fabricate(const std::string& className); 48 static BaseObject* fabricate(const NewClassID& classID);48 static BaseObject* fabricate(const ClassID& classID); 49 49 static BaseObject* fabricate(const TiXmlElement* root); 50 50 … … 52 52 bool operator==(int classID) const; 53 53 bool operator==(const std::string& className) const; 54 bool operator==(const NewClassID& classID) const { return _classID == classID; };54 bool operator==(const ClassID& classID) const { return _classID == classID; }; 55 55 56 56 protected: 57 Factory (const NewClassID& id);57 Factory (const ClassID& id); 58 58 virtual BaseObject* fabricateObject(const TiXmlElement* root = NULL) const = 0; 59 59 … … 62 62 63 63 protected: 64 const NewClassID _classID; //!< The Class-Identifyer of the Factory.64 const ClassID _classID; //!< The Class-Identifyer of the Factory. 65 65 static std::list<Factory*>* _factoryList; //!< List of Registered Factories 66 66 }; … … 78 78 * @param classID the ID of the Class to be created. 79 79 */ 80 tFactory (const NewClassID& classID)80 tFactory (const ClassID& classID) 81 81 : Factory(classID) 82 82 { } -
branches/new_class_id/src/lib/util/loading/fast_factory.cc
r9709 r9715 22 22 23 23 24 NewObjectListDefinition(FastFactory);24 ObjectListDefinition(FastFactory); 25 25 26 26 /** … … 30 30 * @return a new FastFactory 31 31 */ 32 FastFactory::FastFactory (const NewClassID& classID, const std::string& fastFactoryName)32 FastFactory::FastFactory (const ClassID& classID, const std::string& fastFactoryName) 33 33 { 34 34 this->registerObject(this, FastFactory::_objectList); … … 98 98 * @returns true if found, false otherwise. 99 99 */ 100 FastFactory* FastFactory::searchFastFactory(const NewClassID& classID)100 FastFactory* FastFactory::searchFastFactory(const ClassID& classID) 101 101 { 102 102 if (FastFactory::first == NULL) … … 229 229 * @return the Object to resurrect, NULL if classID is not found. 230 230 */ 231 BaseObject* FastFactory::resurrect(const NewClassID& classID)231 BaseObject* FastFactory::resurrect(const ClassID& classID) 232 232 { 233 233 FastFactory* tmpFac = FastFactory::getFirst(); -
branches/new_class_id/src/lib/util/loading/fast_factory.h
r9709 r9715 60 60 class FastFactory : public BaseObject 61 61 { 62 NewObjectListDeclaration(FastFactory);62 ObjectListDeclaration(FastFactory); 63 63 64 64 public: … … 68 68 // functions to push and pop elements of this class 69 69 BaseObject* resurrect(); 70 static BaseObject* resurrect(const NewClassID& classID);70 static BaseObject* resurrect(const ClassID& classID); 71 71 void kill(BaseObject* object); 72 72 static void kill(BaseObject* object, bool searchForFastFactory); … … 80 80 inline static FastFactory* getFirst() { return FastFactory::first; }; 81 81 82 static FastFactory* searchFastFactory(const NewClassID& classID);82 static FastFactory* searchFastFactory(const ClassID& classID); 83 83 static FastFactory* searchFastFactory(const std::string& fastFactoryName); 84 84 85 const NewClassID& getStoredID() const { return this->storedClassID; };85 const ClassID& getStoredID() const { return this->storedClassID; }; 86 86 87 87 protected: 88 FastFactory (const NewClassID& classID, const std::string& fastFactoryName = "");88 FastFactory (const ClassID& classID, const std::string& fastFactoryName = ""); 89 89 90 90 /** sets the Next factory in the list @param nextFactory the next factory */ … … 100 100 101 101 protected: 102 NewClassID storedClassID; //!< The classID of the specified class.102 ClassID storedClassID; //!< The classID of the specified class. 103 103 unsigned int storedDeadObjects; //!< How many dead objects are stored in this class 104 104 … … 122 122 { 123 123 public: 124 static tFastFactory<T>* getFastFactory(const NewClassID& classID, const std::string& fastFactoryName);124 static tFastFactory<T>* getFastFactory(const ClassID& classID, const std::string& fastFactoryName); 125 125 126 126 private: 127 tFastFactory(const NewClassID& classID, const std::string& fastFactoryName);127 tFastFactory(const ClassID& classID, const std::string& fastFactoryName); 128 128 129 129 virtual void fabricate(); … … 137 137 */ 138 138 template<class T> 139 tFastFactory<T>::tFastFactory(const NewClassID& classID, const std::string& fastFactoryName)139 tFastFactory<T>::tFastFactory(const ClassID& classID, const std::string& fastFactoryName) 140 140 : FastFactory(classID, fastFactoryName) 141 141 {} … … 148 148 */ 149 149 template<class T> 150 tFastFactory<T>* tFastFactory<T>::getFastFactory(const NewClassID& classID, const std::string& fastFactoryName)150 tFastFactory<T>* tFastFactory<T>::getFastFactory(const ClassID& classID, const std::string& fastFactoryName) 151 151 { 152 152 tFastFactory<T>* tmpFac = NULL; -
branches/new_class_id/src/lib/util/loading/game_loader.cc
r9684 r9715 28 28 #include "key_mapper.h" 29 29 30 NewObjectListDefinition(GameLoader);30 ObjectListDefinition(GameLoader); 31 31 32 32 -
branches/new_class_id/src/lib/util/loading/game_loader.h
r9684 r9715 38 38 class GameLoader : public EventListener 39 39 { 40 NewObjectListDeclaration(GameLoader);40 ObjectListDeclaration(GameLoader); 41 41 public: 42 42 virtual ~GameLoader (); -
branches/new_class_id/src/lib/util/loading/resource.h
r9714 r9715 37 37 { 38 38 public: 39 Type(const NewClassID& classID) : _classID(classID) { };39 Type(const ClassID& classID) : _classID(classID) { }; 40 40 41 41 void addExtension(const std::string& extension); 42 42 43 43 private: 44 const NewClassID& _classID;44 const ClassID& _classID; 45 45 std::vector<std::string> _resourcePaths; 46 46 std::vector<std::string> _resourceSubPaths; … … 73 73 unsigned int referenceCount; //!< How many times this Resource has been loaded. 74 74 /// TODO REMOVE THIS: ResourceType type; //!< ResourceType of this Resource. 75 Resource Priority prio; //!< The Priority of this resource. (can only be increased, so noone else will delete this)75 Resource::Priority prio; //!< The Priority of this resource. (can only be increased, so noone else will delete this) 76 76 77 77 MultiType param[3]; //!< The Parameters given to this Resource. -
branches/new_class_id/src/lib/util/loading/resource_manager.cc
r9684 r9715 50 50 #include <unistd.h> 51 51 52 NewObjectListDefinition(ResourceManager);52 ObjectListDefinition(ResourceManager); 53 53 54 54 /** -
branches/new_class_id/src/lib/util/loading/resource_manager.h
r9684 r9715 94 94 class ResourceManager : public BaseObject 95 95 { 96 NewObjectListDeclaration(ResourceManager);96 ObjectListDeclaration(ResourceManager); 97 97 public: 98 98 virtual ~ResourceManager(); -
branches/new_class_id/src/lib/util/preferences.cc
r9684 r9715 20 20 #include "debug.h" 21 21 22 NewObjectListDefinition(Preferences);22 ObjectListDefinition(Preferences); 23 23 24 24 /** -
branches/new_class_id/src/lib/util/preferences.h
r9684 r9715 29 29 //! A default singleton class. 30 30 class Preferences : public BaseObject { 31 NewObjectListDeclaration(Preferences);31 ObjectListDeclaration(Preferences); 32 32 public: 33 33 virtual ~Preferences(void);
Note: See TracChangeset
for help on using the changeset viewer.