8#include "Arp/System/Core/TypeDeduction.hxx"
9#include "Arp/Plc/Commons/DataType.hpp"
10#include "Arp/Plc/Commons/PlcTypes.h"
11#include "Arp/Plc/Commons/Esm/IProgram.hpp"
12namespace Arp {
namespace Plc {
namespace Commons {
namespace Meta {
namespace TypeSystem
18template<class T, bool IsArray = std::is_array<T>::value>
27 using type =
typename std::remove_reference<decltype(*std::begin(std::declval<T&>()))>;
34 if (std::is_enum<T>::value)
36 return DataType::Enum | GetDataType<typename underlying_enum_type<T>::type>();
38 else if (std::is_class<T>::value)
42 else if (std::is_array<T>::value)
44 return DataType::Array | GetDataType<typename array_element_type<T>::type>();
46 else if (std::is_pointer<T>::value)
63inline DataType GetDataType<boolean>()
84inline DataType GetDataType<int8>(
void)
90inline DataType GetDataType<uint16>(
void)
96inline DataType GetDataType<int16>(
void)
102inline DataType GetDataType<uint32>(
void)
108inline DataType GetDataType<int32>(
void)
114inline DataType GetDataType<uint64>(
void)
120inline DataType GetDataType<int64>(
void)
126inline DataType GetDataType<float32>(
void)
132inline DataType GetDataType<float64>(
void)
138inline DataType GetDataType<DateTime>(
void)
144inline DataType GetDataType<String>(
void)
150inline DataType GetDataType<IProgram>(
void)
177inline DataTypeDeductionBase::operator
DataType()
const
Interface to implement PLC program to be executed in realtime context.
Definition: IProgram.hpp:19
DataType
Definition: DataType.hpp:15
@ Float32
summary>Float64 - Arp C++ data type (8 Byte)
@ String
summary>Static Wide String type (UTF-16)
@ Boolean
summary>UInt8 - Arp C++ data type (1 Byte)
@ Int16
summary>UInt32 - Arp C++ data type (4 Byte)
@ None
summary>Unspecified.
@ Int8
summary>Char8 - Arp C++ data type (1 Byte)
@ UInt16
summary>Int16 - Arp C++ data type (2 Byte)
@ DateTime
summary>C++ DateTime type
@ Program
summary>Component
@ UInt64
summary>Int64 - Arp C++ data type (8 Byte)
@ UInt8
summary>Int8 - Arp C++ data type (1 Byte)
@ Int32
summary>UInt64 - Arp C++ data type (8 Byte)
@ Float64
summary>Limit of primitive types.
@ Char8
summary>Char16 - Arp C++ data type (2 Byte)
@ UInt32
summary>Int32 - Arp C++ data type (4 Byte)
@ Bit
summary>Boolean - Arp C++ data type (1 Byte)
@ Int64
summary>Float32 - Arp C++ data type (4 Byte)
Root namespace for the PLCnext API