Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Romain De Laage De Bellefaye
LO21-projet
Commits
42509f29
Verified
Commit
42509f29
authored
May 26, 2021
by
Romain De Laage De Bellefaye
🌳
Browse files
Begin singleton for Automate
parent
9e5a664a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Automate/Automate.cpp
0 → 100644
View file @
42509f29
#include
"Automate.h"
std
::
unique_ptr
<
Automate
>
Automate
::
instance
=
nullptr
;
Automate/Automate.h
0 → 100644
View file @
42509f29
#ifndef _AUTOMATE_H
#define _AUTOMATE_H
#include
<memory>
class
Automate
{
private:
static
std
::
unique_ptr
<
Automate
>
instance
;
Automate
()
=
default
;
Automate
(
const
Automate
&
a
)
=
delete
;
Automate
&
operator
=
(
const
Automate
&
a
)
=
delete
;
public:
static
Automate
&
getInstance
()
{
if
(
instance
==
nullptr
)
{
instance
.
reset
(
new
Automate
);
}
return
*
instance
;
}
~
Automate
()
=
default
;
};
#endif
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment