Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 9, 2010, 9:32:58 PM (14 years ago)
Author:
rgrieder
Message:

Removed excess white space at the end of lines.

Location:
code/branches/presentation3/src/orxonox/interfaces
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentation3/src/orxonox/interfaces/InterfaceCompilation.cc

    r7096 r7127  
    5252        RegisterRootObject(GametypeMessageListener);
    5353    }
    54    
     54
    5555    //----------------------------
    5656    // PickupCarrier
     
    5959    {
    6060        RegisterRootObject(PickupCarrier);
    61        
     61
    6262        this->setCarrierName("PickupCarrier");
    6363    }
    64    
     64
    6565    PickupCarrier::~PickupCarrier()
    6666    {
     
    8585        this->isForPlayer_ = true;
    8686    }
    87    
     87
    8888    //----------------------------
    8989    // RadarListener
  • code/branches/presentation3/src/orxonox/interfaces/PickupCarrier.h

    r7034 r7127  
    6868        friend class Pickupable;
    6969        friend class PickupManager;
    70         //! Friends. 
     70        //! Friends.
    7171        friend class Pickup;
    7272        friend class HealthPickup;
     
    170170            */
    171171            virtual const Vector3& getCarrierPosition(void) = 0;
    172            
     172
    173173            /**
    174174            @brief Get the name of this PickupCarrier.
     
    176176            */
    177177            const std::string& getCarrierName(void) { return this->carrierName_; } // tolua_export
    178            
    179         protected:       
     178
     179        protected:
    180180            /**
    181181            @brief Get all direct children of this PickupSpawner.
     
    198198            std::set<Pickupable*>& getPickups(void)
    199199                { return this->pickups_; }
    200                
     200
    201201            /**
    202202            @brief Set the name of this PickupCarrier.
     
    206206            void setCarrierName(const std::string& name)
    207207                { this->carrierName_ = name; }
    208        
     208
    209209        private:
    210210            std::set<Pickupable*> pickups_; //!< The list of Pickupables carried by this PickupCarrier.
    211211            std::string carrierName_; //!< The name of the PickupCarrier, as displayed in the PickupInventory.
    212            
     212
    213213            /**
    214214            @brief Get the number of carrier children this PickupCarrier has.
     
    222222                    return size;
    223223                }
    224            
     224
    225225            /**
    226226            @brief Get the index-th child of this PickupCarrier.
     
    237237                    return carrier;
    238238                }
    239            
     239
    240240            /**
    241241            @brief Get the number of Pickupables this PickupCarrier carries.
     
    244244            unsigned int getNumPickups(void)
    245245                { return this->pickups_.size(); }
    246            
     246
    247247            /**
    248248            @brief Get the index-th Pickupable of this PickupCarrier.
     
    259259                    return *it;
    260260                }
    261            
     261
    262262    };
    263263}
  • code/branches/presentation3/src/orxonox/interfaces/Pickupable.cc

    r7094 r7127  
    4646namespace orxonox
    4747{
    48    
     48
    4949    /**
    5050    @brief
     
    5252    */
    5353    Pickupable::Pickupable() : pickupIdentifier_(NULL), used_(false), pickedUp_(false)
    54     {       
     54    {
    5555        RegisterRootObject(Pickupable);
    56        
     56
    5757        this->carrier_ = NULL;
    58        
     58
    5959        this->pickupIdentifier_ = new PickupIdentifier(this);
    6060    }
    61    
    62     /**
    63     @brief
    64         Destructor. 
     61
     62    /**
     63    @brief
     64        Destructor.
    6565    */
    6666    Pickupable::~Pickupable()
     
    6868        if(this->isUsed())
    6969            this->setUsed(false);
    70        
     70
    7171        if(this->isPickedUp() && this->getCarrier() != NULL)
    7272        {
     
    7474            this->setCarrier(NULL);
    7575        }
    76        
     76
    7777        if(this->pickupIdentifier_ != NULL)
    7878            this->pickupIdentifier_->destroy();
    7979    }
    80    
     80
    8181    /**
    8282    @brief
     
    9191        if(this->used_ == used)
    9292            return false;
    93        
     93
    9494        COUT(4) << "Pickupable (&" << this << ") set to used " << used << "." << std::endl;
    95        
     95
    9696        this->used_ = used;
    9797        this->changedUsed();
     
    100100        return true;
    101101    }
    102    
     102
    103103    /**
    104104    @brief
     
    115115        return this->isTarget(carrier->getIdentifier());
    116116    }
    117    
     117
    118118    /**
    119119    @brief
     
    134134        return false;
    135135    }
    136        
     136
    137137    /**
    138138    @brief
     
    147147        return this->addTarget(target->getIdentifier());
    148148    }
    149    
     149
    150150    /**
    151151    @brief
     
    160160        if(this->isTarget(target)) //!< If the input target is already present in the list of targets.
    161161            return false;
    162        
     162
    163163        COUT(4) << "Target " << target->getName() << " added to Pickupable (&" << this << ")." << std::endl;
    164164        this->targets_.push_back(target);
    165165        return true;
    166166    }
    167    
    168     /**
    169     @brief 
     167
     168    /**
     169    @brief
    170170        Sets the Pickupable to picked up.
    171171        This method will be called by the PickupCarrier picking the Pickupable up.
     
    179179        if(this->isPickedUp()) //!< If the Pickupable is already picked up.
    180180            return false;
    181        
     181
    182182        COUT(4) << "Pickupable (&" << this << ") got picked up by a PickupCarrier (&" << carrier << ")." << std::endl;
    183183        this->setCarrier(carrier);
     
    185185        return true;
    186186    }
    187    
     187
    188188    /**
    189189    @brief
     
    198198        if(this->pickedUp_ == pickedUp)
    199199            return false;
    200        
     200
    201201        COUT(4) << "Pickupable (&" << this << ") set to pickedUp " << pickedUp << "." << std::endl;
    202        
     202
    203203        this->pickedUp_ = pickedUp;
    204204        this->changedPickedUp();
     
    206206        return true;
    207207    }
    208        
     208
    209209    /**
    210210    @brief
     
    217217        if(this->carrier_ == carrier)
    218218            return false;
    219        
     219
    220220        COUT(4) << "Pickupable (&" << this << ") changed Carrier (& " << carrier << ")." << std::endl;
    221        
     221
    222222        this->carrier_ = carrier;
    223223        this->changedCarrier();
     
    226226        return true;
    227227    }
    228    
    229     /**
    230     @brief 
     228
     229    /**
     230    @brief
    231231        Sets the Pickupable to not picked up or dropped.
    232232        This method will be called by the PickupCarrier dropping the Pickupable.
     
    238238        if(!this->isPickedUp()) //!< If the Pickupable is not picked up.
    239239            return false;
    240        
     240
    241241        COUT(4) << "Pickupable (&" << this << ") got dropped up by a PickupCarrier (&" << this->getCarrier() << ")." << std::endl;
    242242        this->setUsed(false);
    243243        this->setPickedUp(false);
    244        
     244
    245245        bool created = this->createSpawner();
    246        
     246
    247247        this->setCarrier(NULL);
    248        
     248
    249249        if(!created)
    250250        {
    251251            this->destroy();
    252252        }
    253        
    254         return true;
    255     }
    256    
     253
     254        return true;
     255    }
     256
    257257    /**
    258258    @brief
     
    265265        OrxonoxClass* item = NULL;
    266266        this->clone(item);
    267        
     267
    268268        Pickupable* pickup = dynamic_cast<Pickupable*>(item);
    269        
     269
    270270        COUT(4) << "Pickupable (&" << this << ") cloned. Clone is new Pickupable (&" << pickup << ")." << std::endl;
    271271        return pickup;
    272272    }
    273    
     273
    274274    /**
    275275    @brief
     
    299299        return carrier->pickup(this);
    300300    }
    301    
     301
    302302}
  • code/branches/presentation3/src/orxonox/interfaces/Pickupable.h

    r7094 r7127  
    4545namespace orxonox // tolua_export
    4646{ // tolua_export
    47    
     47
    4848    /**
    4949    @brief
     
    5757        protected:
    5858            Pickupable(); //!< Default constructor.
    59        
     59
    6060        public:
    6161            virtual ~Pickupable(); //!< Default destructor.
    62            
     62
    6363            /**
    6464            @brief Get whether the pickup is currently in use or not.
     
    7171            */
    7272            virtual void changedUsed(void) {}
    73            
     73
    7474            /**
    7575            @brief Get the carrier of the pickup.
     
    8383            */
    8484            virtual void changedCarrier(void) {}
    85            
     85
    8686            /**
    8787            @brief Returns whether the Pickupable is currently picked up.
     
    9494            */
    9595            virtual void changedPickedUp(void) {}
    96            
     96
    9797            bool pickedUp(PickupCarrier* carrier); //!< Sets the Pickupable to picked up.
    9898            bool dropped(void); //!< Sets the Pickupable to not picked up or dropped.
    99            
     99
    100100            virtual bool isTarget(PickupCarrier* carrier) const; //!< Get whether the given PickupCarrier is a target of this pickup.
    101101            bool isTarget(const Identifier* identifier) const; //!< Get whether a given class, represented by the input Identifier, is a target of this Pickupable.
    102102            bool addTarget(PickupCarrier* target); //!< Add a PickupCarrier as target of this pickup.
    103103            bool addTarget(Identifier* identifier); //!< Add a class, representetd by the input Identifier, as target of this pickup.
    104            
     104
    105105            Pickupable* clone(void); //!< Creates a duplicate of the Pickupable.
    106106            virtual void clone(OrxonoxClass*& item); //!< Creates a duplicate of the input OrxonoxClass.
    107            
     107
    108108            /**
    109109            @brief Get the PickupIdentifier of this Pickupable.
     
    112112            virtual const PickupIdentifier* getPickupIdentifier(void)
    113113                { return this->pickupIdentifier_; }
    114                
     114
    115115            bool setUsed(bool used); //!< Sets the Pickupable to used or unused, depending on the input.
    116116            bool setPickedUp(bool pickedUp); //!< Helper method to set the Pickupable to either picked up or not picked up.
    117117            bool setCarrier(PickupCarrier* carrier, bool tell = false); //!< Sets the carrier of the pickup.
    118            
     118
    119119        protected:
    120120            /**
     
    122122            */
    123123            void initializeIdentifier(void) {}
    124            
     124
    125125            /**
    126126            @brief Facilitates the creation of a PickupSpawner upon dropping of the Pickupable.
     
    131131            */
    132132            virtual bool createSpawner(void) = 0;
    133            
     133
    134134            PickupIdentifier* pickupIdentifier_; //!< The PickupIdentifier of this Pickupable.
    135            
     135
    136136        private:
    137            
     137
    138138            bool used_; //!< Whether the pickup is currently in use or not.
    139139            bool pickedUp_; //!< Whether the pickup is currently picked up or not.
    140            
     140
    141141            PickupCarrier* carrier_; //!< The carrier of the pickup.
    142142            std::list<Identifier*> targets_; //!< The possible targets of this pickup.
     
    147147
    148148    };  // tolua_export
    149    
     149
    150150    SUPER_FUNCTION(10, Pickupable, changedUsed, false);
    151151    SUPER_FUNCTION(12, Pickupable, changedCarrier, false);
  • code/branches/presentation3/src/orxonox/interfaces/RadarViewable.cc

    r7045 r7127  
    6565    RadarViewable::~RadarViewable()
    6666    {
    67        
     67
    6868        if( this->bInitialized_ )
    6969        {
     
    109109        }
    110110    }
    111    
     111
    112112    void RadarViewable::settingsChanged()
    113113    {
  • code/branches/presentation3/src/orxonox/interfaces/RadarViewable.h

    r7045 r7127  
    8888
    8989        inline void setRadarVisibility(bool b)
    90             { 
     90            {
    9191                if(b!=this->bVisibility_)
    9292                {
Note: See TracChangeset for help on using the changeset viewer.