System.Tether.AppProfile.TResourceValue

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

  TResourceValue = record
  private
    FDataType: TResourceType;
    FString: string;
    FStream: TStream;
    FSimpleValue: TSimpleValue;
    procedure AddToJsonObject(const AJSonObject: TJSONObject);
  private
    function GetBoolean: Boolean;
    function GetDouble: Double;
    function GetSingle: Single;
    function GetInt64: Int64;
    function GetInteger: Integer;
    function GetString: string;
  public
    constructor Create(Value: Boolean); overload;
    constructor Create(Value: Int64); overload;
    constructor Create(Value: Integer); overload;
    constructor Create(Value: Double); overload;
    constructor Create(Value: Single); overload;
    constructor Create(const Value: string); overload;
    constructor Create(const Value: TStream); overload;
    class operator Implicit(Value: Boolean): TResourceValue;
    class operator Implicit(Value: Int64): TResourceValue;
    class operator Implicit(Value: Integer): TResourceValue;
    class operator Implicit(Value: Double): TResourceValue;
    class operator Implicit(Value: Single): TResourceValue;
    class operator Implicit(const Value: string): TResourceValue;
    class operator Implicit(const Value: TStream): TResourceValue;
    property DataType: TResourceType read FDataType write FDataType;
    property AsString: string read GetString;
    property AsInteger: Integer read GetInteger;
    property AsDouble: Double read GetDouble;
    property AsInt64: Int64 read GetInt64;
    property AsSingle: Single read GetSingle;
    property AsBoolean: Boolean read GetBoolean;
    property AsStream: TStream read FStream;
  end;

C++

struct DECLSPEC_DRECORD TResourceValue
{
private:
    TResourceType FDataType;
    System::UnicodeString FString;
    System::Classes::TStream* FStream;
    TSimpleValue FSimpleValue;
    void __fastcall AddToJsonObject(System::Json::TJSONObject* const AJSonObject);
    bool __fastcall GetBoolean();
    double __fastcall GetDouble();
    float __fastcall GetSingle();
    __int64 __fastcall GetInt64();
    int __fastcall GetInteger();
    System::UnicodeString __fastcall GetString();
public:
    __fastcall TResourceValue(bool Value)/* overload */;
    __fastcall TResourceValue(__int64 Value)/* overload */;
    __fastcall TResourceValue(int Value)/* overload */;
    __fastcall TResourceValue(double Value)/* overload */;
    __fastcall TResourceValue(float Value)/* overload */;
    __fastcall TResourceValue(const System::UnicodeString Value)/* overload */;
    __fastcall TResourceValue(System::Classes::TStream* const Value)/* overload */;
    static TResourceValue __fastcall _op_Implicit(bool Value);
    TResourceValue& __fastcall operator=(bool Value) { *this = TResourceValue::_op_Implicit(Value); return *this; };
    static TResourceValue __fastcall _op_Implicit(__int64 Value);
    TResourceValue& __fastcall operator=(__int64 Value) { *this = TResourceValue::_op_Implicit(Value); return *this; };
    static TResourceValue __fastcall _op_Implicit(int Value);
    TResourceValue& __fastcall operator=(int Value) { *this = TResourceValue::_op_Implicit(Value); return *this; };
    static TResourceValue __fastcall _op_Implicit(double Value);
    TResourceValue& __fastcall operator=(double Value) { *this = TResourceValue::_op_Implicit(Value); return *this; };
    static TResourceValue __fastcall _op_Implicit(float Value);
    TResourceValue& __fastcall operator=(float Value) { *this = TResourceValue::_op_Implicit(Value); return *this; };
    static TResourceValue __fastcall _op_Implicit(const System::UnicodeString Value);
    TResourceValue& __fastcall operator=(const System::UnicodeString Value) { *this = TResourceValue::_op_Implicit(Value); return *this; };
    static TResourceValue __fastcall _op_Implicit(System::Classes::TStream* const Value);
    TResourceValue& __fastcall operator=(System::Classes::TStream* const Value) { *this = TResourceValue::_op_Implicit(Value); return *this; };
    __property TResourceType DataType = {read=FDataType, write=FDataType};
    __property System::UnicodeString AsString = {read=GetString};
    __property int AsInteger = {read=GetInteger};
    __property double AsDouble = {read=GetDouble};
    __property __int64 AsInt64 = {read=GetInt64};
    __property float AsSingle = {read=GetSingle};
    __property bool AsBoolean = {read=GetBoolean};
    __property System::Classes::TStream* AsStream = {read=FStream};
    TResourceValue() {}
};

Properties

Type Visibility Source Unit Parent
record
struct
public
System.Tether.AppProfile.pas
System.Tether.AppProfile.hpp
System.Tether.AppProfile System.Tether.AppProfile

Description

Wrapper for a value.

DataType determines the type of the wrapped value. Check the type to determine which method you must use to obtain the wrapped value:

Type Method

TResourceType.Boolean

AsBoolean

TResourceType.Integer

AsInteger

TResourceType.Int64

AsInt64

TResourceType.Single

AsSingle

TResourceType.Double

AsDouble

TResourceType.String

AsString

See Also