ArticyXImporter
ArticyXImporter for Unreal Engine
Loading...
Searching...
No Matches
ExpressoType Struct Reference

The ExpressoType struct represents a flexible data type used in the Articy runtime. More...

#include <ArticyExpressoScripts.h>

Classes

struct  Definition
 The Definition struct represents a type definition for ExpressoType. More...

Public Types

enum  EType {
  Undefined , Bool , Int , Float ,
  String
}
 Enumeration for the type of the ExpressoType.

Public Member Functions

virtual bool & GetBool ()
 Retrieves the boolean value of the ExpressoType.
virtual const bool & GetBool () const
 Retrieves the boolean value of the ExpressoType.
virtual int64 & GetInt ()
 Retrieves the int64 value of the ExpressoType.
virtual const int64 & GetInt () const
 Retrieves the int64 value of the ExpressoType.
virtual double & GetFloat ()
 Retrieves the double value of the ExpressoType.
virtual const double & GetFloat () const
 Retrieves the double value of the ExpressoType.
virtual FString & GetString ()
 Retrieves the string value of the ExpressoType.
virtual const FString & GetString () const
 Retrieves the string value of the ExpressoType.
virtual FString ToString () const
 Converts the ExpressoType instance to a string representation.
 ExpressoType ()
 Default constructor for ExpressoType.
virtual ~ExpressoType ()
 Virtual destructor for ExpressoType.
 ExpressoType (UArticyBaseObject *Object, const FString &Property)
 Constructs an ExpressoType from an object and a property name.
 ExpressoType (const bool &Value)
 Constructs an ExpressoType from a boolean value.
 ExpressoType (const int64 &Value)
 Constructs an ExpressoType from an int64 value.
 ExpressoType (const int32 &Value)
 Constructs an ExpressoType from an int32 value.
 ExpressoType (const int16 &Value)
 Constructs an ExpressoType from an int16 value.
 ExpressoType (const int8 &Value)
 Constructs an ExpressoType from an int8 value.
 ExpressoType (const uint64 &Value)
 Constructs an ExpressoType from a uint64 value.
 ExpressoType (const uint32 &Value)
 Constructs an ExpressoType from a uint32 value.
 ExpressoType (const uint16 &Value)
 Constructs an ExpressoType from a uint16 value.
 ExpressoType (const uint8 &Value)
 Constructs an ExpressoType from a uint8 value.
 ExpressoType (const double &Value)
 Constructs an ExpressoType from a double value.
 ExpressoType (const float &Value)
 Constructs an ExpressoType from a float value.
 ExpressoType (const FString &Value)
 Constructs an ExpressoType from a string value.
 ExpressoType (const FText &Value)
 Constructs an ExpressoType from an FText value.
 ExpressoType (const FName &Value)
 Constructs an ExpressoType from an FName value.
 ExpressoType (const UArticyPrimitive *Object)
 Constructs an ExpressoType from an ArticyPrimitive object.
 ExpressoType (const UArticyString &Value)
 Constructs an ExpressoType from an ArticyString value.
 ExpressoType (const UArticyInt &Value)
 Constructs an ExpressoType from an ArticyInt value.
 ExpressoType (const UArticyBool &Value)
 Constructs an ExpressoType from an ArticyBool value.
 ExpressoType (const FArticyId &Value)
 Constructs an ExpressoType from an ArticyId value.
 operator bool () const
 Conversion operator to boolean.
 operator int64 () const
 Conversion operator to int64.
 operator int8 () const
 Conversion operator to int8.
 operator uint8 () const
 Conversion operator to uint8.
 operator int16 () const
 Conversion operator to int16.
 operator uint16 () const
 Conversion operator to uint16.
 operator int32 () const
 Conversion operator to int32.
 operator uint32 () const
 Conversion operator to uint32.
 operator uint64 () const
 Conversion operator to uint64.
 operator double () const
 Conversion operator to double.
 operator float () const
 Conversion operator to float.
 operator FString () const
 Conversion operator to FString.
 operator FText () const
 Conversion operator to FText.
 operator FName () const
 Conversion operator to FName.
 operator FArticyId () const
 Conversion operator to FArticyId.
ExpressoType operator- () const
 Negates the ExpressoType instance.
bool operator== (const ExpressoType &Other) const
 Equality operator for ExpressoType.
bool operator!= (const ExpressoType &Other) const
 Inequality operator for ExpressoType.
bool operator< (const ExpressoType &Other) const
 Less-than operator for ExpressoType.
bool operator> (const ExpressoType &Other) const
 Greater-than operator for ExpressoType.
bool operator<= (const ExpressoType &Other) const
 Less-than or equal-to operator for ExpressoType.
bool operator>= (const ExpressoType &Other) const
 Greater-than or equal-to operator for ExpressoType.
ExpressoType operator&& (const ExpressoType &Other) const
 Logical AND operator for ExpressoType.
ExpressoType operator|| (const ExpressoType &Other) const
 Logical OR operator for ExpressoType.
ExpressoType operator^ (const ExpressoType &Other) const
 Logical XOR operator for ExpressoType.
ExpressoType operator+ (const ExpressoType &Other) const
 Addition operator for ExpressoType.
ExpressoType operator- (const ExpressoType &Other) const
 Subtraction operator for ExpressoType.
ExpressoType operator* (const ExpressoType &Other) const
 Multiplication operator for ExpressoType.
ExpressoType operator/ (const ExpressoType &Other) const
 Division operator for ExpressoType.
ExpressoType operator% (const ExpressoType &Other) const
 Modulo operator for ExpressoType.
const DefinitionGetDefinition (const FName &CppType) const
 Retrieves the definition of the specified C++ type.
void SetValue (UArticyBaseObject *Object, FString Property) const
 Sets the value of a property on an object.

Static Public Member Functions

template<typename T>
static void AddDefinition (const FName &CppType)
 Adds a type definition for ExpressoType.
static UArticyBaseObjectTryFeatureReroute (UArticyBaseObject *Object, FString &Property)
 Attempts to reroute a property to a feature object.

Public Attributes

union { 
   bool   BoolValue 
 Boolean value of the ExpressoType.
   int64   IntValue = 0 
 Integer value of the ExpressoType.
   double   FloatValue 
 Float value of the ExpressoType.
}; 
FString StringValue
 String value of the ExpressoType.
enum ExpressoType::EType Type = Undefined
 The type of the ExpressoType.

Static Public Attributes

static TMap< FName, DefinitionDefinitions
 Map of type definitions for ExpressoType.

Detailed Description

The ExpressoType struct represents a flexible data type used in the Articy runtime.

The ExpressoType struct is designed to handle various types of data within the Articy runtime, such as booleans, integers, floats, and strings. It provides implicit conversion operators for different data types, allowing seamless interactions with properties in Articy objects.

Constructor & Destructor Documentation

◆ ExpressoType() [1/20]

ExpressoType::ExpressoType ( UArticyBaseObject * Object,
const FString & Property )

Constructs an ExpressoType from an object and a property name.

This constructor initializes an ExpressoType instance based on the specified property of a given object.

Parameters
ObjectThe object containing the property.
PropertyThe name of the property.

◆ ExpressoType() [2/20]

ExpressoType::ExpressoType ( const bool & Value)

Constructs an ExpressoType from a boolean value.

Parameters
ValueThe boolean value to initialize the ExpressoType with.

◆ ExpressoType() [3/20]

ExpressoType::ExpressoType ( const int64 & Value)

Constructs an ExpressoType from an int64 value.

Parameters
ValueThe int64 value to initialize the ExpressoType with.

◆ ExpressoType() [4/20]

ExpressoType::ExpressoType ( const int32 & Value)

Constructs an ExpressoType from an int32 value.

Parameters
ValueThe int32 value to initialize the ExpressoType with.

◆ ExpressoType() [5/20]

ExpressoType::ExpressoType ( const int16 & Value)

Constructs an ExpressoType from an int16 value.

Parameters
ValueThe int16 value to initialize the ExpressoType with.

◆ ExpressoType() [6/20]

ExpressoType::ExpressoType ( const int8 & Value)

Constructs an ExpressoType from an int8 value.

Parameters
ValueThe int8 value to initialize the ExpressoType with.

◆ ExpressoType() [7/20]

ExpressoType::ExpressoType ( const uint64 & Value)

Constructs an ExpressoType from a uint64 value.

Parameters
ValueThe uint64 value to initialize the ExpressoType with.

◆ ExpressoType() [8/20]

ExpressoType::ExpressoType ( const uint32 & Value)

Constructs an ExpressoType from a uint32 value.

Parameters
ValueThe uint32 value to initialize the ExpressoType with.

◆ ExpressoType() [9/20]

ExpressoType::ExpressoType ( const uint16 & Value)

Constructs an ExpressoType from a uint16 value.

Parameters
ValueThe uint16 value to initialize the ExpressoType with.

