refactored everything
This commit is contained in:
47
FlippR-Driver/src/output/OutputItem.h
Normal file
47
FlippR-Driver/src/output/OutputItem.h
Normal file
@@ -0,0 +1,47 @@
|
||||
/*
|
||||
* CabinetItem.h
|
||||
*
|
||||
* Created on: Aug 2, 2018
|
||||
* Author: rhetenor
|
||||
*/
|
||||
|
||||
#ifndef _SRC_OUTPUT_CABINETITEM_H_
|
||||
#define _SRC_OUTPUT_CABINETITEM_H_
|
||||
|
||||
#include "ICabinetItem.h"
|
||||
|
||||
#include "ActivationStrategy.h"
|
||||
#include "utility/IOutputGPIOInterface.h"
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
namespace flippR_driver
|
||||
{
|
||||
namespace output
|
||||
{
|
||||
|
||||
class OutputItem : public ICabinetItem
|
||||
{
|
||||
public:
|
||||
OutputItem(std::shared_ptr<utility::IOutputGPIOInterface> output_gpio_interface, int address, std::string name);
|
||||
virtual ~OutputItem();
|
||||
|
||||
virtual bool isActivated();
|
||||
virtual bool activate();
|
||||
virtual bool deactivate();
|
||||
|
||||
protected:
|
||||
int address;
|
||||
std::string name;
|
||||
|
||||
bool activated;
|
||||
|
||||
strategy::ActivationStrategy* strategy;
|
||||
|
||||
std::shared_ptr<utility::IOutputGPIOInterface> output_gpio_interface;
|
||||
};
|
||||
|
||||
} /* namespace output */
|
||||
}
|
||||
#endif
|
||||
Reference in New Issue
Block a user