/** * @file printer.cpp * @brief Send drive data to printer service using ipc msg queue * @author Hendrik Schutter * @date 24.11.2022 */ #include "../include/reHDD.h" bool Printer::instanceFlag = false; Printer* Printer::single = NULL; /** * \brief create new Printer instance * \param path to log file * \param struct with data * \return instance of Printer */ Printer::Printer() { } /** * \brief deconstructor * \return void */ Printer::~Printer() { instanceFlag = false; } /** * \brief send data to msg queue * \return void */ void Printer::print(){ } /** * \brief return a instance of the printer * \return printer obj */ Printer* Printer::getPrinter() { if (!instanceFlag) { single = new Printer(); //create new obj instanceFlag = true; return single; } else { return single; //return existing obj } }