#pragma once namespace Passer { namespace RoboidControl { /// @brief A thing is a functional component on a robot class Thing { public: /// @brief Default constructor for a Thing Thing(); /// @brief The type of Thing unsigned int type; static const unsigned int SwitchType; static const unsigned int DistanceSensorType; static const unsigned int ControlledMotorType; static const unsigned int UncontrolledMotorType; static const unsigned int ExternalType; /// @brief Check if the Thing is a Motor /// @returns True when the Thing is a Motor and False otherwise bool IsMotor(); /// @brief Check if the Thing is a Sensor /// @returns True when the Thing is a Sensor and False otherwise bool IsSensor(); protected: /// @brief Bitmask for Motor type static const unsigned int MotorType = 0x8000; /// @brief Bitmap for Sensor type static const unsigned int SensorType = 0x4000; /// @brief Basic Thing types enum class Type { Undetermined, // Sensor, Switch, DistanceSensor, // Motor, ControlledMotor, UncontrolledMotor, // Other ExternalSensor, }; }; } // namespace RoboidControl } // namespace Passer using namespace Passer::RoboidControl;