Program Listing for File waveform_generator.hpp
↰ Return to documentation for file (rcppsw/control/waveform_generator.hpp
)
#pragma once
/*******************************************************************************
* Includes
******************************************************************************/
#include <memory>
#include <string>
#include "rcppsw/patterns/factory/factory.hpp"
#include "rcppsw/control/config/waveform_config.hpp"
/*******************************************************************************
* Namespaces/Decls
******************************************************************************/
namespace rcppsw::control {
class base_waveform;
/*******************************************************************************
* Classes
******************************************************************************/
class waveform_generator
: public patterns::factory::releasing_factory<base_waveform,
std::string,
const config::waveform_config*> {
public:
static inline const std::string kSine = "sine";
static inline const std::string kSquare = "square";
static inline const std::string kSawtooth = "sawtooth";
static inline const std::string kConstant = "constant";
static inline const std::string kNone = rconfig::constants::kNoValue;
waveform_generator(void);
std::unique_ptr<base_waveform>
operator()(const std::string& name, const config::waveform_config* config);
};
} /* namespace rcppsw::control */