Skip to content

shapeworks::Variant

Variant class to represent multiple types. More...

#include <Variant.h>

Public Functions

Name
Variant()
Variant(const std::string & v)
Variant(int v)
Variant(double v)
Variant(const char * v)
Variant(bool v)
Variant(std::vector< double > v)
Variant(std::vector< int > v)
Variant(std::vector< bool > v)
Variant(std::vector< std::string > v)
operator std::string() const
operator bool() const
operator int() const
operator unsigned int() const
operator long() const
operator unsigned long() const
operator float() const
operator double() const
operator std::vector< double >() const
operator std::vector< int >() const
operator std::vector< bool >() const
operator std::vector< std::string >() const

Detailed Description

class shapeworks::Variant;

Variant class to represent multiple types.

This class was adapted from optparse to contain multiple types as a string This is used for storing parameters in a spreadsheet

Public Functions Documentation

function Variant

inline Variant()

function Variant

inline Variant(
    const std::string & v
)

function Variant

inline Variant(
    int v
)

function Variant

inline Variant(
    double v
)

function Variant

inline Variant(
    const char * v
)

function Variant

inline Variant(
    bool v
)

function Variant

inline Variant(
    std::vector< double > v
)

function Variant

inline Variant(
    std::vector< int > v
)

function Variant

inline Variant(
    std::vector< bool > v
)

function Variant

inline Variant(
    std::vector< std::string > v
)

function operator std::string

operator std::string() const

function operator bool

operator bool() const

function operator int

operator int() const

function operator unsigned int

operator unsigned int() const

function operator long

operator long() const

function operator unsigned long

operator unsigned long() const

function operator float

operator float() const

function operator double

operator double() const

function operator std::vector< double >

operator std::vector< double >() const

function operator std::vector< int >

operator std::vector< int >() const

function operator std::vector< bool >

operator std::vector< bool >() const

function operator std::vector< std::string >

operator std::vector< std::string >() const

Updated on 2024-07-12 at 20:10:35 +0000