Class TConverter (unit DataConv)

Inherits from

TComponent

TConverter

Constructors


constructor Create(AOwner: TComponent);

Public declarations

TConverter



Functions

procedure Clear;


destructor Destroy;


function IsValidChar(Ch: Char): Boolean;


procedure Change;

Protected declarations

function GetAsBoolean: Boolean;


function GetAsDate: TDateTime;


function GetAsDateTime: TDateTime;


function GetAsFloat: Double;


function GetAsInteger: Longint;


function GetAsString: string;


function GetAsTime: TDateTime;


procedure SetAsBoolean(Value: Boolean);


procedure SetAsDate(Value: TDateTime);


procedure SetAsDateTime(Value: TDateTime);


procedure SetAsFloat(Value: Double);


procedure SetAsInteger(Value: Longint);


procedure SetAsString(const Value: string);


procedure SetAsTime(Value: TDateTime);


function BoolToStr(Value: Boolean): string;


procedure CheckDataType;


function DateTimeToString(Value: TDateTime): string;


function FloatToString(Value: Double): string;


function GetBoolValues(Index: Integer): string;


function GetDateTime: TDateTime;


function GetDateTimeFormat: TDateTimeFormat;


function GetString: string;


procedure SetBoolValues(Index: Integer; const Value: string);


procedure SetDataType(Value: TDataType);


procedure SetDateTimeFormat(Value: TDateTimeFormat);


procedure SetString(const Value: string);


Properties

property DataType : TDataType

Published declarations

property DateTimeFormat : TDateTimeFormat


property Digits : Integer


property DisplayFalse : string


property DisplayTrue : string


property FloatFormat : TFloatFormat


property Precision : Integer


property RaiseOnError : Boolean


property Text : string


property AsBoolean : Boolean


property AsDate : TDateTime


property AsDateTime : TDateTime


property AsFloat : Double


property AsInteger : Longint


property AsString : string


property AsTime : TDateTime


Events

event OnChange : TNotifyEvent


Variables

FData : PString;

Private declarations

FDataType : TDataType;


FDateTimeFormat : TDateTimeFormat;


FDigits : Integer;


FFloatFormat : TFloatFormat;


FOnChange : TNotifyEvent;


FPrecision : Integer;


FRaiseOnError : Boolean;


FTextValues : array[Boolean] of string[15];



Constructors


constructor Create(AOwner: TComponent);

Public declarations

TConverter


Functions


procedure Clear;


destructor Destroy;


function IsValidChar(Ch: Char): Boolean;


procedure Change;

Protected declarations


function GetAsBoolean: Boolean;


function GetAsDate: TDateTime;


function GetAsDateTime: TDateTime;


function GetAsFloat: Double;


function GetAsInteger: Longint;


function GetAsString: string;


function GetAsTime: TDateTime;


procedure SetAsBoolean(Value: Boolean);


procedure SetAsDate(Value: TDateTime);


procedure SetAsDateTime(Value: TDateTime);


procedure SetAsFloat(Value: Double);


procedure SetAsInteger(Value: Longint);


procedure SetAsString(const Value: string);


procedure SetAsTime(Value: TDateTime);


function BoolToStr(Value: Boolean): string;


procedure CheckDataType;


function DateTimeToString(Value: TDateTime): string;


function FloatToString(Value: Double): string;


function GetBoolValues(Index: Integer): string;


function GetDateTime: TDateTime;


function GetDateTimeFormat: TDateTimeFormat;


function GetString: string;


procedure SetBoolValues(Index: Integer; const Value: string);


procedure SetDataType(Value: TDataType);


procedure SetDateTimeFormat(Value: TDateTimeFormat);


procedure SetString(const Value: string);


Properties


property DataType : TDataType

Published declarations


property DateTimeFormat : TDateTimeFormat


property Digits : Integer


property DisplayFalse : string


property DisplayTrue : string


property FloatFormat : TFloatFormat


property Precision : Integer


property RaiseOnError : Boolean


property Text : string


property AsBoolean : Boolean


property AsDate : TDateTime


property AsDateTime : TDateTime


property AsFloat : Double


property AsInteger : Longint


property AsString : string


property AsTime : TDateTime


Events


event OnChange : TNotifyEvent


Variables


FData : PString;

Private declarations


FDataType : TDataType;


FDateTimeFormat : TDateTimeFormat;


FDigits : Integer;


FFloatFormat : TFloatFormat;


FOnChange : TNotifyEvent;


FPrecision : Integer;


FRaiseOnError : Boolean;


FTextValues : array[Boolean] of string[15];