8#include "Arp/Plc/Commons/Meta/DataTag.hpp" 
    9#include "Arp/Plc/Commons/Meta/TypeSystem/DataTypeDeduction.hxx" 
   10#include "Arp/Plc/Commons/Meta/TypeSystem/TypeIdentifierDeduction.hxx" 
   12namespace Arp { 
namespace Plc { 
namespace Commons { 
namespace Meta { 
namespace TypeSystem
 
   33    DataTag operator()(
const char* name, T& value)
const;
 
   36    const char* libraryNamespace;
 
   42        using Base = GetAdressBase;
 
   43        using ValueType = 
byte*;
 
   46        GetAdressBase(ValueType value) : Value(value) {}
 
   47        GetAdressBase(
const GetAdressBase& arg) = 
default;
 
   48        GetAdressBase(GetAdressBase&& arg) = 
default;
 
   49        GetAdressBase& 
operator=(
const GetAdressBase& arg) = 
default;
 
   50        GetAdressBase& 
operator=(GetAdressBase&& arg) = 
default;
 
   51        ~GetAdressBase(
void) = 
default;
 
   54        operator ValueType(
void)
const 
   60        ValueType Value = 
nullptr;
 
   65    struct GetAdress : 
public GetAdressBase
 
   67        GetAdress(T& value): Base(const_cast<ValueType>(reinterpret_cast<const 
byte*>(&value))) {}
 
   71    struct GetAdress<
std::shared_ptr<T>> : 
public GetAdressBase
 
   73        GetAdress(std::shared_ptr<T>& value) : Base(const_cast<ValueType>(reinterpret_cast<const 
byte*>(value.get()))) {}
 
   77    struct GetAdress<const 
std::shared_ptr<T>> : 
public GetAdressBase
 
   79        GetAdress(
const std::shared_ptr<T>& value) : Base(const_cast<ValueType>(reinterpret_cast<const 
byte*>(value.get()))) {}
 
   87inline DataTag DataTagDeduction::operator()(
const char* name, T& value)
const 
   89    DataType dataType = DataTypeDeduction<T>();
 
   90    TypeIdentifierDeduction getTypeId(this->libraryNamespace);
 
   91    TypeIdentifier typeId = getTypeId(value);
 
   93    return DataTag(name, GetAdress<T>(value), dataType, typeId);
 
std::byte byte
The Arp byte type.
Definition: Byte.hpp:24
 
Root namespace for the PLCnext API
 
Namespace of the C++ standard library