Verified Commit 42509f29 authored by Romain De Laage De Bellefaye's avatar Romain De Laage De Bellefaye 🌳
Browse files

Begin singleton for Automate

parent 9e5a664a
#include "Automate.h"
std::unique_ptr<Automate> Automate::instance = nullptr;
#ifndef _AUTOMATE_H
#define _AUTOMATE_H
#include <memory>
class Automate {
static std::unique_ptr<Automate> instance;
Automate() = default;
Automate(const Automate& a) = delete;
Automate& operator=(const Automate& a) = delete;
static Automate& getInstance() {
if(instance == nullptr) {
instance.reset(new Automate);
return *instance;
~Automate() = default;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment