mirror of
https://github.com/Show-maket/IR-protocol.git
synced 2025-06-27 20:59:37 +00:00
no default construct
This commit is contained in:
@ -1,19 +1,22 @@
|
||||
#include "IR_Decoder.h"
|
||||
|
||||
std::list<IR_Decoder*>& IR_Decoder::get_dec_list() // определение функции
|
||||
std::list<IR_Decoder *> &IR_Decoder::get_dec_list() // определение функции
|
||||
{
|
||||
static std::list<IR_Decoder*> dec_list; // статическая локальная переменная
|
||||
return dec_list; // возвращается ссылка на переменную
|
||||
static std::list<IR_Decoder *> dec_list; // статическая локальная переменная
|
||||
return dec_list; // возвращается ссылка на переменную
|
||||
}
|
||||
|
||||
IR_Decoder::IR_Decoder(){};
|
||||
// IR_Decoder::IR_Decoder() {};
|
||||
IR_Decoder::IR_Decoder(const uint8_t pin, uint16_t addr, IR_Encoder *encPair)
|
||||
: IR_DecoderRaw(pin, addr, encPair)
|
||||
{
|
||||
get_dec_list().push_back(this);
|
||||
};
|
||||
|
||||
void IR_Decoder::operator()() { isr(); }
|
||||
std::function<void()> IR_Decoder::operator()()
|
||||
{
|
||||
return std::bind(&IR_Decoder::isr, this);
|
||||
}
|
||||
|
||||
IR_Decoder::~IR_Decoder()
|
||||
{
|
||||
|
Reference in New Issue
Block a user