System.Tether.AppProfile.TResourceValue

提供: RAD Studio API Documentation
移動先: 案内検索

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);
    static TResourceValue __fastcall _op_Implicit(__int64 Value);
    static TResourceValue __fastcall _op_Implicit(int Value);
    static TResourceValue __fastcall _op_Implicit(double Value);
    static TResourceValue __fastcall _op_Implicit(float Value);
    static TResourceValue __fastcall _op_Implicit(const System::UnicodeString Value);
    static TResourceValue __fastcall _op_Implicit(System::Classes::TStream* const Value);
    __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() {}
    TResourceValue& operator =(bool Value) { *this = TResourceValue::_op_Implicit(Value); return *this; }
    TResourceValue& operator =(__int64 Value) { *this = TResourceValue::_op_Implicit(Value); return *this; }
    TResourceValue& operator =(int Value) { *this = TResourceValue::_op_Implicit(Value); return *this; }
    TResourceValue& operator =(double Value) { *this = TResourceValue::_op_Implicit(Value); return *this; }
    TResourceValue& operator =(float Value) { *this = TResourceValue::_op_Implicit(Value); return *this; }
    TResourceValue& operator =(const System::UnicodeString Value) { *this = TResourceValue::_op_Implicit(Value); return *this; }
    TResourceValue& operator =(System::Classes::TStream* const Value) { *this = TResourceValue::_op_Implicit(Value); return *this; }
};

プロパティ

種類 可視性 ソース ユニット
record
struct
public
System.Tether.AppProfile.pas
System.Tether.AppProfile.hpp
System.Tether.AppProfile System.Tether.AppProfile


説明

値のラッパー。

DataType は、ラップされた値の型を判別します。型をチェックして、ラップされた値を取得するために使用しなければならないメソッドを判別します:

メソッド

TResourceType.Boolean

AsBoolean

TResourceType.Integer

AsInteger

TResourceType.Int64

AsInt64

TResourceType.Single

AsSingle

TResourceType.Double

AsDouble

TResourceType.String

AsString

関連項目