SFCGAL  2.3.0
Public Member Functions | Static Public Member Functions | List of all members
SFCGAL::algorithm::Closure Class Reference

Result type for closure check. More...

#include <isClosed.h>

Public Member Functions

 Closure ()
 Default constructor (closed) More...
 
 Closure (bool closed, std::string reason="")
 Constructor with status and reason. More...
 
 operator bool () const
 Check if geometry is closed. More...
 
auto reason () const -> const std::string &
 Get the reason why geometry is not closed. More...
 

Static Public Member Functions

static auto closed () -> Closure
 Create a closed result. More...
 
static auto open (const std::string &reason) -> Closure
 Create an open result with reason. More...
 

Detailed Description

Result type for closure check.

Constructor & Destructor Documentation

SFCGAL::algorithm::Closure::Closure ( )
inline

Default constructor (closed)

SFCGAL::algorithm::Closure::Closure ( bool  closed,
std::string  reason = "" 
)
inline

Constructor with status and reason.

Parameters
closedtrue if the geometry is closed. false otherwise.
reasonA string explaining why the geometry is open. Required only if the Geometry is open.

Member Function Documentation

static auto SFCGAL::algorithm::Closure::closed ( ) -> Closure
inlinestatic

Create a closed result.

Returns
A closed result
static auto SFCGAL::algorithm::Closure::open ( const std::string &  reason) -> Closure
inlinestatic

Create an open result with reason.

Parameters
reasonA string describing why the Geometry is open.
Returns
An open result
SFCGAL::algorithm::Closure::operator bool ( ) const
inline

Check if geometry is closed.

auto SFCGAL::algorithm::Closure::reason ( ) const -> const std::string &
inline

Get the reason why geometry is not closed.

Returns
A string describing why the Geometry is open.