Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4744 in orxonox.OLD for orxonox/trunk


Ignore:
Timestamp:
Jun 30, 2005, 4:53:14 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: classList.h some definitions

Location:
orxonox/trunk/src
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/lib/lang/base_object.cc

    r4742 r4744  
    6363/**
    6464   \brief sets the class identifiers
    65    \param id a number for the class from class_list.h enumeration
     65   \param id a number for the class from class_id.h enumeration
    6666   \param className the class name
    6767*/
  • orxonox/trunk/src/lib/lang/base_object.h

    r4742 r4744  
    4949
    5050  private:
    51     static void addToClassList(BaseObject* object, ClassID id, const char* className);
    52 
    53   private:
    5451    const char*        className;        //!< the name of the class
    55     long               classID;          //!< this is the id from the class_list.h enumeration
     52    long               classID;          //!< this is the id from the class_id.h enumeration
    5653    char*              objectName;       //!< The name of this object
    5754
    5855    bool               finalized;        //!< is true if the object is ready to be garbage collected
    59 
    60 //    static ClassList*  classList;
    6156};
    6257
  • orxonox/trunk/src/lib/lang/class_list.cc

    r4743 r4744  
    3030      don't forget to:
    3131       1. Add the new file new_class.cc to the ./src/Makefile.am
    32        2. Add the class identifier to ./src/class_list.h eg. CL_NEW_CLASS
     32       2. Add the class identifier to ./src/class_id.h eg. CL_NEW_CLASS
    3333
    3434      Advanced Topics:
  • orxonox/trunk/src/lib/lang/class_list.h

    r4743 r4744  
    88#define _CLASS_LIST_H
    99
     10#include "class_id.h"
     11
    1012// FORWARD DEFINITION
    11 
     13class BaseObject;
     14template<class T> class tList;
    1215
    1316
     
    2023
    2124
     25  void addToClassList(BaseObject* objectPointer, ClassID classID, const char* className);
    2226 private:
     27   static ClassList* first;
     28   static ClassList* last;
     29
     30   int classCount;
     31
    2332
    2433};
  • orxonox/trunk/src/proto/proto_class.cc

    r4320 r4744  
    1 /* 
     1/*
    22   orxonox - the future of 3D-vertical-scrollers
    33
     
    2525   \todo this constructor is not jet implemented - do it
    2626*/
    27 ProtoClass::ProtoClass () 
     27ProtoClass::ProtoClass ()
    2828{
    29    this->setClassID(CL_PROTO_ID, "ProtoClass"); 
     29   this->setClassID(CL_PROTO_ID, "ProtoClass");
    3030
    3131   /* If you make a new class, what is most probably the case when you write this file
    3232      don't forget to:
    3333       1. Add the new file new_class.cc to the ./src/Makefile.am
    34        2. Add the class identifier to ./src/class_list.h eg. CL_NEW_CLASS
     34       2. Add the class identifier to ./src/class_id.h eg. CL_NEW_CLASS
    3535
    3636      Advanced Topics:
    3737      - if you want to let your object be managed via the ObjectManager make sure to read
    3838        the object_manager.h header comments. You will use this most certanly only if you
    39         make many objects of your class, like a weapon bullet.
     39        make many objects of your class, like a weapon bullet.
    4040   */
    4141}
     
    4646
    4747*/
    48 ProtoClass::~ProtoClass () 
     48ProtoClass::~ProtoClass ()
    4949{
    5050  // delete what has to be deleted here
  • orxonox/trunk/src/proto/proto_singleton.cc

    r4519 r4744  
    1 /* 
     1/*
    22   orxonox - the future of 3D-vertical-scrollers
    33
     
    2424   \brief standard constructor
    2525*/
    26 ProtoSingleton::ProtoSingleton () 
     26ProtoSingleton::ProtoSingleton ()
    2727{
    2828   this->setClassName("ProtoSingleton");
    29    this->setClassID(CL_PROTO_ID, "ProtoSingleton"); 
     29   this->setClassID(CL_PROTO_ID, "ProtoSingleton");
    3030
    3131   /* If you make a new class, what is most probably the case when you write this file
    3232      don't forget to:
    3333       1. Add the new file new_class.cc to the ./src/Makefile.am
    34        2. Add the class identifier to ./src/class_list.h eg. CL_NEW_CLASS
     34       2. Add the class identifier to ./src/class_id.h eg. CL_NEW_CLASS
    3535
    3636      Advanced Topics:
    3737      - if you want to let your object be managed via the ObjectManager make sure to read
    3838        the object_manager.h header comments. You will use this most certanly only if you
    39         make many objects of your class, like a weapon bullet.
     39        make many objects of your class, like a weapon bullet.
    4040   */
    4141}
     
    5050
    5151*/
    52 ProtoSingleton::~ProtoSingleton () 
     52ProtoSingleton::~ProtoSingleton ()
    5353{
    5454  ProtoSingleton::singletonRef = NULL;
  • orxonox/trunk/src/util/object_manager.h

    r4699 r4744  
    1111    TO ADD SUPPORT FOR A CLASS do the following steps:
    1212    1. include the hader file : #include "class_header.h"
    13     2. add the class to the type enum classList {}; in class_list.h
     13    2. add the class to the type enum classID {}; in class_id.h
    1414    3. define a function void mCache( ClassName ) in class ObjectManager
    1515
     
    2323#include "projectile.h"
    2424#include "list.h"
    25 
    26 #include "class_list.h"
    27 
    2825
    2926class GarbageCollector;
Note: See TracChangeset for help on using the changeset viewer.