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
LO21_Pin_Noir_Boucher_Bouri_Detree
CellulutLO21
Commits
84b33a25
Unverified
Commit
84b33a25
authored
May 11, 2021
by
Merwane Bouri
Browse files
Ajout de NeighborhoodException
parent
b96b5fc7
Pipeline
#77805
passed with stages
in 17 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
include/neighborhood.hpp
View file @
84b33a25
...
...
@@ -14,11 +14,22 @@ Cette classe représente le voisinage d'une cellule.
#include
<vector>
#include
<utility>
#include
<string>
#include
"coord.hpp"
using
namespace
std
;
class
NeighborhoodException
:
public
std
::
exception
{
std
::
string
_msg
;
public:
NeighborhoodException
(
const
std
::
string
&
msg
)
:
_msg
(
msg
){}
virtual
const
char
*
what
()
const
noexcept
override
{
return
_msg
.
c_str
();
}
};
class
Neighborhood
{
//! \brief Vecteur de voisins contenant la position relative et l'état du voisin
...
...
src/neighborhood.cpp
View file @
84b33a25
...
...
@@ -23,7 +23,7 @@ unsigned Neighborhood::getAt(Coord c) const
}
}
throw
"Error Neighborhood::getAt"
;
throw
NeighborhoodException
(
"Error Neighborhood::getAt"
)
;
//return ERROR;
}
...
...
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