unit class_point;

interface

uses class_param, user_types, class_rd_image, class_UI_values, class_basics;

const PICTURES_DLL_NAME = 'pictures.dll';

{$REGION 'ÊËÀÑÑ "ÒÎ×ÊÀ"'}
type
  TRDPoint = class (TRD_Something)
    private

    public
      image: TRDPointImage;

      U_Values: TRDValue_UI;
      I_Values: TRDValue_UI;

      Params: TRD_List;

      constructor Create ( in_point_name, in_point_desc: string);
      destructor Destroy; override;
end;
{$ENDREGION}

type
  TRDPointList = class (TRD_List)
    private

    public
      function Find_by_name( in_object_name: string ): TRDPoint;
end;


implementation
{$REGION 'ÊËÀÑÑ "ÒÎ×ÊÀ" ÐÅÀËÈÇÀÖÈß'}
constructor TRDPoint.Create;
begin
Assert( ( in_point_name <> '' ),
        'Âõîäíîå ïîëå ÈÌß ÒÎ×ÊÈ êëàññà RDPoint ïóñòîå!'+'{3E287545-CFD4-47F1-A439-3D7D7B600877}');
  inherited Create(in_point_name, in_point_desc);
  self.Params := TRDParamList.Create;

  self.image := TRDPointImage.Create( PICTURES_DLL_NAME, in_point_name );
  self.U_Values := TRDValue_UI.Create;
  self.I_Values := TRDValue_UI.Create;
end;

destructor TRDPoint.Destroy;
begin
  self.Params.Free;
  self.image.Free;
  self.U_Values.Free;
  self.I_Values.Free;
  inherited Destroy;
end;
{$ENDREGION}

{ TRDPointList }

function TRDPointList.Find_by_name(in_object_name: string): TRDPoint;
begin
result := inherited Find_by_name(in_object_name) as TRDPoint;
end;

end.
