cesium-native 0.50.0
Loading...
Searching...
No Matches
CesiumVectorData::GeoJsonObject Struct Reference

An object in a GeoJSON document. More...

#include <CesiumVectorData/GeoJsonObject.h>

Classes

struct  IteratorProvider
 An object providing begin and end methods for creating iterators of the given type for a GeoJsonObject. More...
 

Public Member Functions

GeoJsonObjectIterator begin ()
 Returns an iterator pointing to this object. Iterating this will provide all children of this object.
 
GeoJsonObjectIterator end ()
 Returns an iterator pointing "past the end" of the list of children of this object.
 
ConstGeoJsonObjectIterator begin () const
 Returns an iterator pointing to this object. Iterating this will provide all children of this object.
 
ConstGeoJsonObjectIterator end () const
 Returns an iterator pointing "past the end" of the list of children of this object.
 
IteratorProvider< ConstGeoJsonPointIteratorpoints () const
 Allows iterating over all points defined in this object or any child objects. This will include both Point objects and MultiPoint objects.
 
IteratorProvider< ConstGeoJsonLineStringIteratorlines () const
 Allows iterating over all lines defined in this object or any child objects. This will include both LineString objects and MultiLineString objects.
 
IteratorProvider< ConstGeoJsonPolygonIteratorpolygons () const
 Allows iterating over all polygons defined in this object or any child objects. This will include both Polygon objects and MultiPolygon objects.
 
template<typename TObject>
IteratorProvider< ConstGeoJsonObjectTypeIterator< TObject > > allOfType () const
 Returns all GeoJsonObject values matching the given type in this object or in any children.
 
const std::optional< CesiumGeometry::AxisAlignedBox > & getBoundingBox () const
 Returns the bounding box defined in the GeoJSON for this object, if any.
 
std::optional< CesiumGeometry::AxisAlignedBox > & getBoundingBox ()
 Returns the bounding box defined in the GeoJSON for this object, if any.
 
const CesiumUtility::JsonValue::ObjectgetForeignMembers () const
 Returns the CesiumUtility::JsonValue::Object containing any foreign members on this GeoJSON object.
 
CesiumUtility::JsonValue::ObjectgetForeignMembers ()
 Returns the CesiumUtility::JsonValue::Object containing any foreign members on this GeoJSON object.
 
const std::optional< VectorStyle > & getStyle () const
 Returns the style set on this GeoJSON object, if any.
 
std::optional< VectorStyle > & getStyle ()
 Returns the style set on this GeoJSON object, if any.
 
GeoJsonObjectType getType () const
 Returns the GeoJsonObjectType that this GeoJsonObject is wrapping.
 
template<typename T>
bool isType () const
 Returns whether the value of this GeoJsonObject is of the given type.
 
template<typename T>
const T & get () const
 Obtains a reference to the value of this GeoJsonObject if the value is of the given type.
 
template<typename T>
T & get ()
 Obtains a reference to the value of this GeoJsonObject if the value is of the given type.
 
template<typename T>
const T * getIf () const
 Obtains a pointer to the value of this GeoJsonObject if the value is of the given type. Otherwise nullptr is returned.
 
template<typename T>
T * getIf ()
 Obtains a pointer to the value of this GeoJsonObject if the value is of the given type. Otherwise nullptr is returned.
 
template<typename Visitor>
decltype(auto) visit (Visitor &&visitor)
 Applies the visitor visitor to the value variant.
 
template<typename Visitor>
decltype(auto) visit (Visitor &&visitor) const
 Applies the visitor visitor to the value variant.
 

Public Attributes

GeoJsonObjectVariant value
 A variant containing the GeoJSON object.
 

Detailed Description

An object in a GeoJSON document.

Definition at line 44 of file GeoJsonObject.h.

Member Function Documentation

◆ allOfType()

template<typename TObject>
IteratorProvider< ConstGeoJsonObjectTypeIterator< TObject > > CesiumVectorData::GeoJsonObject::allOfType ( ) const
inline

Returns all GeoJsonObject values matching the given type in this object or in any children.

Note
The iterator will only descend up to a depth of eight, which should cover almost all GeoJSON documents.

Definition at line 138 of file GeoJsonObject.h.

◆ begin() [1/2]

GeoJsonObjectIterator CesiumVectorData::GeoJsonObject::begin ( )