◆ ExpressoType() [10/20]

ExpressoType::ExpressoType ( const uint8 & Value)

Constructs an ExpressoType from a uint8 value.

Parameters
ValueThe uint8 value to initialize the ExpressoType with.

◆ ExpressoType() [11/20]

ExpressoType::ExpressoType ( const double & Value)

Constructs an ExpressoType from a double value.

Parameters
ValueThe double value to initialize the ExpressoType with.

◆ ExpressoType() [12/20]

ExpressoType::ExpressoType ( const float & Value)

Constructs an ExpressoType from a float value.

Parameters
ValueThe float value to initialize the ExpressoType with.

◆ ExpressoType() [13/20]

ExpressoType::ExpressoType ( const FString & Value)

Constructs an ExpressoType from a string value.

Parameters
ValueThe string value to initialize the ExpressoType with.

◆ ExpressoType() [14/20]

ExpressoType::ExpressoType ( const FText & Value)

Constructs an ExpressoType from an FText value.

Parameters
ValueThe FText value to initialize the ExpressoType with.

◆ ExpressoType() [15/20]

ExpressoType::ExpressoType ( const FName & Value)

Constructs an ExpressoType from an FName value.

Parameters
ValueThe FName value to initialize the ExpressoType with.

◆ ExpressoType() [16/20]

ExpressoType::ExpressoType ( const UArticyPrimitive * Object)

Constructs an ExpressoType from an ArticyPrimitive object.

This constructor initializes an ExpressoType instance based on the ID and clone ID of the specified object.

Parameters
ObjectThe ArticyPrimitive object.

◆ ExpressoType() [17/20]

ExpressoType::ExpressoType ( const UArticyString & Value)

Constructs an ExpressoType from an ArticyString value.

Parameters
ValueThe ArticyString value to initialize the ExpressoType with.

◆ ExpressoType() [18/20]

ExpressoType::ExpressoType ( const UArticyInt & Value)

Constructs an ExpressoType from an ArticyInt value.

Parameters
ValueThe ArticyInt value to initialize the ExpressoType with.

◆ ExpressoType() [19/20]

ExpressoType::ExpressoType ( const UArticyBool & Value)

Constructs an ExpressoType from an ArticyBool value.

Parameters
ValueThe ArticyBool value to initialize the ExpressoType with.

◆ ExpressoType() [20/20]

ExpressoType::ExpressoType ( const FArticyId & Value)

Constructs an ExpressoType from an ArticyId value.

Parameters
ValueThe ArticyId value to initialize the ExpressoType with.

Member Function Documentation

◆ AddDefinition()

template<typename T>
void ExpressoType::AddDefinition ( const FName & CppType)
static

Adds a type definition for ExpressoType.

This method adds a type definition for the specified C++ type to the ExpressoType definitions map.

Template Parameters
TThe C++ type.
Parameters
CppTypeThe name of the C++ type.

◆ GetBool() [1/2]

bool & ExpressoType::GetBool ( )
virtual

Retrieves the boolean value of the ExpressoType.

Returns
The boolean value.

◆ GetBool() [2/2]

const bool & ExpressoType::GetBool ( ) const
virtual

Retrieves the boolean value of the ExpressoType.

Returns
The boolean value.

◆ GetDefinition()

const ExpressoType::Definition & ExpressoType::GetDefinition ( const FName & CppType) const

Retrieves the definition of the specified C++ type.

This method returns the definition of the specified C++ type from the ExpressoType definitions map.

Parameters
CppTypeThe name of the C++ type.
Returns
The definition of the specified type.

◆ GetFloat() [1/2]

double & ExpressoType::GetFloat ( )
virtual

Retrieves the double value of the ExpressoType.

Returns
The double value.

◆ GetFloat() [2/2]

const double & ExpressoType::GetFloat ( ) const
virtual

Retrieves the double value of the ExpressoType.

Returns
The double value.

◆ GetInt() [1/2]

int64 & ExpressoType::GetInt ( )
virtual

Retrieves the int64 value of the ExpressoType.

Returns
The int64 value.

◆ GetInt() [2/2]

const int64 & ExpressoType::GetInt ( ) const
virtual

Retrieves the int64 value of the ExpressoType.

Returns
The int64 value.

◆ GetString() [1/2]

FString & ExpressoType::GetString ( )
virtual

Retrieves the string value of the ExpressoType.

Returns
The string value.

◆ GetString() [2/2]

const FString & ExpressoType::GetString ( ) const
virtual

