Sen API
Sen Libraries
Loading...
Searching...
No Matches

Classes and containers describing native and custom types. More...

Collaboration diagram for Types:

Classes

struct  sen::AliasSpec
 Data of an alias type. More...
class  sen::AliasType
 Represents an aliased type. More...
struct  sen::Arg
 Holds the information for an argument in the callable. More...
struct  sen::CallableSpec
 Data of a callable. More...
class  sen::Callable
 Represents something that can be called. More...
class  sen::CustomType
 Represents a user-defined type. More...
struct  sen::Enumerator
 Holds the information for an enumerator. More...
struct  sen::EnumSpec
 Data of an enum type. More...
class  sen::EnumType
 Represents an enumeration. More...
struct  sen::EventSpec
 Data of an event. More...
class  sen::Event
 Represents an event. More...
struct  sen::NonPropertyRelated
struct  sen::PropertyGetter
 Indicates that the method represents a getter of a property. More...
struct  sen::PropertySetter
 Indicates that the method represents a setter of a property. More...
struct  sen::MethodSpec
 Data of a method. More...
class  sen::Method
 Represents a method. More...
class  sen::NativeType
 Represents a native (built-in) type that can be created on the stack or sent in a message. More...
class  sen::NumericType
 Represents a numeric native type. More...
class  sen::IntegralType
 Represents an integral numeric type. More...
class  sen::RealType
 Represents a floating point numeric type. More...
struct  sen::OptionalSpec
 Data of an optional type. More...
class  sen::OptionalType
 Represents an optional type. More...
struct  sen::PropertySpec
 Data of a property. More...
class  sen::Property
 Represents a property. More...
struct  sen::QuantitySpec
 Data of a quantity type. More...
class  sen::QuantityType
 Represents a quantity. More...
struct  sen::SequenceSpec
 Data of a sequence type. More...
class  sen::SequenceType
 Represents a sequence type. More...
struct  sen::StructField
 Holds the information for a field in the struct. More...
struct  sen::StructSpec
 Data of struct type. More...
class  sen::StructType
 Represents a structure type. More...
class  sen::DurationType
 Represents a sen::Duration (a time duration). More...
class  sen::TimestampType
 Represents a sen::TimeStamp (a point in time). More...
struct  sen::MemberHash
 The hash of a member. More...
struct  sen::ShouldBePassedByValue< MemberHash >
class  sen::Type
 Represents a type that can be used to define variables and arguments for methods or functions. Types use the GoF Visitor pattern in order to allow easy and fast operation, as double dispatching is faster and cleaner than a (dynamic) cast-based approach. More...
class  sen::TypeHandle< SenTypeType >
 Handle around a type that, by default, ensures the lifetime of the underlying type. More...
struct  sen::VariantField
 Holds the information for a field in the variant. More...
struct  sen::VariantSpec
 Data of a variant type. More...
class  sen::VariantType
 Represents a variant type. More...

Typedefs

using sen::PropertyRelation = std::variant<NonPropertyRelated, PropertyGetter, PropertySetter>
 Information about the relation between a method and a property.
using sen::NativeFieldValueGetter = std::function<lang::Value(const void*)>
 A function that extracts a native value from a field.
template<typename T>
using sen::ConstSharedPtr = std::shared_ptr<const T>
 Utility typedef.
template<typename T = Type>
using sen::ConstTypeHandle = TypeHandle<const T>
template<typename T = Type>
using sen::MaybeConstTypeHandle = std::optional<ConstTypeHandle<T>>

Enumerations

enum class  sen::Constness { sen::Constness::constant , sen::Constness::nonConstant }
 Method constness. More...
enum class  sen::PropertyCategory { sen::PropertyCategory::staticRO , sen::PropertyCategory::staticRW , sen::PropertyCategory::dynamicRW , sen::PropertyCategory::dynamicRO }
 How a property is seen by others. More...
enum class  sen::TransportMode : uint8_t { sen::TransportMode::unicast = 0U , sen::TransportMode::multicast = 1U , sen::TransportMode::confirmed = 2U }
 How to transport information. More...

