Skip to content
GitLab
Menu
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
b462f725
Verified
Commit
b462f725
authored
May 30, 2021
by
Romain De Laage De Bellefaye
🌳
Browse files
Implemented methods for Automate class
parent
ebf6abb7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Automate/Automate.h
View file @
b462f725
...
...
@@ -7,7 +7,10 @@ class Automate {
private:
static
std
::
unique_ptr
<
Automate
>
instance
;
unsigned
int
delai
;
Automate
()
:
delai
(
500
)
{};
Fonction
*
fonction
;
RegleVoisinage
*
regleVoisinage
;
Automate
()
:
delai
(
500
),
fonction
(
nullptr
),
regleVoisinage
(
nullptr
)
{}
~
Automate
()
{
delete
fonction
;
delete
regleVoisinage
;
}
Automate
(
const
Automate
&
a
)
=
delete
;
Automate
&
operator
=
(
const
Automate
&
a
)
=
delete
;
...
...
@@ -19,9 +22,8 @@ class Automate {
return
*
instance
;
}
~
Automate
()
=
default
;
void
setFonction
(
Fonction
&
f
);
void
setRegleVoisinage
(
RegleVoisinage
&
r
);
void
setFonction
(
Fonction
&
f
)
{
delete
fonction
;
fonction
=
new
Fonction
(
f
);
}
void
setRegleVoisinage
(
RegleVoisinage
&
r
)
{
delete
regleVoisinage
;
regleVoisinage
=
new
RegleVoisinage
(
r
);
}
void
setDelai
(
const
unsigned
int
d
)
{
delai
=
d
;
}
};
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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