Retrieves the string value of the ExpressoType.

Returns
The string value.

◆ operator bool()

ExpressoType::operator bool ( ) const
explicit

Conversion operator to boolean.

This operator converts the ExpressoType instance to a boolean value.

Returns
The boolean value of the ExpressoType.

◆ operator double()

ExpressoType::operator double ( ) const
explicit

Conversion operator to double.

This operator converts the ExpressoType instance to a double value.

Returns
The double value of the ExpressoType.

◆ operator FArticyId()

ExpressoType::operator FArticyId ( ) const
explicit

Conversion operator to FArticyId.

This operator converts the ExpressoType instance to an FArticyId.

Returns
The FArticyId value of the ExpressoType.

◆ operator float()

ExpressoType::operator float ( ) const
explicit

Conversion operator to float.

This operator converts the ExpressoType instance to a float value.

Returns
The float value of the ExpressoType.

◆ operator FName()

ExpressoType::operator FName ( ) const
explicit

Conversion operator to FName.

This operator converts the ExpressoType instance to an FName.

Returns
The FName value of the ExpressoType.

◆ operator FString()

ExpressoType::operator FString ( ) const
explicit

Conversion operator to FString.

This operator converts the ExpressoType instance to an FString.

Returns
The FString value of the ExpressoType.

◆ operator FText()

ExpressoType::operator FText ( ) const
explicit

Conversion operator to FText.

This operator converts the ExpressoType instance to an FText.

Returns
The FText value of the ExpressoType.

◆ operator int16()

ExpressoType::operator int16 ( ) const
explicit

Conversion operator to int16.

This operator converts the ExpressoType instance to an int16 value.

Returns
The int16 value of the ExpressoType.

◆ operator int32()

ExpressoType::operator int32 ( ) const
explicit

Conversion operator to int32.

This operator converts the ExpressoType instance to an int32 value.

Returns
The int32 value of the ExpressoType.

◆ operator int64()

ExpressoType::operator int64 ( ) const
explicit

Conversion operator to int64.

This operator converts the ExpressoType instance to an int64 value.

Returns
The int64 value of the ExpressoType.

◆ operator int8()

ExpressoType::operator int8 ( ) const
explicit

Conversion operator to int8.

This operator converts the ExpressoType instance to an int8 value.

Returns
The int8 value of the ExpressoType.

◆ operator uint16()

ExpressoType::operator uint16 ( ) const
explicit

Conversion operator to uint16.

This operator converts the ExpressoType instance to a uint16 value.

Returns
The uint16 value of the ExpressoType.

◆ operator uint32()

ExpressoType::operator uint32 ( ) const
explicit

Conversion operator to uint32.

This operator converts the ExpressoType instance to a uint32 value.

Returns
The uint32 value of the ExpressoType.

◆ operator uint64()

ExpressoType::operator uint64 ( ) const
explicit

Conversion operator to uint64.

This operator converts the ExpressoType instance to a uint64 value.

Returns
The uint64 value of the ExpressoType.

◆ operator uint8()

ExpressoType::operator uint8 ( ) const
explicit

Conversion operator to uint8.

This operator converts the ExpressoType instance to a uint8 value.

Returns
The uint8 value of the ExpressoType.

◆ operator!=()

bool ExpressoType::operator!= ( const ExpressoType & Other) const

Inequality operator for ExpressoType.

This operator compares two ExpressoType instances for inequality.

Parameters
OtherThe other ExpressoType instance to compare.
Returns
True if the instances are not equal, false otherwise.

◆ operator%()

ExpressoType ExpressoType::operator% ( const ExpressoType & Other) const

Modulo operator for ExpressoType.

This operator performs modulo operation on two ExpressoType instances.

Parameters
OtherThe other ExpressoType instance.
Returns
The result of the modulo operation.

◆ operator&&()

ExpressoType ExpressoType::operator&& ( const ExpressoType & Other) const

Logical AND operator for ExpressoType.

This operator performs logical AND operation on two ExpressoType instances.

Parameters
OtherThe other ExpressoType instance.
Returns
The result of the logical AND operation.

◆ operator*()

ExpressoType ExpressoType::operator* ( const ExpressoType & Other) const

Multiplication operator for ExpressoType.

This operator performs multiplication operation on two ExpressoType instances.

Parameters
OtherThe other ExpressoType instance.
Returns
The result of the multiplication operation.

◆ operator+()

ExpressoType ExpressoType::operator+ ( const ExpressoType & Other) const

