Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8361 in orxonox.OLD


Ignore:
Timestamp:
Jun 14, 2006, 9:49:56 AM (18 years ago)
Author:
bensch
Message:

trunk: ClassList is a friend of BaseObject, so that the addToClassList and removeFromClassList functions can be private

recently those functions were used, where they should not have been.

this problem could also arise in the ObjectManager, if someone uses the internal functions from there

maybe friending there too soon (after the 8'th july :) )

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/lang/class_list.h

    r8271 r8361  
    2929 */
    3030class ClassList {
     31  friend class BaseObject;
     32
    3133  public:
    3234    ClassList(ClassID classID, unsigned long classIDFull, const std::string& className);
    3335    virtual ~ClassList();
    34 
    35     /* MAINTENANCE FUNCTIONS THESE ARE !!ONLY FOR BASEOBJECT !! */
    36     static ClassList*                     addToClassList(BaseObject* objectPointer, ClassID classID, unsigned long classIDFull, const std::string& className);
    37     static void                           removeFromClassList(BaseObject* objectPointer);
    38 
    39 
    4036
    4137    static const std::list<BaseObject*>*  getList(ClassID classID = CL_NULL);// { return (ClassList* fl = ClassList::getClassList(classID) != NULL)? &(fl->objectList) : NULL; };
     
    6157
    6258  private:
     59    /* MAINTENANCE FUNCTIONS THESE ARE !!ONLY FOR BASEOBJECT !! */
     60    static ClassList*                     addToClassList(BaseObject* objectPointer, ClassID classID, unsigned long classIDFull, const std::string& className);
     61    static void                           removeFromClassList(BaseObject* objectPointer);
     62
    6363    static ClassList*                     getClassList(ClassID classID);
    6464    static ClassList*                     getClassList(const std::string& className);
Note: See TracChangeset for help on using the changeset viewer.