8#include "Arp/Base/Rsc/Commons/Rsc.hpp"
9#include "Arp/Base/Rsc/Commons/RscString.hxx"
10#include "Arp/Base/Rsc/Commons/RscVariant.hxx"
11#include "Arp/Base/Rsc/Commons/RscTypeInfo.hpp"
12#include "Arp/Base/Commons/Exceptions/InvalidOperationException.hpp"
15namespace Arp::Base::Rsc::Commons
19using Arp::Base::Rsc::Commons::Internal::RscVariantAccessor;
38 size_t GetFieldCount(
void)
const;
41 template<
class T>
void ReadNextField(T& result);
42 template<
int N>
void ReadNextField(
RscString<N>& result);
73 (void)this->readFieldFunction(fieldType, value);
83 this->readFieldFunction(RscType::String, value);
97 this->readFieldFunction(RscType::Object, result);
101 if (this->pReader ==
nullptr)
107 this->SetReaderTo(result);
This exception is thrown when an operation cannot be executed because the related state is invalid.
Definition: InvalidOperationException.hpp:16
static InvalidOperationException Create(const String &message)
Creates an InvalidOperationException using an additional message.
Definition: InvalidOperationException.cpp:96
Contains a static string with string lentgh up to N characters. The string shall be null terminated.
Definition: RscString.hxx:24
Contains information to marshal structs.
Definition: RscStructInfo.hpp:17
Utility class to read dynamic structs.
Definition: RscStructReader.hpp:30
void ReadNextField(T &result)
Reads the next primitive field of the struct.
Definition: RscStructReader.hpp:63
RscVariantBase::ReadFieldFunction ReadFieldFunction
The prototype of the delegate to read a field.
Definition: RscStructReader.hpp:32
static constexpr RscType GetFrom(const T &)
Gets the RscType of the as argument passed parameter.
Definition: RscTypeDeduction.hpp:77
static bool IsPrimitiveType(RscType type)
Determines if the supplied RscType is a primitive type.
Definition: RscTypeInfo.cpp:77
This class is a base class of template class RscVariant.
Definition: RscVariantBase.hpp:40
bool IsComplexType(void) const
Determines if this instance represents a complex type, i.e. an array or a struct.
Definition: RscVariantBase.cpp:243
void SetReadElementFunction(ReadElementFunction &function)
Sets the element read function.
Definition: RscVariantBase.cpp:741
std::function< void(RscType fieldType, RscVariantBase &value)> ReadFieldFunction
The read field delegate type.
Definition: RscVariantBase.hpp:44
void CopyTo(String &value) const
Copies the content of this variant to a string.
Definition: RscVariantBase.cpp:858
void ResetComplexTypeInfo(void)
Clears reader, writer and read/write element functions.
Definition: RscVariantBase.cpp:273
Rsc class for variant data types like primitive data type, strings or information about arrays or str...
Definition: RscVariant.hxx:57
Reads marshaled data of RSC services.
Definition: RscReader.hpp:34