Addition operator for ExpressoType.

This operator performs addition operation on two ExpressoType instances.

Parameters
OtherThe other ExpressoType instance.
Returns
The result of the addition operation.

◆ operator-() [1/2]

ExpressoType ExpressoType::operator- ( ) const

Negates the ExpressoType instance.

This operator returns a new ExpressoType instance with the negated value of the current instance.

Returns
The negated ExpressoType instance.

◆ operator-() [2/2]

ExpressoType ExpressoType::operator- ( const ExpressoType & Other) const

Subtraction operator for ExpressoType.

This operator performs subtraction operation on two ExpressoType instances.

Parameters
OtherThe other ExpressoType instance.
Returns
The result of the subtraction operation.

◆ operator/()

ExpressoType ExpressoType::operator/ ( const ExpressoType & Other) const

Division operator for ExpressoType.

This operator performs division operation on two ExpressoType instances.

Parameters
OtherThe other ExpressoType instance.
Returns
The result of the division operation.

◆ operator<()

bool ExpressoType::operator< ( const ExpressoType & Other) const

Less-than operator for ExpressoType.

This operator compares two ExpressoType instances for less-than relationship.

Parameters
OtherThe other ExpressoType instance to compare.
Returns
True if the current instance is less than the other instance, false otherwise.

◆ operator<=()

bool ExpressoType::operator<= ( const ExpressoType & Other) const

Less-than or equal-to operator for ExpressoType.

This operator compares two ExpressoType instances for less-than or equal-to relationship.

Parameters
OtherThe other ExpressoType instance to compare.
Returns
True if the current instance is less than or equal to the other instance, false otherwise.

◆ operator==()

bool ExpressoType::operator== ( const ExpressoType & Other) const

Equality operator for ExpressoType.

This operator compares two ExpressoType instances for equality.

Parameters
OtherThe other ExpressoType instance to compare.
Returns
True if the instances are equal, false otherwise.

◆ operator>()

bool ExpressoType::operator> ( const ExpressoType & Other) const

Greater-than operator for ExpressoType.

This operator compares two ExpressoType instances for greater-than relationship.

Parameters
OtherThe other ExpressoType instance to compare.
Returns
True if the current instance is greater than the other instance, false otherwise.

◆ operator>=()

bool ExpressoType::operator>= ( const ExpressoType & Other) const

Greater-than or equal-to operator for ExpressoType.

This operator compares two ExpressoType instances for greater-than or equal-to relationship.

Parameters
OtherThe other ExpressoType instance to compare.
Returns
True if the current instance is greater than or equal to the other instance, false otherwise.

◆ operator^()

ExpressoType ExpressoType::operator^ ( const ExpressoType & Other) const

Logical XOR operator for ExpressoType.

This operator performs logical XOR operation on two ExpressoType instances.

Parameters
OtherThe other ExpressoType instance.
Returns
The result of the logical XOR operation.

◆ operator||()

ExpressoType ExpressoType::operator|| ( const ExpressoType & Other) const

Logical OR operator for ExpressoType.

This operator performs logical OR operation on two ExpressoType instances.

Parameters
OtherThe other ExpressoType instance.
Returns
The result of the logical OR operation.

◆ SetValue()

void ExpressoType::SetValue ( UArticyBaseObject * Object,
FString Property ) const

Sets the value of a property on an object.

This method sets the value of the specified property on the given object using the ExpressoType value.

Parameters
ObjectThe object containing the property.
PropertyThe name of the property.

◆ ToString()

FString ExpressoType::ToString ( ) const
virtual

Converts the ExpressoType instance to a string representation.

Returns
The string representation of the ExpressoType.

This method returns the string representation of the ExpressoType based on its type.

Returns
The string representation of the ExpressoType.

◆ TryFeatureReroute()

UArticyBaseObject * ExpressoType::TryFeatureReroute ( UArticyBaseObject * Object,
FString & Property )
static

Attempts to reroute a property to a feature object.

This method checks if the specified property contains a dot, indicating that it is a feature property, and reroutes it to the appropriate feature object if necessary.

Parameters
ObjectThe object containing the property.
PropertyThe name of the property.
Returns
The feature object, if rerouted, or the original object if not rerouted.

Member Data Documentation

◆ Definitions

TMap< FName, ExpressoType::Definition > ExpressoType::Definitions
static

Map of type definitions for ExpressoType.

This map contains a Factory and a Setter lambda for all the types that may exist as properties. This is needed because we need the cpp type (template argument) for reflection.


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