Skip to content

Struct Ase::Value

ClassList > Ase > Value

Value type used to interface with various property types.

  • #include <value.hh>

Inherits the following classes: ValueVariant

Public Types

Type Name
enum Type

Public Static Attributes

Type Name
const Value empty_value

Public Functions

Type Name
Value ()
Value (bool v)
Value (int64 v)
Value (int32 v)
Value (uint32 v)
Value (double v)
Value (const char * v)
Value (const String & v)
const ValueS & as_array () const
Retrive a non-empty array if Value contains a non-empty array.
double as_double () const
Convert Value to double or return 0.
int64 as_int () const
Convert Value to int64 or return 0.
const ValueR & as_record () const
String as_string () const
Convert Value to a string, not very useful for RECORD or ARRAY.
size_t count () const
Number of elements in a RECORD or ARRAY Value .
void filter (const std::function< bool(const ValueField &)> & pred)
Recursively purge/remove RECORD elements iff to pred (recordfield) == true .
bool has (const String & key) const
Check for a named field in a RECORD.
constexpr Type index () const
bool is_numeric (bool boolisnumeric=true) const
Checks if Value is a DOUBLE, INT64, or BOOL.
bool is_string () const
StringS keys () const
List the field names of a RECORD Value .
bool operator!= (const Value & other) const
void operator= (bool v)
void operator= (int64 v)
void operator= (int32 v)
void operator= (uint32 v)
void operator= (double v)
void operator= (const char * v)
void operator= (const String & v)
void operator= (const ValueS & v)
void operator= (ValueS && v)
void operator= (const ValueR & v)
void operator= (ValueR && v)
void operator= (const InstanceP & v)
bool operator== (const Value & other) const
Value & operator[] (size_t i)
const Value & operator[] (size_t i) const
Value & operator[] (const String & name)
const Value & operator[] (const String & name) const
String repr () const
Convert Value to a string representation, useful for debugging.

Public Types Documentation

enum Type

enum Ase::Value::Type {
    NONE,
    BOOL,
    INT64,
    DOUBLE,
    STRING,
    ARRAY,
    RECORD,
    INSTANCE
};

Public Static Attributes Documentation

variable empty_value

const Value Ase::Value::empty_value;

Public Functions Documentation

function Value [1/8]

inline Ase::Value::Value () 

function Value [2/8]

inline Ase::Value::Value (
    bool v
) 

function Value [3/8]

inline Ase::Value::Value (
    int64 v
) 

function Value [4/8]

inline Ase::Value::Value (
    int32 v
) 

function Value [5/8]

inline Ase::Value::Value (
    uint32 v
) 

function Value [6/8]

inline Ase::Value::Value (
    double v
) 

function Value [7/8]

inline Ase::Value::Value (
    const char * v
) 

function Value [8/8]

inline Ase::Value::Value (
    const String & v
) 

function as_array

const ValueS & Ase::Value::as_array () const

function as_double

double Ase::Value::as_double () const

function as_int

int64 Ase::Value::as_int () const

function as_record

const ValueR & Ase::Value::as_record () const

function as_string

String Ase::Value::as_string () const

function count

size_t Ase::Value::count () const

function filter

void Ase::Value::filter (
    const std::function< bool(const ValueField &)> & pred
) 

function has

bool Ase::Value::has (
    const String & key
) const

function index

inline constexpr Type Ase::Value::index () const

function is_numeric

bool Ase::Value::is_numeric (
    bool boolisnumeric=true
) const

function is_string

inline bool Ase::Value::is_string () const

function keys

StringS Ase::Value::keys () const

function operator!=

inline bool Ase::Value::operator!= (
    const Value & other
) const

function operator=

inline void Ase::Value::operator= (
    bool v
) 

function operator=

inline void Ase::Value::operator= (
    int64 v
) 

function operator=

inline void Ase::Value::operator= (
    int32 v
) 

function operator=

inline void Ase::Value::operator= (
    uint32 v
) 

function operator=

inline void Ase::Value::operator= (
    double v
) 

function operator=

inline void Ase::Value::operator= (
    const char * v
) 

function operator=

inline void Ase::Value::operator= (
    const String & v
) 

function operator=

inline void Ase::Value::operator= (
    const ValueS & v
) 

function operator=

inline void Ase::Value::operator= (
    ValueS && v
) 

function operator=

inline void Ase::Value::operator= (
    const ValueR & v
) 

function operator=

inline void Ase::Value::operator= (
    ValueR && v
) 

function operator=

inline void Ase::Value::operator= (
    const InstanceP & v
) 

function operator==

inline bool Ase::Value::operator== (
    const Value & other
) const

function operator[]

Value & Ase::Value::operator[] (
    size_t i
) 

function operator[]

const Value & Ase::Value::operator[] (
    size_t i
) const

function operator[]

Value & Ase::Value::operator[] (
    const String & name
) 

function operator[]

const Value & Ase::Value::operator[] (
    const String & name
) const

function repr

String Ase::Value::repr () const


The documentation for this class was generated from the following file /__w/anklang/anklang/ase/value.hh