Stroika Library 3.0d25
 
Loading...
Searching...
No Matches
DataTypes.h File Reference
#include "Stroika/Frameworks/StroikaPreComp.h"
#include <cstdint>
#include <optional>
#include <variant>
#include "Stroika/Foundation/Characters/Character.h"
#include "Stroika/Foundation/Characters/String.h"
#include "Stroika/Foundation/Common/Concepts.h"
#include "Stroika/Foundation/Common/Enumeration.h"
#include "Stroika/Foundation/Common/GUID.h"
#include "Stroika/Foundation/IO/Network/URI.h"
#include "Stroika/Foundation/Memory/BLOB.h"
#include "Stroika/Foundation/Time/Date.h"
#include "Stroika/Foundation/Time/DateTime.h"
#include "Stroika/Foundation/Time/TimeOfDay.h"
#include "DataTypes.inl"

Go to the source code of this file.

Namespaces

namespace  Stroika::Frameworks::UPnP::DataTypes
 

Concepts

concept  Stroika::Frameworks::UPnP::DataTypes::IValue
 The C++ types of UPnP's data types: Value's.
 

Typedefs

using Stroika::Frameworks::UPnP::DataTypes::Value = variant< bool, uint8_t, uint16_t, uint32_t, uint64_t, int8_t, int16_t, int32_t, int64_t, float, double, Foundation::Characters::Character, String, Foundation::Time::Date, Foundation::Time::DateTime, Foundation::Time::TimeOfDay, Foundation::Memory::BLOB, Foundation::IO::Network::URI, Foundation::Common::GUID >
 A value of any of UPnP's data types, as its C++ type (the table above) - for code that learns a value's type as it runs.
 

Enumerations

enum class  Stroika::Frameworks::UPnP::DataTypes::DataType : uint8_t
 UPnP's data types - each named, as a service's description names it (Common::DefaultNames): ui2, fixed.14.4, ...
 

Functions

template<IValue T>
constexpr DataType Stroika::Frameworks::UPnP::DataTypes::DefaultDataType ()
 The data type a T is written as, given none: its default (marked * in the table above)
 
template<IValue T>
constexpr bool Stroika::Frameworks::UPnP::DataTypes::IsTypeOf (DataType t)
 Whether T is t's C++ type (the table above)
 
template<IValue T>
String Stroika::Frameworks::UPnP::DataTypes::ToText (const T &v)
 v, as UPnP writes it: as t, if given, else as its C++ type's default data type (the table above)
 
String Stroika::Frameworks::UPnP::DataTypes::ToText (const Value &v)
 v, as UPnP writes it: as t, if given, else as its C++ type's default data type
 
String Stroika::Frameworks::UPnP::DataTypes::ToText (const Value &v, DataType t)
 v, as UPnP writes it: as t, if given, else as its C++ type's default data type
 
template<IValue T>
optional< T > Stroika::Frameworks::UPnP::DataTypes::FromText (const String &text)
 text read as UPnP reads it: as t, if given, else as T's default data type (the table above) - nullopt if it is not one: not a number, say, or a number out of its type's range. Given only t, a Value of t's C++ type.
 
template<IValue T>
optional< T > Stroika::Frameworks::UPnP::DataTypes::FromText (const String &text, DataType t)
 text read as UPnP reads it: as t, if given, else as T's default data type
 
optional< Value > Stroika::Frameworks::UPnP::DataTypes::FromText (const String &text, DataType t)
 text read as UPnP reads it: as t, if given, else as T's default data type
 

Detailed Description

Note
Code-Status: Alpha

Definition in file DataTypes.h.