|commit 6a76062ba692f284cdca8b4504fbf5000c942c39 |Author: Laurent Rineau <Laurent.Rineau__CGAL@normalesup.org> |Date: Wed Aug 29 10:15:10 2012 +0000 | | Add a way to specify a maximal number of vertices. That aborts the meshing. | |Notes: | r71799 branches/features/Mesh_3-experimental-GF | commit 9d501d0bef44cf0e3419299947c1b7ccfd0e87d8 | Author: Laurent Rineau <Laurent.Rineau__CGAL@normalesup.org> | Date: Wed Aug 29 16:14:13 2012 +0000 | | A pointer to a CGAL::Mesh_error_code (an enum) can be passed to Mesh_3 | | Notes: | r71818 branches/features/Mesh_3-experimental-GF
49 lines
1.3 KiB
C++
49 lines
1.3 KiB
C++
// Copyright (c) 2012 GeometryFactory Sarl (France).
|
|
// All rights reserved.
|
|
//
|
|
// This file is part of CGAL (www.cgal.org).
|
|
// You can redistribute it and/or modify it under the terms of the GNU
|
|
// General Public License as published by the Free Software Foundation,
|
|
// either version 3 of the License, or (at your option) any later version.
|
|
//
|
|
// Licensees holding a valid commercial license may use this file in
|
|
// accordance with the commercial license agreement provided with the software.
|
|
//
|
|
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
|
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
|
//
|
|
// $URL$
|
|
// $Id$
|
|
|
|
#ifndef CGAL_MESH_ERROR_CODE_H
|
|
#define CGAL_MESH_ERROR_CODE_H
|
|
|
|
#include <string>
|
|
#include <sstream>
|
|
|
|
namespace CGAL {
|
|
|
|
enum Mesh_error_code {
|
|
NO_ERROR = 0,
|
|
MAXIMAL_NUMBER_OF_VERTICES_REACHED
|
|
};
|
|
|
|
std::string mesh_error_string(const Mesh_error_code& error_code) {
|
|
switch(error_code) {
|
|
case NO_ERROR:
|
|
return "no error";
|
|
case MAXIMAL_NUMBER_OF_VERTICES_REACHED:
|
|
return "the maximal number of vertices has been reached";
|
|
default:
|
|
std::stringstream str("");
|
|
str << "unknown error (error_code="
|
|
<< error_code
|
|
<< ")";
|
|
return str.str();
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
#endif // CGAL_MESH_ERROR_CODE_H
|