Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 30, 2015, 3:17:35 PM (9 years ago)
Author:
landauf
Message:

using strongly typed enum classes for RadarViewable::Shape

Location:
code/branches/cpp11_v2/src/orxonox
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • code/branches/cpp11_v2/src/orxonox/Radar.cc

    r10920 r11000  
    5555        // TODO: make this mapping configurable. Maybe there's a possibility with self configured
    5656        //       configValues..
    57         this->objectTypes_["Asteroid"] = RadarViewable::Dot;
    58         this->objectTypes_["SpaceShip"] = RadarViewable::Square;
    59         this->objectTypes_["AsdfQwerty"] = RadarViewable::Triangle;
     57        this->objectTypes_["Asteroid"] = RadarViewable::Shape::Dot;
     58        this->objectTypes_["SpaceShip"] = RadarViewable::Shape::Square;
     59        this->objectTypes_["AsdfQwerty"] = RadarViewable::Shape::Triangle;
    6060
    6161        /*WorldEntity* object;
     
    113113        std::map<std::string, RadarViewable::Shape>::iterator it = this->objectTypes_.find(name);
    114114        if (it == this->objectTypes_.end())
    115             return this->objectTypes_[name] = RadarViewable::Square; // default, configure!!
     115            return this->objectTypes_[name] = RadarViewable::Shape::Square; // default, configure!!
    116116        else
    117117            return this->objectTypes_[name];
  • code/branches/cpp11_v2/src/orxonox/interfaces/RadarViewable.cc

    r10624 r11000  
    4949        , wePtr_(wePtr)
    5050        , radarObjectCamouflage_(0.0f)
    51         , radarObjectShape_(Dot)
     51        , radarObjectShape_(Shape::Dot)
    5252        , radarObjectDescription_("staticObject")
    5353        , scale_(1.0f)
  • code/branches/cpp11_v2/src/orxonox/interfaces/RadarViewable.h

    r10768 r11000  
    4949    {
    5050    public:
    51         enum Shape
     51        enum class Shape
    5252        {
    5353            Square,
  • code/branches/cpp11_v2/src/orxonox/worldentities/pawns/Pawn.cc

    r10919 r11000  
    9494
    9595        this->setRadarObjectColour(ColourValue::Red);
    96         this->setRadarObjectShape(RadarViewable::Dot);
     96        this->setRadarObjectShape(RadarViewable::Shape::Dot);
    9797
    9898        this->registerVariables();
  • code/branches/cpp11_v2/src/orxonox/worldentities/pawns/TeamBaseMatchBase.cc

    r10919 r11000  
    5151        }
    5252
    53         this->setRadarObjectShape(RadarViewable::Triangle);
     53        this->setRadarObjectShape(RadarViewable::Shape::Triangle);
    5454    }
    5555
Note: See TracChangeset for help on using the changeset viewer.