SFCGAL  2.3.0
Public Member Functions | Static Public Member Functions | List of all members
SFCGAL::Simplicity Struct Reference

the class, convertible to bool, that stores the reason why a geom is not simple More...

#include <Simplicity.h>

Public Member Functions

 operator bool () const
 Convert to boolean indicating if geometry is simple. More...
 
const std::string & reason () const
 Get the reason why geometry is complex. More...
 

Static Public Member Functions

static const Simplicity simple ()
 Create a simple (valid) geometry state. More...
 
static const Simplicity complex (const std::string &reason)
 Create a complex (invalid) geometry state with reason. More...
 

Detailed Description

the class, convertible to bool, that stores the reason why a geom is not simple

Member Function Documentation

static const Simplicity SFCGAL::Simplicity::complex ( const std::string &  reason)
inlinestatic

Create a complex (invalid) geometry state with reason.

Parameters
reasonThe reason why the geometry is complex
Returns
Simplicity object representing complex geometry
SFCGAL::Simplicity::operator bool ( ) const
inline

Convert to boolean indicating if geometry is simple.

Returns
true if simple, false if complex
const std::string& SFCGAL::Simplicity::reason ( ) const
inline

Get the reason why geometry is complex.

Returns
The reason string (empty if simple)
static const Simplicity SFCGAL::Simplicity::simple ( )
inlinestatic

Create a simple (valid) geometry state.

Note
the class has private ctor to force the use of functions valid() and invalid(reason) that are clearer in the code than to remember that "Valid constructed with a reason is invalid"
Returns
Simplicity object representing simple geometry