/** * @file Component.h * @author sriram * * */ #ifndef CANADIANEXPERIENCE_MACHINELIB_COMPONENT_H #define CANADIANEXPERIENCE_MACHINELIB_COMPONENT_H class Machine; /** *class that defines a component that machine consist of */ class Component { private: ///position of component wxPoint mPosition=wxPoint(0,0); ///time double mTime=0; ///machine Machine* mMachine= nullptr; public: Component(); /// Copy constructor (disabled) Component(const Component &) = delete; /// Assignment operator void operator=(const Component &) = delete; /** * draw function * @param graphics * @param x * @param y */ virtual void Draw(std::shared_ptr graphics,double x, double y){} /** * setter for time * @param time */ virtual void SetTime(double time){mTime = time;} /** * setter for position * @param x * @param y */ virtual void SetPosition(double x, double y){mPosition=wxPoint(x,y);} /** * getter for position * @return */ virtual wxPoint GetPosition(){return mPosition;} /** * setter for machine * @param machine */ virtual void SetMachine(Machine* machine){mMachine=machine;} /** * getter for machine * @return */ virtual Machine* GetMachine(){return mMachine;} /** * getter for location * @return */ virtual wxPoint GetComponentLocation(){return mPosition;} /** * send pressure across components * @param pressure */ virtual void SendPressure(double pressure){} /** * getter for rotation * @return */ virtual double GetRotation() {return 0;} }; #endif //CANADIANEXPERIENCE_MACHINELIB_COMPONENT_H