Functions

bool sen::operator== (const EventSpec &lhs, const EventSpec &rhs) noexcept
bool sen::operator!= (const EventSpec &lhs, const EventSpec &rhs) noexcept
const Span< ConstTypeHandle<> const > & sen::getNativeTypes ()
 All the native types.
template<typename T>
 sen::TypeHandle (std::shared_ptr< T > type) -> TypeHandle< T >
template<typename T>
TypeHandle< T > sen::makeNonOwningTypeHandle (T *typePtr)
 Creates a non-owning type handle from a type pointer.
template<typename T, typename U>
std::optional< TypeHandle< T > > sen::dynamicTypeHandleCast (const TypeHandle< U > &handle)
 Downcasts the type inside the type handle to the specified one, if possible.

Detailed Description

Classes and containers describing native and custom types.


Class Documentation

◆ sen::EventSpec

struct sen::EventSpec

Data of an event.

Class Members
CallableSpec callableSpec

◆ sen::NonPropertyRelated

struct sen::NonPropertyRelated

Indicates that the method is not directly related to any property.

◆ sen::PropertyGetter

struct sen::PropertyGetter

Indicates that the method represents a getter of a property.

Class Members
const Property * property

◆ sen::PropertySetter

struct sen::PropertySetter

Indicates that the method represents a setter of a property.

Class Members
const Property * property

Typedef Documentation

◆ PropertyRelation

Information about the relation between a method and a property.

◆ NativeFieldValueGetter

using sen::NativeFieldValueGetter = std::function<lang::Value(const void*)>

A function that extracts a native value from a field.

◆ ConstSharedPtr

template<typename T>
using sen::ConstSharedPtr = std::shared_ptr<const T>

Utility typedef.

◆ ConstTypeHandle

template<typename T = Type>
using sen::ConstTypeHandle = TypeHandle<const T>

◆ MaybeConstTypeHandle

template<typename T = Type>
using sen::MaybeConstTypeHandle = std::optional<ConstTypeHandle<T>>

Enumeration Type Documentation

◆ Constness

enum class sen::Constness
strong

Method constness.

Enumerator
constant 
nonConstant 

◆ PropertyCategory

enum class sen::PropertyCategory
strong

How a property is seen by others.

Enumerator
staticRO 

Does not change over time, can only be set via code.

staticRW 

Does not change over time, can be set via code and configuration.

dynamicRW 

May change over time, can be set from outside.

dynamicRO 

May change over time, cannot be set from outside.

◆ TransportMode

enum class sen::TransportMode : uint8_t
strong

How to transport information.

Enumerator
unicast 

Directed to each receiver, unreliable, unordered, no congestion control.

multicast 

Directed to all receivers, unreliable, unordered, no congestion control.

confirmed 

Directed to each receiver, reliable, ordered, with congestion control, relatively heavyweight.

Function Documentation

◆ operator==()

bool sen::operator== ( const EventSpec & lhs,
const EventSpec & rhs )
noexcept

◆ operator!=()

bool sen::operator!= ( const EventSpec & lhs,
const EventSpec & rhs )
noexcept

◆ getNativeTypes()

const Span< ConstTypeHandle<> const > & sen::getNativeTypes ( )
nodiscard

All the native types.

◆ TypeHandle()

template<typename T>
sen::TypeHandle ( std::shared_ptr< T > type) -> TypeHandle< T >

◆ makeNonOwningTypeHandle()

template<typename T>
TypeHandle< T > sen::makeNonOwningTypeHandle ( T * typePtr)

Creates a non-owning type handle from a type pointer.

Note: This is an explicit opt-out of the type-lifetime management system of the TypeHandle. That is, the user is responsible for ensuring a long enough lifetime of the underlying type (e.g., through a object with static storage duration).

Parameters
typePtrwhich should be wrapped by the handle

◆ dynamicTypeHandleCast()

template<typename T, typename U>
std::optional< TypeHandle< T > > sen::dynamicTypeHandleCast ( const TypeHandle< U > & handle)

Downcasts the type inside the type handle to the specified one, if possible.