ProvSQL C/C++ API
Adding support for provenance and uncertainty management to PostgreSQL databases
Loading...
Searching...
No Matches
AggValue Struct Reference

A dynamically-typed aggregate value. More...

#include "Aggregation.h"

Public Member Functions

 AggValue ()
 Construct a NULL (NONE) value.
 AggValue (long l)
 Construct an integer value.
 AggValue (double d)
 Construct a float value.
 AggValue (bool b)
 Construct a boolean value.
 AggValue (std::string s)
 Construct a string value.
 AggValue (std::vector< long > vec)
 Construct an integer-array value.
 AggValue (std::vector< double > vec)
 Construct a float-array value.
 AggValue (std::vector< bool > vec)
 Construct a boolean-array value.
 AggValue (std::vector< std::string > vec)
 Construct a string-array value.
ValueType getType () const
 Return the runtime type tag of this value.

Public Attributes

std::variant< long, double, bool, std::string, std::vector< long >, std::vector< double >, std::vector< bool >, std::vector< std::string > > v
 The variant holding the actual value.

Private Attributes

ValueType t
 Active type tag.

Detailed Description

A dynamically-typed aggregate value.

Wraps a std::variant of all supported scalar and array types. The active alternative is identified by the ValueType tag returned by getType().

Definition at line 86 of file Aggregation.h.

Constructor & Destructor Documentation

◆ AggValue() [1/9]

AggValue::AggValue ( )
inline

Construct a NULL (NONE) value.

Definition at line 96 of file Aggregation.h.

◆ AggValue() [2/9]

AggValue::AggValue ( long l)
inline

Construct an integer value.

Parameters
lInteger value.

Definition at line 99 of file Aggregation.h.

◆ AggValue() [3/9]

AggValue::AggValue ( double d)
inline

Construct a float value.

Parameters
dFloat value.

Definition at line 102 of file Aggregation.h.

◆ AggValue() [4/9]

AggValue::AggValue ( bool b)
inline

Construct a boolean value.

Parameters
bBoolean value.

Definition at line 105 of file Aggregation.h.

◆ AggValue() [5/9]

AggValue::AggValue ( std::string s)
inline

Construct a string value.

Parameters
sString value.

Definition at line 108 of file Aggregation.h.

◆ AggValue() [6/9]

AggValue::AggValue ( std::vector< long > vec)
inline

Construct an integer-array value.

Parameters
vecInteger array.

Definition at line 111 of file Aggregation.h.

◆ AggValue() [7/9]

AggValue::AggValue ( std::vector< double > vec)
inline

Construct a float-array value.

Parameters
vecFloat array.

Definition at line 114 of file Aggregation.h.

◆ AggValue() [8/9]

AggValue::AggValue ( std::vector< bool > vec)
inline

Construct a boolean-array value.

Parameters
vecBoolean array.

Definition at line 117 of file Aggregation.h.

◆ AggValue() [9/9]

AggValue::AggValue ( std::vector< std::string > vec)
inline

Construct a string-array value.

Parameters
vecString array.

Definition at line 120 of file Aggregation.h.

Member Function Documentation

◆ getType()

ValueType AggValue::getType ( ) const
inline

Return the runtime type tag of this value.

Returns
The ValueType identifying the active alternative.

Definition at line 127 of file Aggregation.h.

Here is the caller graph for this function:

Member Data Documentation

◆ t

ValueType AggValue::t
private

Active type tag.

Definition at line 88 of file Aggregation.h.

◆ v

std::variant<long, double, bool, std::string, std::vector<long>, std::vector<double>, std::vector<bool>, std::vector<std::string> > AggValue::v

The variant holding the actual value.

Definition at line 93 of file Aggregation.h.


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