no default construct

This commit is contained in:
2024-08-29 14:14:46 +03:00
parent 784365181e
commit 2f4ac3ddf8
6 changed files with 188 additions and 13 deletions

View File

@ -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()
{