Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

Removed excess white space at the end of lines.

Location:
code/branches/presentation3/src/orxonox/pickup
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentation3/src/orxonox/pickup/PickupIdentifier.cc

    r6725 r7127  
    3939namespace orxonox
    4040{
    41    
     41
    4242    /**
    4343    @brief
     
    4747    {
    4848        RegisterRootObject(PickupIdentifier);
    49        
     49
    5050        if(pickup == NULL)
    5151            COUT(1) << "Error, PickupIdentifier was created without a valid Pickupable." << std::endl;
    52        
     52
    5353        this->pickup_ = pickup;
    5454    }
    55    
     55
    5656    PickupIdentifier::~PickupIdentifier()
    5757    {
    5858
    5959    }
    60    
     60
    6161    /**
    6262    @brief
     
    7474            COUT(1) << "Error in PickupIdentifier::compare: Input Identifier is NULL." << std::endl;
    7575        }
    76        
     76
    7777        if(identifier->pickup_ == NULL && this->pickup_ == NULL)
    7878        {
     
    8080            COUT(1) << "Error in PickupIdentifier::compare: Pickup stored by Identifier is NULL." << std::endl;
    8181        }
    82        
     82
    8383        if(identifier->pickup_ == NULL)
    8484        {
     
    8686            COUT(1) << "Error in PickupIdentifier::compare: Pickup stored by Identifier is NULL." << std::endl;
    8787        }
    88        
     88
    8989        if(this->pickup_ == NULL)
    9090        {
     
    9292            COUT(1) << "Error in PickupIdentifier::compare: Pickup stored by Identifier is NULL." << std::endl;
    9393        }
    94        
     94
    9595        //! If the classIdentifiers are not the same (meaning the PickupIdentifiers identify different classes), the obviously the two Pickupables identified by the PickupIdentifiers cannot be the same. An ordering is established through the alphabetical ordering of the respective classnames.
    9696        if(!identifier->pickup_->getIdentifier()->isExactlyA(this->pickup_->getIdentifier()))
    9797            return this->pickup_->getIdentifier()->getName().compare(identifier->pickup_->getIdentifier()->getName());
    98        
     98
    9999        //! If the class is the same for both PickupIdentifiers we go on to check the parameters of the class.
    100100        //! If the two have a different number of parameters then obviusly something is very wrong.
     
    104104            return this->parameters_.size()-identifier->parameters_.size();
    105105        }
    106        
     106
    107107        //! We iterate through all parameters and compar their values (which are strings). The first parameter is the most significant. The ordering is once again established by the alphabetical comparison of the two value strings.
    108108        for(std::map<std::string, std::string>::const_iterator it = this->parameters_.begin(); it != this->parameters_.end(); it++)
     
    117117                return it->second.compare(identifier->parameters_.find(it->first)->second);
    118118        }
    119            
     119
    120120        return 0;
    121121    }
    122    
     122
    123123    /**
    124124    @brief
     
    134134    {
    135135        COUT(4) << "PickupIdentifier " << name << ", " << value << std::endl;
    136        
     136
    137137        if(!(this->parameters_.find(name) == this->parameters_.end()))
    138138        {
     
    140140            return false;
    141141        }
    142        
     142
    143143        this->parameters_[name] = value;
    144        
     144
    145145        return true;
    146146    }
    147    
     147
    148148}
  • code/branches/presentation3/src/orxonox/pickup/PickupIdentifier.h

    r6540 r7127  
    4141#include "core/Identifier.h"
    4242
    43 #include "core/OrxonoxClass.h" 
     43#include "core/OrxonoxClass.h"
    4444
    4545namespace orxonox
    4646{
    47    
     47
    4848    /**
    4949    @brief
     
    5757    class _OrxonoxExport PickupIdentifier : virtual public OrxonoxClass
    5858    {
    59        
     59
    6060        public:
    6161            PickupIdentifier(Pickupable* pickup); //!< Constructor.
    6262            ~PickupIdentifier(); //!< Destructor.
    63            
     63
    6464            virtual int compare(const PickupIdentifier* identifier) const; //!< Compares two PickupIdentifiers and returns 0 if a == b, <0 if a < b and >0 if a > b for a.compare(b).
    65            
     65
    6666            bool addParameter(std::string & name, std::string & value); //!< Add a parameter to the PickupIdentifier.
    67            
     67
    6868        private:
    6969            Pickupable* pickup_; //!< The Pickupable the PickupIdentififer is for.
    7070            std::map<std::string, std::string> parameters_; //!< The parameters identifying the type of the pickup beyond the class.
    71            
     71
    7272    };
    73    
     73
    7474    /**
    7575    @brief
     
    8181            { return lhs->compare(rhs) < 0; }
    8282    };
    83    
     83
    8484}
    8585
Note: See TracChangeset for help on using the changeset viewer.