MySQL 8.0.39
Source Code Documentation
Geometry::wkb_container Class Reference

Constant storage for WKB. More...

#include <spatial.h>

Inheritance diagram for Geometry::wkb_container:
[legend]

Public Member Functions

 wkb_container ()=default
 
 wkb_container (const char *data, const char *data_end)
 
void set (const char *data, const char *data_end)
 
const char * data () const
 
const char * data_end () const
 
uint32 length () const
 
bool no_data (size_t data_amount) const
 Check if there's enough data remaining as requested. More...
 
bool not_enough_points (uint32 expected_points, uint32 extra_point_space=0) const
 Check if there're enough points remaining as requested. More...
 

Protected Attributes

const char * m_data
 
const char * m_data_end
 

Detailed Description

Constant storage for WKB.

Encapsulation and the available methods make it impossible to update the members of wkb_container once it is initialized. The only allowed modification method is set(), which fully replaces the previous buffer.

Constructor & Destructor Documentation

◆ wkb_container() [1/2]

Geometry::wkb_container::wkb_container ( )
default

◆ wkb_container() [2/2]

Geometry::wkb_container::wkb_container ( const char *  data,
const char *  data_end 
)
inline

Member Function Documentation

◆ data()

const char * Geometry::wkb_container::data ( ) const
inline

◆ data_end()

const char * Geometry::wkb_container::data_end ( ) const
inline

◆ length()

uint32 Geometry::wkb_container::length ( ) const
inline

◆ no_data()

bool Geometry::wkb_container::no_data ( size_t  data_amount) const
inline

Check if there's enough data remaining as requested.

  • data_amount data requested
Returns
true if not enough data

◆ not_enough_points()

bool Geometry::wkb_container::not_enough_points ( uint32  expected_points,
uint32  extra_point_space = 0 
) const
inline

Check if there're enough points remaining as requested.

Need to perform the calculation in logical units, since multiplication can overflow the size data type.

  • expected_points number of points expected
  • extra_point_space extra space for each point element in the array
Returns
true if there are not enough points

◆ set()

void Geometry::wkb_container::set ( const char *  data,
const char *  data_end 
)
inline

Member Data Documentation

◆ m_data

const char* Geometry::wkb_container::m_data
protected

◆ m_data_end

const char* Geometry::wkb_container::m_data_end
protected

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