Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Mar 16, 2010, 6:15:45 PM (14 years ago)
Author:
dafrick
Message:

Done some (almost final) documenting in pickup module.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/modules/pickup/PickupCollection.h

    r6533 r6538  
    2727 */
    2828
     29/**
     30    @file PickupCollection.h
     31    @brief Declaration of PickupCollection.
     32*/
     33
    2934#ifndef _PickupCollection_H__
    3035#define _PickupCollection_H__
     
    3439#include "interfaces/Pickupable.h"
    3540#include "core/BaseObject.h"
    36 #include "core/XMLPort.h"
    3741
    3842#include <list>
     
    5256        public:
    5357           
    54             PickupCollection(BaseObject* creator);
    55             virtual ~PickupCollection();
     58            PickupCollection(BaseObject* creator); //!< Default Constructor.
     59            virtual ~PickupCollection(); //!< Destructor.
    5660           
    57             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
     61            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); //!< Creates an instance of this Class through XML.
    5862
    59             virtual void changedUsed(void);
    60             virtual void changedCarrier(void);
    61             virtual void changedPickedUp(void);
     63            virtual void changedUsed(void); //!< Is called when the pickup has transited from used to unused or the other way around.
     64            virtual void changedCarrier(void); //!< Is called when the pickup has changed its PickupCarrier.
     65            virtual void changedPickedUp(void); //!< Is called when the pickup has transited from picked up to dropped or the other way around.
    6266           
    63             virtual void clone(OrxonoxClass*& item);
     67            virtual void clone(OrxonoxClass*& item); //!< Creates a duplicate of the input OrxonoxClass.
    6468           
    65             virtual bool isTarget(Identifier* identifier) const;
     69            virtual bool isTarget(Identifier* identifier) const; //!< Get whether a given class, represented by the input Identifier, is a target of this PickupCollection.
    6670           
    67             virtual const PickupIdentifier* getPickupIdentifier(void);
     71            virtual const PickupIdentifier* getPickupIdentifier(void); //!< Get the PickupIdentifier of this PickupCollection.
    6872           
    69             bool addPickupable(Pickupable* pickup);
    70             const Pickupable* getPickupable(unsigned int index);
     73            bool addPickupable(Pickupable* pickup); //!< Add the input Pickupable to list of Pickupables combined by this PickupCollection.
     74            const Pickupable* getPickupable(unsigned int index); //!< Get the Pickupable at the given index.
    7175           
    7276        protected:
    73             void initializeIdentifier(void);
     77            void initializeIdentifier(void); //!< Initializes the PickupIdentifier for this pickup.
    7478           
    7579            virtual bool createSpawner(const Vector3& position); //!< Facilitates the creation of a PickupSpawner upon dropping of the Pickupable.
    7680           
    77             PickupCollectionIdentifier* pickupCollectionIdentifier_;
     81            PickupCollectionIdentifier* pickupCollectionIdentifier_; //!< The PickupCollectionIdentifier of this PickupCollection. Is used to distinguish different PickupCollections amongst themselves.
    7882           
    7983        private:
    8084           
    81             std::vector<WeakPtr<Pickupable> > pickups_;
     85            std::vector<WeakPtr<Pickupable> > pickups_; //!< The list of the pointers of all the Pickupables this PickupCollection consists of. They are weak pointers to facilitate testing, whether the pointers are still valid.
    8286       
    8387    };
Note: See TracChangeset for help on using the changeset viewer.