Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Sep 7, 2010, 11:24:47 PM (14 years ago)
Author:
landauf
Message:

added documentation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/doc/src/libraries/core/OrxonoxClass.h

    r7372 r7373  
    6363
    6464        The BaseObject and Interfaces are derived with @c virtual @c public @c OrxonoxClass from OrxonoxClass.
    65         OrxonoxClass is needed to create the class-hierarchy at startup and to store the Identifier and the MetaObjectList.
     65        OrxonoxClass is needed to create the class-hierarchy at startup and to store the Identifier and the
     66        MetaObjectList, as well as to provide an interface for SmartPtr and WeakPtr.
    6667    */
    6768    class _CoreExport OrxonoxClass
     
    9697            bool isDirectParentOf(const Identifier* identifier);
    9798
     99            /// Returns true if the object's class is of the given type or a derivative.
    98100            template <class B> inline bool isA(const SubclassIdentifier<B>* identifier)
    99101                { return this->isA(*identifier); }
     102            /// Returns true if the object's class is exactly of the given type.
    100103            template <class B> inline bool isExactlyA(const SubclassIdentifier<B>* identifier)
    101104                { return this->isExactlyA(*identifier); }
     105            /// Returns true if the object's class is a child of the given type.
    102106            template <class B> inline bool isChildOf(const SubclassIdentifier<B>* identifier)
    103107                { return this->isChildOf(*identifier); }
     108            /// Returns true if the object's class is a direct child of the given type.
    104109            template <class B> inline bool isDirectChildOf(const SubclassIdentifier<B>* identifier)
    105110                { return this->isDirectChildOf(*identifier); }
     111            /// Returns true if the object's class is a parent of the given type.
    106112            template <class B> inline bool isParentOf(const SubclassIdentifier<B>* identifier)
    107113                { return this->isParentOf(*identifier); }
     114            /// Returns true if the object's class is a direct parent of the given type.
    108115            template <class B> inline bool isDirectParentOf(const SubclassIdentifier<B>* identifier)
    109116                { return this->isDirectParentOf(*identifier); }
     
    118125            virtual void clone(OrxonoxClass*& item) {}
    119126
     127            /// Returns the number of @ref orxonox::SmartPtr "smart pointers" that point to this object.
    120128            inline unsigned int getReferenceCount() const
    121129                { return this->referenceCount_; }
     
    146154
    147155        protected:
     156            /// This virtual function is called if destroy() is called and no SmartPtr points to this object. Used in some cases to create a new SmartPtr to prevent destruction.
    148157            virtual void preDestroy() {}
    149158
     
    169178                { this->weakPointers_.erase(reinterpret_cast<WeakPtr<OrxonoxClass>*>(pointer)); }
    170179
    171             Identifier* identifier_;                   //!< The Identifier of the object
    172             std::set<const Identifier*>* parents_;     //!< List of all parents of the object
    173             MetaObjectList* metaList_;                 //!< MetaObjectList, containing all ObjectLists and ObjectListElements the object is registered in
    174             int referenceCount_;                       //!< Counts the references from smart pointers to this object
    175             bool requestedDestruction_;                //!< Becomes true after someone called delete on this object
    176             std::set<WeakPtr<OrxonoxClass>*> weakPointers_; //!< All weak pointers which point to this object (and like to get notified if it dies)
     180            Identifier* identifier_;                            //!< The Identifier of the object
     181            std::set<const Identifier*>* parents_;              //!< List of all parents of the object
     182            MetaObjectList* metaList_;                          //!< MetaObjectList, containing all ObjectLists and ObjectListElements the object is registered in
     183            int referenceCount_;                                //!< Counts the references from smart pointers to this object
     184            bool requestedDestruction_;                         //!< Becomes true after someone called delete on this object
     185            std::set<WeakPtr<OrxonoxClass>*> weakPointers_;     //!< All weak pointers which point to this object (and like to get notified if it dies)
    177186
    178187            /// 'Fast map' that holds this-pointers of all derived types
Note: See TracChangeset for help on using the changeset viewer.