Public Member Functions | Public Attributes | List of all members
openfluid::landr::PolygonEdge Class Reference

A part of a PolygonEntity exterior ring, that may be share between to adjacent PolygonEntity. More...

#include <landr/PolygonEdge.hpp>

Inheritance diagram for openfluid::landr::PolygonEdge:
Inheritance graph
[legend]
Collaboration diagram for openfluid::landr::PolygonEdge:
Collaboration graph
[legend]

Public Member Functions

 PolygonEdge (geos::geom::LineString &Line)
 
 ~PolygonEdge ()
 
geos::geom::LineString * line ()
 Returns the geos::geom::LineString representing this PolygonEdge. More...
 
void addFace (PolygonEntity &NewFace)
 Add a PolygonEntity as a Face to this PolygonEdge. More...
 
bool isLineInFace (PolygonEntity &Face)
 Returns true if this PolygonEdge is in the boundary of the input PolygonEntity. More...
 
const std::vector< PolygonEntity * > getFaces ()
 Returns a vector of PolygonEntity which represent the Faces of this PolygonEdge. More...
 
void removeFace (PolygonEntity *Face)
 Removes a Face from the Faces of this PolygonEdge. More...
 
bool getAttributeValue (const std::string &AttributeName, core::Value &Value) const
 Gets the value of an attribute of this PolygonEdge. More...
 
bool setAttributeValue (const std::string &AttributeName, const core::Value *Value)
 Sets the value of an attribute of this PolygonEdge. More...
 
void removeAttribute (const std::string &AttributeName)
 Removes an attribute of this PolygonEdge. More...
 
bool isCoincident (PolygonEdge *Edge)
 Returns true if this PolygonEdge is coincident with an other PolygonEdge. More...
 

Public Attributes

std::map< std::string, core::Value * > m_EdgeAttributes
 Map of Attributes which are carried by this PolygonEdge. More...
 

Detailed Description

A part of a PolygonEntity exterior ring, that may be share between to adjacent PolygonEntity.

A PolygonEdge has one or two Faces. The Faces are the PolygonEntity that share this PolygonEdge.

Constructor & Destructor Documentation

openfluid::landr::PolygonEdge::PolygonEdge ( geos::geom::LineString &  Line)
openfluid::landr::PolygonEdge::~PolygonEdge ( )

Member Function Documentation

void openfluid::landr::PolygonEdge::addFace ( PolygonEntity NewFace)

Add a PolygonEntity as a Face to this PolygonEdge.

Parameters
NewFaceA PolygonEntity.
Exceptions
base::FrameworkExceptionif this PolygonEdge is not in the boundary of the input PolygonEntity, or if this PolygonEdge has already two Faces.
bool openfluid::landr::PolygonEdge::getAttributeValue ( const std::string &  AttributeName,
core::Value Value 
) const

Gets the value of an attribute of this PolygonEdge.

Parameters
AttributeNameThe name of the attribute to get.
ValueThe core::Value to assign the attribute value.
Returns
True if the attribute exists, false otherwise.
const std::vector<PolygonEntity*> openfluid::landr::PolygonEdge::getFaces ( )

Returns a vector of PolygonEntity which represent the Faces of this PolygonEdge.

bool openfluid::landr::PolygonEdge::isCoincident ( PolygonEdge Edge)

Returns true if this PolygonEdge is coincident with an other PolygonEdge.

Parameters
EdgeThe PolygonEdge to test the coincidence.
Returns
True if the two PolygonEdge are coincidents, false otherwise.
bool openfluid::landr::PolygonEdge::isLineInFace ( PolygonEntity Face)

Returns true if this PolygonEdge is in the boundary of the input PolygonEntity.

Parameters
FaceA PolygonEntity.
Returns
True if this PolygonEdge is in the boundary of the input PolygonEntity, false otherwise.
geos::geom::LineString* openfluid::landr::PolygonEdge::line ( )

Returns the geos::geom::LineString representing this PolygonEdge.

void openfluid::landr::PolygonEdge::removeAttribute ( const std::string &  AttributeName)

Removes an attribute of this PolygonEdge.

Parameters
AttributeNameThe name of the attribute to set.
void openfluid::landr::PolygonEdge::removeFace ( PolygonEntity Face)

Removes a Face from the Faces of this PolygonEdge.

Does nothing if the input Face is not a part of this PolygonEdge Faces.

Parameters
FaceA PolygonEntity.
bool openfluid::landr::PolygonEdge::setAttributeValue ( const std::string &  AttributeName,
const core::Value Value 
)

Sets the value of an attribute of this PolygonEdge.

Takes the ownership of Value.

Parameters
AttributeNameThe name of the attribute to set.
ValueThe core::Value assign to the attribute value.
Returns
True if the attribute exists, false otherwise.

Member Data Documentation

std::map<std::string, core::Value*> openfluid::landr::PolygonEdge::m_EdgeAttributes

Map of Attributes which are carried by this PolygonEdge.


The documentation for this class was generated from the following file: