Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6856 for code/trunk


Ignore:
Timestamp:
May 4, 2010, 10:16:10 PM (15 years ago)
Author:
dafrick
Message:

Documented and simplified MultiTriggerContainer.

Location:
code/trunk/src/modules/objects
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/modules/objects/eventsystem/EventListener.cc

    r6800 r6856  
    6262        }
    6363       
    64         COUT(4) << "EventListener: Processing event: originator: " << event.originator_->getIdentifier()->getName() << " (&" << event.originator_ << ")" << ", activate: " << event.activate_ << ", name: " << event.name_ << std::endl;
     64        COUT(4) << "EventListener, processing event: originator: " << event.originator_->getIdentifier()->getName() << " (&" << event.originator_ << ")" << ", activate: " << event.activate_ << ", name: " << event.name_ << std::endl;
    6565
    6666        this->bActive_ = true;
     67        //TODO: Why not this->fireEvent(event)?
    6768        this->fireEvent(event.activate_, event.originator_, event.name_);
    6869        this->bActive_ = false;
  • code/trunk/src/modules/objects/triggers/MultiTriggerContainer.cc

    r6800 r6856  
    2727*/
    2828
     29/**
     30    @file MultiTriggerContainer.cc
     31    @brief Implementation of the MultiTriggerContainer class.
     32*/
     33
    2934#include "MultiTriggerContainer.h"
    3035
     
    3338namespace orxonox
    3439{
    35 
    36     CreateFactory(MultiTriggerContainer);
    3740   
     41    /**
     42    @brief
     43        Default constructor. Registers the object and creates an empty container.
     44    @param creator
     45        The creator.
     46    */
    3847    MultiTriggerContainer::MultiTriggerContainer(BaseObject* creator) : BaseObject(creator), originator_(NULL), data_(NULL)
    3948    {
    4049        RegisterObject(MultiTriggerContainer);
    41        
    4250    }
    43    
     51
     52    /**
     53    @brief
     54        Constructor. Registers the object and sets the input values.
     55    @param creator
     56        The creator.
     57    @param originator
     58        A pointer to the originator of the Event, i.e. the MultiTrigger that fired the Event. (or is about to)
     59    @param data
     60        A pointer to the data that should be sent with the container.
     61    */
    4462    MultiTriggerContainer::MultiTriggerContainer(BaseObject* creator, MultiTrigger* originator, BaseObject* data) : BaseObject(creator), originator_(originator), data_(data)
    4563    {
    4664        RegisterObject(MultiTriggerContainer);
    47        
    4865    }
    49    
     66
     67    /**
     68    @brief
     69        Destructor.
     70    */
    5071    MultiTriggerContainer::~MultiTriggerContainer()
    5172    {
  • code/trunk/src/modules/objects/triggers/MultiTriggerContainer.h

    r6800 r6856  
    2121 *
    2222 *   Author:
    23  *      ...
     23 *      Damian 'Mozork' Frick
    2424 *   Co-authors:
    2525 *      ...
    2626 *
     27*/
     28
     29/**
     30    @file MultiTriggerContainer.h
     31    @brief Definition of the MultiTriggerContainer class.
    2732*/
    2833
     
    3742{
    3843
     44    /**
     45    @brief
     46        This class is used by the MultiTrigger class to transport additional data via Events.
     47    @author
     48        Damian 'Mozork' Frick
     49    */
    3950    class _ObjectsExport MultiTriggerContainer : public BaseObject
    4051    {
     52       
    4153        public:
    42            
    43             MultiTriggerContainer(BaseObject* creator);
    44             MultiTriggerContainer(BaseObject* creator, MultiTrigger* originator, BaseObject* data);
    45             ~MultiTriggerContainer();
    46            
     54            MultiTriggerContainer(BaseObject* creator); //!< Default constructor. Registers the object and creates an empty container.
     55            MultiTriggerContainer(BaseObject* creator, MultiTrigger* originator, BaseObject* data); //!< Constructor. Registers the object and sets the input values.
     56            ~MultiTriggerContainer(); //!< Destructor.
     57
     58            /**
     59            @brief Get the originator of the Event. (The MultiTrigger that fired the Event)
     60            @return Returns a pointer to the originator.
     61            */
    4762            inline MultiTrigger* getOriginator(void)
    4863                { return this->originator_; }
     64            /**
     65            @brief Get the data of this container.
     66            @return Returns a pointer ot the data.
     67            */
    4968            inline BaseObject* getData(void)
    5069                { return this->data_; }
    5170           
    5271        private:
    53             MultiTrigger* originator_;
    54             BaseObject* data_;
     72            MultiTrigger* originator_; //!< The originator.
     73            BaseObject* data_; //!< The data.
    5574    };
    5675   
Note: See TracChangeset for help on using the changeset viewer.