Returns an iterator pointing to this object. Iterating this will provide all children of this object.

Note
The iterator will only descend up to a depth of eight, which should cover almost all GeoJSON documents.

◆ begin() [2/2]

ConstGeoJsonObjectIterator CesiumVectorData::GeoJsonObject::begin ( ) const

Returns an iterator pointing to this object. Iterating this will provide all children of this object.

Note
The iterator will only descend up to a depth of eight, which should cover almost all GeoJSON documents.

◆ end() [1/2]

GeoJsonObjectIterator CesiumVectorData::GeoJsonObject::end ( )

Returns an iterator pointing "past the end" of the list of children of this object.

Note
The iterator will only descend up to a depth of eight, which should cover almost all GeoJSON documents.

◆ end() [2/2]

ConstGeoJsonObjectIterator CesiumVectorData::GeoJsonObject::end ( ) const

Returns an iterator pointing "past the end" of the list of children of this object.

Note
The iterator will only descend up to a depth of eight, which should cover almost all GeoJSON documents.

◆ get() [1/2]

template<typename T>
T & CesiumVectorData::GeoJsonObject::get ( )
inline

Obtains a reference to the value of this GeoJsonObject if the value is of the given type.

Exceptions
std::bad_variant_accessif the value is not of type `T`

Definition at line 206 of file GeoJsonObject.h.

◆ get() [2/2]

template<typename T>
const T & CesiumVectorData::GeoJsonObject::get ( ) const
inline

Obtains a reference to the value of this GeoJsonObject if the value is of the given type.

Exceptions
std::bad_variant_accessif the value is not of type `T`

Definition at line 196 of file GeoJsonObject.h.

◆ getIf() [1/2]

template<typename T>
T * CesiumVectorData::GeoJsonObject::getIf ( )
inline

Obtains a pointer to the value of this GeoJsonObject if the value is of the given type. Otherwise nullptr is returned.

Definition at line 220 of file GeoJsonObject.h.

◆ getIf() [2/2]

template<typename T>
const T * CesiumVectorData::GeoJsonObject::getIf ( ) const
inline

Obtains a pointer to the value of this GeoJsonObject if the value is of the given type. Otherwise nullptr is returned.

Definition at line 212 of file GeoJsonObject.h.

◆ isType()

template<typename T>
bool CesiumVectorData::GeoJsonObject::isType ( ) const
inline

Returns whether the value of this GeoJsonObject is of the given type.

Definition at line 186 of file GeoJsonObject.h.

◆ lines()

IteratorProvider< ConstGeoJsonLineStringIterator > CesiumVectorData::GeoJsonObject::lines ( ) const

Allows iterating over all lines defined in this object or any child objects. This will include both LineString objects and MultiLineString objects.

Note
The iterator will only descend up to a depth of eight, which should cover almost all GeoJSON documents.

◆ points()

IteratorProvider< ConstGeoJsonPointIterator > CesiumVectorData::GeoJsonObject::points ( ) const

Allows iterating over all points defined in this object or any child objects. This will include both Point objects and MultiPoint objects.

Note
The iterator will only descend up to a depth of eight, which should cover almost all GeoJSON documents.

◆ polygons()

IteratorProvider< ConstGeoJsonPolygonIterator > CesiumVectorData::GeoJsonObject::polygons ( ) const

Allows iterating over all polygons defined in this object or any child objects. This will include both Polygon objects and MultiPolygon objects.

Note
The iterator will only descend up to a depth of eight, which should cover almost all GeoJSON documents.

◆ visit() [1/2]

template<typename Visitor>
decltype(auto) CesiumVectorData::GeoJsonObject::visit ( Visitor && visitor)
inline

Applies the visitor visitor to the value variant.

Definition at line 225 of file GeoJsonObject.h.

◆ visit() [2/2]

template<typename Visitor>
decltype(auto) CesiumVectorData::GeoJsonObject::visit ( Visitor && visitor) const
inline

Applies the visitor visitor to the value variant.

Definition at line 232 of file GeoJsonObject.h.

Member Data Documentation

◆ value

GeoJsonObjectVariant CesiumVectorData::GeoJsonObject::value

A variant containing the GeoJSON object.

Definition at line 239 of file GeoJsonObject.h.


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