NGen
Loading...
Searching...
No Matches
geojson::List Struct Reference

Struct wrapping a vector of JSONProperty representing a JSON list. More...

#include <JSONProperty.hpp>

+ Collaboration diagram for geojson::List:

Public Member Functions

 List (std::vector< JSONProperty > *values)
 Construct a new List and set its values pointer to values.
 
std::vector< JSONProperty > * get_values () const
 Get the pointer to the values vector.
 
void push_back (const JSONProperty &property)
 Add a JSONProperty to List backing storage via the values pointer.
 
bool operator== (const List &other) const
 Equality operator.
 

Private Attributes

std::vector< JSONProperty > * values
 

Friends

std::ostream & operator<< (std::ostream &os, const List &obj)
 A stream overload to represent this type as a LIST.
 

Detailed Description

Struct wrapping a vector of JSONProperty representing a JSON list.

Note: that due to the forward declaration of JSONProperty and the recursive nature of the property and the variant types a pointer is required to allow this incomplete type to encapsulate the vectory of JSONProperties.

Constructor & Destructor Documentation

◆ List()

geojson::List::List ( std::vector< JSONProperty > * values)
inline

Construct a new List and set its values pointer to values.

Parameters
values

Member Function Documentation

◆ get_values()

std::vector< JSONProperty > * geojson::List::get_values ( ) const
inline

Get the pointer to the values vector.

Returns
const std::vector<JSONProperty>*

References values.

Referenced by geojson::JSONProperty::AsVectorVisitor< T >::operator()().

◆ operator==()

bool geojson::List::operator== ( const List & other) const
inline

Equality operator.

Parameters
otherList to check equality against
Returns
true If the JSONProperty vector values is equal to other vector of JSONProperty.
false If the JSONProperty vectors are not equivalent.

References values.

◆ push_back()

void geojson::List::push_back ( const JSONProperty & property)
inline

Add a JSONProperty to List backing storage via the values pointer.

Parameters
propertyJSONProperty to add to the back of the List

References values.

Friends And Related Symbol Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream & os,
const List & obj )
friend

A stream overload to represent this type as a LIST.

Parameters
os
objList
Returns
std::ostream&

Member Data Documentation

◆ values

std::vector<JSONProperty>* geojson::List::values
private

Referenced by get_values(), operator==(), and push_back().


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