Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 12, 2011, 1:17:38 PM (13 years ago)
Author:
anbueche
Message:

comments added

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/portals/src/modules/portals/PortalEndPoint.h

    r8290 r8454  
    2121            virtual ~PortalEndPoint();
    2222            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
    23             inline void setTargets(const std::string & targets)
     23            inline void setTargets(const std::string & targets)                 //!< set types which are allowed to activate the PortalEndPoint
    2424            {
    2525                this->trigger_->addTargets(targets);
     
    2727           
    2828            void XMLEventPort(Element& xmlelement, XMLPort::Mode mode);
    29             static std::map<unsigned int, PortalEndPoint *> idMap_s; //!< maps integer id values to portalendpoints
     29            static std::map<unsigned int, PortalEndPoint *> idMap_s; //!< Maps the id of each PortalEndPoint to a pointer to that PortalEndPoint
    3030            inline void setID(unsigned int id)
    3131            {
     
    3737                return this->id_;
    3838            }
     39           
     40            /// \brief Set templateName_ (the name of the design Template) and add that Template to this Object
    3941            inline void setTemplate(const std::string & name)
    4042            {
     
    4244                this->addTemplate(name);
    4345            }
     46
     47            /// \brief Get the name of the attached design template
    4448            inline const std::string & getTemplate()
    4549            {
    4650                return this->templateName_;
    4751            }
     52
     53            /*! \brief This function is called each time the DistanceMultiTrigger of this PortalEndPoint changed
     54             * \param bTriggered true if the trigger was triggered on, false if the trigger has switched to off
     55             * \param trigger the MultiTriggerContainer containing the triggering BaseObject (and trigger_ the portal's MultiDistanceTrigger which we already know)
     56             *
     57             * if bTriggered is \c true the triggering entity enters this portal (if it is an entrance)
     58             * otherwise the triggering entity is removed from the set of entities who recently jumped out of this portal */
    4859            bool execute(bool bTriggered, BaseObject* trigger);
     60
     61            /*! \brief Let an Entity jump out of this portal no matter where it was before
     62             * \param entity The Entity which should jump out of this portal */
    4963            void jumpOut(MobileEntity * entity);
    5064        protected:
    5165           
    5266        private:
    53             static const std::string EVENTFUNCTIONNAME;
     67            static const std::string EVENTFUNCTIONNAME; //!< = "execute"
    5468           
    55             unsigned int id_;
    56             DistanceMultiTrigger * trigger_;
    57             std::string templateName_;
     69            unsigned int id_;            //!< the hopefully (depends on the writer of the levelfile) unique id, which is used to establish links between PortalEndPoints
     70            DistanceMultiTrigger * trigger_;      //!< the DistanceMultiTrigger which notices near entities of the defined type
     71            std::string templateName_;            //!< The name of the design template used for this endpoint
    5872
    5973            std::set<MobileEntity *> recentlyJumpedOut_; //!< Entities which recently jumped out of this EndPoint, hence they shouldn't be pulled in again if the endpoint is the beginning of a link
Note: See TracChangeset for help on using the changeset viewer.