MySQL 8.4.2
Source Code Documentation
gis::Cartesian_linestring Class Reference

A Cartesian 2d linestring. More...

#include <geometries_cs.h>

Inheritance diagram for gis::Cartesian_linestring:
[legend]

Public Types

typedef decltype(m_points) ::value_type value_type
 
typedef decltype(m_points) ::iterator iterator
 
typedef decltype(m_points) ::const_iterator const_iterator
 

Public Member Functions

 Cartesian_linestring ()
 
Coordinate_system coordinate_system () const override
 Gets the coordinate system. More...
 
bool accept (Geometry_visitor *v) override
 Applies a hierarchical visitor to this geometry. More...
 
void push_back (const Point &pt) override
 Adds a point to the end of the linestring. More...
 
void push_back (Point &&pt) override
 
void pop_front () override
 Removes a point from the front of the linestring. More...
 
bool empty () const override
 Checks if the linestring is empty. More...
 
std::size_t size () const override
 Returns the size of (number of points in) the linestring. More...
 
void resize (std::size_t count)
 
void clear () noexcept override
 Removes all points from the linestring. More...
 
Cartesian_linestringclone () const override
 
Cartesian_pointback () override
 Returns the last point of the linestring. More...
 
const Cartesian_pointback () const override
 
iterator begin () noexcept
 
const_iterator begin () const noexcept
 
iterator end () noexcept
 
const_iterator end () const noexcept
 
Cartesian_pointfront () override
 Returns the first point of the linestring. More...
 
const Cartesian_pointfront () const override
 
Cartesian_pointoperator[] (std::size_t i) override
 
const Cartesian_pointoperator[] (std::size_t i) const override
 
- Public Member Functions inherited from gis::Linestring
Geometry_type type () const override
 Gets the geometry type of the object. More...
 
bool is_empty () const override
 Check if this is an empty geometry. More...
 
- Public Member Functions inherited from gis::Geometry
 Geometry ()=default
 
virtual ~Geometry ()=default
 
 Geometry (const Geometry &)=default
 
Geometryoperator= (const Geometry &)=default
 

Protected Attributes

std::vector< Cartesian_point, Malloc_allocator< Cartesian_point > > m_points
 String of points constituting the linestring. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from gis::Linestring
static Linestringcreate_linestring (Coordinate_system coordinate_system)
 Creates a subclass of Linestring from a Coordinate_system. More...
 

Detailed Description

A Cartesian 2d linestring.

Member Typedef Documentation

◆ const_iterator

◆ iterator

◆ value_type

Constructor & Destructor Documentation

◆ Cartesian_linestring()

gis::Cartesian_linestring::Cartesian_linestring ( )
inline

Member Function Documentation

◆ accept()

bool gis::Cartesian_linestring::accept ( Geometry_visitor v)
overridevirtual

Applies a hierarchical visitor to this geometry.

See also
gis::Geometry_visitor
Parameters
vA hierarchical visitor.
Return values
trueThe execution was aborted by the visitor.
falseThe execution completed.

Implements gis::Linestring.

Reimplemented in gis::Cartesian_linearring.

◆ back() [1/2]

const Cartesian_point & gis::Cartesian_linestring::back ( ) const
inlineoverridevirtual

Implements gis::Linestring.

Reimplemented in gis::Cartesian_linearring.

◆ back() [2/2]

Cartesian_point & gis::Cartesian_linestring::back ( )
inlineoverridevirtual

Returns the last point of the linestring.

Returns
Last point of linestring

Implements gis::Linestring.

Reimplemented in gis::Cartesian_linearring.

◆ begin() [1/2]

const_iterator gis::Cartesian_linestring::begin ( void  ) const
inlinenoexcept

◆ begin() [2/2]

iterator gis::Cartesian_linestring::begin ( void  )
inlinenoexcept

◆ clear()

void gis::Cartesian_linestring::clear ( )
inlineoverridevirtualnoexcept

Removes all points from the linestring.

Implements gis::Linestring.

Reimplemented in gis::Cartesian_linearring.

◆ clone()

Cartesian_linestring * gis::Cartesian_linestring::clone ( ) const
inlineoverridevirtual

Implements gis::Linestring.

Reimplemented in gis::Cartesian_linearring.

◆ coordinate_system()

Coordinate_system gis::Cartesian_linestring::coordinate_system ( ) const
inlineoverridevirtual

Gets the coordinate system.

Returns
The coordinate system type.

Implements gis::Geometry.

Reimplemented in gis::Cartesian_linearring.

◆ empty()

bool gis::Cartesian_linestring::empty ( ) const
overridevirtual

Checks if the linestring is empty.

Here, the definition of empty is that the linestring does not contain any points. An invalid linestring with only one coordinate is not empty.

Return values
trueThe linestring is empty.
falseThe linestring is not empty.

Implements gis::Linestring.

Reimplemented in gis::Cartesian_linearring.

◆ end() [1/2]

const_iterator gis::Cartesian_linestring::end ( void  ) const
inlinenoexcept

◆ end() [2/2]

iterator gis::Cartesian_linestring::end ( void  )
inlinenoexcept

◆ front() [1/2]

const Cartesian_point & gis::Cartesian_linestring::front ( ) const
inlineoverridevirtual

Implements gis::Linestring.

Reimplemented in gis::Cartesian_linearring.

◆ front() [2/2]

Cartesian_point & gis::Cartesian_linestring::front ( )
inlineoverridevirtual

Returns the first point of the linestring.

Returns
First point of linestring

Implements gis::Linestring.

Reimplemented in gis::Cartesian_linearring.

◆ operator[]() [1/2]

const Cartesian_point & gis::Cartesian_linestring::operator[] ( std::size_t  i) const
inlineoverridevirtual

Implements gis::Linestring.

Reimplemented in gis::Cartesian_linearring.

◆ operator[]() [2/2]

Cartesian_point & gis::Cartesian_linestring::operator[] ( std::size_t  i)
inlineoverridevirtual

Implements gis::Linestring.

Reimplemented in gis::Cartesian_linearring.

◆ pop_front()

void gis::Cartesian_linestring::pop_front ( )
inlineoverridevirtual

Removes a point from the front of the linestring.

Implements gis::Linestring.

Reimplemented in gis::Cartesian_linearring.

◆ push_back() [1/2]

void gis::Cartesian_linestring::push_back ( const Point pt)
overridevirtual

Adds a point to the end of the linestring.

Parameters
ptThe point to add.

Implements gis::Linestring.

Reimplemented in gis::Cartesian_linearring.

◆ push_back() [2/2]

void gis::Cartesian_linestring::push_back ( Point &&  pt)
overridevirtual

Implements gis::Linestring.

Reimplemented in gis::Cartesian_linearring.

◆ resize()

void gis::Cartesian_linestring::resize ( std::size_t  count)
inline

◆ size()

std::size_t gis::Cartesian_linestring::size ( ) const
inlineoverridevirtual

Returns the size of (number of points in) the linestring.

Returns
Number of points in the linestring.

Implements gis::Linestring.

Reimplemented in gis::Cartesian_linearring.

Member Data Documentation

◆ m_points

std::vector<Cartesian_point, Malloc_allocator<Cartesian_point> > gis::Cartesian_linestring::m_points
protected

String of points constituting the linestring.

The line starts in the first point, goes through all intermediate points, and ends in the last point.


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