Class TFitProblem

Unit

Declaration

type TFitProblem = class(TInterfacedObject, IFitProblem)

Description

Converts error codes back into exceptions to provide centralized error handling in the client. Converts data to appropriate type. Should implement the same interface as the server.

Hierarchy

  • TInterfacedObject
  • TFitProblem

Overview

Fields

Protected FFitStub: IFitServer;
Protected FProblemId: longint;

Methods

Public constructor Create(AOwner: TComponent); override;
Public function AsyncOper: boolean;
Public function ComputeBackgroundPoints: string;
Public function ComputeCurveBounds: string;
Public function ComputeCurvePositions: string;
Public function DoAllAutomatically: string;
Public function GetAbsRFactorStr: string;
Public function GetBackgroundPoints: TTitlePointsSet;
Public function GetCalcProfilePointsSet: TTitlePointsSet;
Public function GetCalcTimeStr: string;
Public function GetCurveCount: longint;
Public function GetCurveList: TMSCRCurveList;
Public function GetCurveParameterCount(SpecIndex: longint): longint;
Public function GetCurvePositions: TTitlePointsSet;
Public function GetCurvesList: TSelfCopiedCompList;
Public function GetDeltaProfilePointsSet: TTitlePointsSet;
Public function GetProblemId: longint;
Public function GetProfilePointsSet: TTitlePointsSet;
Public function GetRFactorBounds: TTitlePointsSet;
Public function GetRFactorStr: string;
Public function GetSelectedProfileInterval: TTitlePointsSet;
Public function GetSpecialCurveParameters: Curve_parameters;
Public function GetSqrRFactorStr: string;
Public function MinimizeDifference: string;
Public function MinimizeDifferenceAgain: string;
Public function MinimizeNumberOfCurves: string;
Public function SelectAllPointsAsCurvePositions: string;
Public function SelectEntireProfile: string;
Public function SelectProfileInterval(StartPointIndex, StopPointIndex: longint): string;
Public function SetBackgroundPointsSet(ABackgroundPoints: TTitlePointsSet): string;
Public function SetCurvePositions(ACurvePositions: TPointsSet): string;
Public function SetProfilePointsSet(APointsSet: TTitlePointsSet): string;
Public function SetRFactorBounds(ARFactorBounds: TPointsSet): string;
Public function SmoothProfile: string;
Protected function GetBackFactor: double;
Protected function GetCurveThresh: double;
Protected function GetCurveType: TCurveTypeId;
Protected function GetMaxRFactor: double;
Protected function GetState: TFitServerState;
Protected function GetWaveLength: double;
Public procedure AddPointToBackground(XValue, YValue: double);
Public procedure AddPointToCurvePositions(XValue, YValue: double);
Public procedure AddPointToProfile(XValue, YValue: double);
Public procedure AddPointToRFactorBounds(XValue, YValue: double);
Public procedure CreateCurveList;
Public procedure CreateProblem;
Public procedure DiscardProblem(AProblemId: longint);
Public procedure GetCurveParameter(SpecIndex: longint; ParamIndex: longint; var Name: string; var Value: double; var Type_: longint);
Public procedure ReplacePointInBackground( PrevXValue, PrevYValue, NewXValue, NewYValue: double);
Public procedure ReplacePointInCurvePositions( PrevXValue, PrevYValue, NewXValue, NewYValue: double);
Public procedure ReplacePointInProfile( PrevXValue, PrevYValue, NewXValue, NewYValue: double);
Public procedure ReplacePointInRFactorBounds( PrevXValue, PrevYValue, NewXValue, NewYValue: double);
Public procedure SetCurveParameter(SpecIndex: longint; ParamIndex: longint; Value: double);
Public procedure SetProblemId(AProblemId: longint);
Public procedure SetSpecialCurveParameters(ACurveExpr: string; CP: Curve_parameters);
Public procedure StopAsyncOper;
Public procedure SubtractBackground(Auto: boolean);
Protected procedure SetBackFactor(ABackFactor: double);
Protected procedure SetCurveThresh(ACurveThresh: double);
Protected procedure SetCurveType(ACurveType: TCurveTypeId);
Protected procedure SetMaxRFactor(AMaxRFactor: double);
Protected procedure SetWaveLength(AWaveLength: double);

Properties

Public property BackFactor: double read GetBackFactor write SetBackFactor;
Public property CurveThresh: double read GetCurveThresh write SetCurveThresh;
Public property CurveTypeId: TCurveTypeId read GetCurveType write SetCurveType;
Public property FitStub: IFitServer read FFitStub write FFitStub;
Public property MaxRFactor: double read GetMaxRFactor write SetMaxRFactor;
Public property State: TFitServerState read GetState;
Public property WaveLength: double read GetWaveLength write SetWaveLength;

Description

Fields

Protected FFitStub: IFitServer;

For now only single problem id is supported per client.

Protected FProblemId: longint;
 

Methods

