Infinity Engine v0.6.20
C++ API Documentation
Loading...
Searching...
No Matches
Infinity::Types::Core::PropertyValue Class Reference

#include <PropertyValue.hpp>

Collaboration diagram for Infinity::Types::Core::PropertyValue:
[legend]

Public Types

enum  Type : uint8_t {
  NIL , BOOL , INT , FLOAT ,
  DOUBLE , DATA
}
 

Public Member Functions

 PropertyValue ()
 
 PropertyValue (bool v)
 
 PropertyValue (int v)
 
 PropertyValue (float v)
 
 PropertyValue (double v)
 
template<typename T , typename = std::enable_if_t< !std::is_same_v<std::decay_t<T>, bool> && !std::is_same_v<std::decay_t<T>, int> && !std::is_same_v<std::decay_t<T>, float> && !std::is_same_v<std::decay_t<T>, double> && !std::is_same_v<std::decay_t<T>, std::nullptr_t> && !std::is_pointer_v<std::decay_t<T>> && !std::is_same_v<std::decay_t<T>, PropertyValue>>>
 PropertyValue (T &&v)
 
 ~PropertyValue ()
 
 PropertyValue (const PropertyValue &other)
 
 PropertyValue (PropertyValue &&other) noexcept
 
PropertyValueoperator= (const PropertyValue &other)
 
PropertyValueoperator= (PropertyValue &&other) noexcept
 
Type type () const
 
template<typename T >
T * as ()
 
template<typename T >
const T * as () const
 
void read (std::istream &in)
 
void write (std::ostream &out) const
 
size_t wrap (const std::byte *data)
 
size_t size_bytes () const noexcept
 

Member Enumeration Documentation

◆ Type

Enumerator
NIL 
BOOL 
INT 
FLOAT 
DOUBLE 
DATA 

Constructor & Destructor Documentation

◆ PropertyValue() [1/8]

Infinity::Types::Core::PropertyValue::PropertyValue ( )

◆ PropertyValue() [2/8]

Infinity::Types::Core::PropertyValue::PropertyValue ( bool  v)

◆ PropertyValue() [3/8]

Infinity::Types::Core::PropertyValue::PropertyValue ( int  v)

◆ PropertyValue() [4/8]

Infinity::Types::Core::PropertyValue::PropertyValue ( float  v)

◆ PropertyValue() [5/8]

Infinity::Types::Core::PropertyValue::PropertyValue ( double  v)

◆ PropertyValue() [6/8]

template<typename T , typename >
Infinity::Types::Core::PropertyValue::PropertyValue ( T &&  v)

◆ ~PropertyValue()

Infinity::Types::Core::PropertyValue::~PropertyValue ( )

◆ PropertyValue() [7/8]

Infinity::Types::Core::PropertyValue::PropertyValue ( const PropertyValue other)

◆ PropertyValue() [8/8]

Infinity::Types::Core::PropertyValue::PropertyValue ( PropertyValue &&  other)
noexcept

Member Function Documentation

◆ as() [1/2]

template<typename T >
T * Infinity::Types::Core::PropertyValue::as ( )

◆ as() [2/2]

template<typename T >
const T * Infinity::Types::Core::PropertyValue::as ( ) const

◆ operator=() [1/2]

PropertyValue & Infinity::Types::Core::PropertyValue::operator= ( const PropertyValue other)

◆ operator=() [2/2]

PropertyValue & Infinity::Types::Core::PropertyValue::operator= ( PropertyValue &&  other)
noexcept

◆ read()

void Infinity::Types::Core::PropertyValue::read ( std::istream &  in)

◆ size_bytes()

size_t Infinity::Types::Core::PropertyValue::size_bytes ( ) const
noexcept

◆ type()

Type Infinity::Types::Core::PropertyValue::type ( ) const

◆ wrap()

size_t Infinity::Types::Core::PropertyValue::wrap ( const std::byte *  data)

◆ write()

void Infinity::Types::Core::PropertyValue::write ( std::ostream &  out) const

Member Data Documentation

◆ as_bool

bool Infinity::Types::Core::PropertyValue::as_bool

◆ as_double

double Infinity::Types::Core::PropertyValue::as_double

◆ as_float

float Infinity::Types::Core::PropertyValue::as_float

◆ as_int

int Infinity::Types::Core::PropertyValue::as_int

◆ as_object

Data* Infinity::Types::Core::PropertyValue::as_object