Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 30, 2015, 10:31:43 PM (9 years ago)
Author:
landauf
Message:

using strongly typed enum in various classes in orxonox-library

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/cpp11_v2/src/orxonox/worldentities/pawns/TeamBaseMatchBase.h

    r9667 r11005  
    3636namespace orxonox
    3737{
    38     namespace BaseState
     38    enum class BaseState
    3939    {
    40         enum Value
    41         {
    42             Uncontrolled,
    43             ControlTeam1,
    44             ControlTeam2,
    45         };
    46     }
     40        Uncontrolled,
     41        ControlTeam1,
     42        ControlTeam2,
     43    };
    4744
    4845
     
    5855
    5956            // Set the state of a base to whatever the argument of the function is
    60             void setState(BaseState::Value state)
     57            void setState(BaseState state)
    6158            {
    6259                this->state_ = state;
     
    6663
    6764            // Get the state of a base as a return value
    68             BaseState::Value getState() const
     65            BaseState getState() const
    6966            {
    7067                return this->state_;
     
    7572            void changeTeamColour();
    7673
    77             BaseState::Value state_;
     74            BaseState state_;
    7875    };
    7976}
Note: See TracChangeset for help on using the changeset viewer.