Public constructor Create(AOwner: TComponent); override;
 
Public function AsyncOper: boolean;
 
Public function ComputeBackgroundPoints: string;
 
Public function ComputeCurveBounds: string;
 
Public function ComputeCurvePositions: string;
 
Public function DoAllAutomatically: string;
 
Public function GetAbsRFactorStr: string;
 
Public function GetBackgroundPoints: TTitlePointsSet;
 
Public function GetCalcProfilePointsSet: TTitlePointsSet;
 
Public function GetCalcTimeStr: string;
 
Public function GetCurveCount: longint;
 
Public function GetCurveList: TMSCRCurveList;
 
Public function GetCurveParameterCount(SpecIndex: longint): longint;
 
Public function GetCurvePositions: TTitlePointsSet;
 
Public function GetCurvesList: TSelfCopiedCompList;
 
Public function GetDeltaProfilePointsSet: TTitlePointsSet;
 
Public function GetProblemId: longint;
 
Public function GetProfilePointsSet: TTitlePointsSet;
 
Public function GetRFactorBounds: TTitlePointsSet;
 
Public function GetRFactorStr: string;
 
Public function GetSelectedProfileInterval: TTitlePointsSet;
 
Public function GetSpecialCurveParameters: Curve_parameters;
 
Public function GetSqrRFactorStr: string;
 
Public function MinimizeDifference: string;
 
Public function MinimizeDifferenceAgain: string;
 
Public function MinimizeNumberOfCurves: string;
 
Public function SelectAllPointsAsCurvePositions: string;
 
Public function SelectEntireProfile: string;
 
Public function SelectProfileInterval(StartPointIndex, StopPointIndex: longint): string;

Synchronous methods.

Public function SetBackgroundPointsSet(ABackgroundPoints: TTitlePointsSet): string;
 
Public function SetCurvePositions(ACurvePositions: TPointsSet): string;
 
Public function SetProfilePointsSet(APointsSet: TTitlePointsSet): string;

GetXXXX methods create and return A NEW OBJECT, responsibility to free it is put on calling code.

Public function SetRFactorBounds(ARFactorBounds: TPointsSet): string;
 
Public function SmoothProfile: string;

Asynchronous (long) methods.

Protected function GetBackFactor: double;
 
Protected function GetCurveThresh: double;
 
Protected function GetCurveType: TCurveTypeId;
 
Protected function GetMaxRFactor: double;

Getting / setting server attributes.

Protected function GetState: TFitServerState;
 
Protected function GetWaveLength: double;
 
Public procedure AddPointToBackground(XValue, YValue: double);
 
Public procedure AddPointToCurvePositions(XValue, YValue: double);
 
Public procedure AddPointToProfile(XValue, YValue: double);
 
Public procedure AddPointToRFactorBounds(XValue, YValue: double);
 
Public procedure CreateCurveList;
 
Public procedure CreateProblem;

Should be called in appropriate server state.

Public procedure DiscardProblem(AProblemId: longint);
 
Public procedure GetCurveParameter(SpecIndex: longint; ParamIndex: longint; var Name: string; var Value: double; var Type_: longint);
 
Public procedure ReplacePointInBackground( PrevXValue, PrevYValue, NewXValue, NewYValue: double);
 
Public procedure ReplacePointInCurvePositions( PrevXValue, PrevYValue, NewXValue, NewYValue: double);
 
Public procedure ReplacePointInProfile( PrevXValue, PrevYValue, NewXValue, NewYValue: double);
 
Public procedure ReplacePointInRFactorBounds( PrevXValue, PrevYValue, NewXValue, NewYValue: double);
 
Public procedure SetCurveParameter(SpecIndex: longint; ParamIndex: longint; Value: double);
 
Public procedure SetProblemId(AProblemId: longint);
 
Public procedure SetSpecialCurveParameters(ACurveExpr: string; CP: Curve_parameters);
 
Public procedure StopAsyncOper;

Control methods.

Public procedure SubtractBackground(Auto: boolean);
 
Protected procedure SetBackFactor(ABackFactor: double);
 
Protected procedure SetCurveThresh(ACurveThresh: double);
 
Protected procedure SetCurveType(ACurveType: TCurveTypeId);
 
Protected procedure SetMaxRFactor(AMaxRFactor: double);
 
Protected procedure SetWaveLength(AWaveLength: double);
 

Properties

Public property BackFactor: double read GetBackFactor write SetBackFactor;
 
Public property CurveThresh: double read GetCurveThresh write SetCurveThresh;
 
Public property CurveTypeId: TCurveTypeId read GetCurveType write SetCurveType;
 
Public property FitStub: IFitServer read FFitStub write FFitStub;
 
Public property MaxRFactor: double read GetMaxRFactor write SetMaxRFactor;
 
Public property State: TFitServerState read GetState;
 
Public property WaveLength: double read GetWaveLength write SetWaveLength;
 

Generated by PasDoc 0.15.0.