Sage-ST ä

Basicrelationclass

Documentation

Unit Documentation (Unit description)
Global Declarations (Constants, Types, Variables)





  //*
  //  BasicRelation - Basic class object for a SageST relation.
  //
  //
  //  This unit provides the structure to access a SageST relation in a class
  //  manner.  Once an object has been created of this class the routines
  //  typically used to control and get information about a relation are
  //  available using the object.
  //





  type
    ESageSTRelation = class (SysUtils.Exception);

    //
    // TBasicRelationClass - Opens the relation for access.
    //

    TBasicRelationClass = class

      private
        FRelationName : string;

        FSageError : cardinal;

        FRecordNumber : cardinal;

        FFileNumber : cardinal;

        FFieldTotal : cardinal;

        FRecordSize : cardinal;

        FVersion : TimeDate.Time;

        FXHandle : Sage.XHandleType;

        function HasFileSet : boolean;

      public

        constructor Create
                   (const RelationName : string;
                    const Modify       : boolean); virtual;

        //*
        //  Create - Create a basic Relation Object.
        //
        //
        //  This routine will create a SageST relation object that will provide
        //  an object interface to relation related routines such as OpenRelation,
        //  CloseRelation, WriteRecord and ReWriteRecord.
        //
        //  CALLING SEQUENCE -
        //
        //    MyRelation := BasicRelationClass.TBasicRelationClass.Create (RelationName,
        //                                                                 Modify);
        //
        //  ENTRY -
        //
        //    RelationName : string
        //      The name of the relation associated with this instance.
        //
        //    Modify : boolean
        //      Can the relation data can be modified.
        //

        destructor Destroy; override;

        //*
        //  Destroy - Destroy the current Basic Relation Object.
        //
        //
        //  This routine will destroy the SageST relation object that was created
        //  when the Create routine was called.
        //
        //  CALLING SEQUENCE -
        //
        //    MyRelation.Free;
        //

        procedure OpenRelation
                   (const Modify : boolean); virtual;

        procedure CloseRelation; virtual;

        function RelationIsOpen : boolean; virtual;

        function RelationOpenForModify : boolean; virtual;

        procedure ResetRelationPath
                   (const PathValue : string); virtual;

        procedure ClearRecord; virtual;

        procedure WriteRecord; virtual;

        procedure ReWriteRecord; virtual;

        procedure DeleteRecord; virtual;

        function TotalRecords : ModSys.INT32; virtual;

        procedure DeleteRelation; virtual;

        procedure ProcessRecords
                   (const UProc : Sage.RecProc); virtual;

        procedure ProcessRecordsHandle
                   (const handle : pointer;
                    const UHProc : Sage.RecHProc); virtual;

        procedure ProcessAdd
                   (const UProc : Sage.AddProc); virtual;

        procedure ProcessDelete
                   (const UProc : RecProc); virtual;

        function GetRelationXHandle : Sage.XHandleType; virtual;

        procedure ClearRecordX; virtual;

        property RelError : cardinal
          read FSageError;

        //*
        //  RelSageError - Returns last SageError from the operations
        //  of this class.
        //

        property RelationName : string
          read FRelationName;

        //*
        //  RelationName - Name of the relation associated with this instance.
        //

        property RelationXHandle : Sage.XHandleType
          read FXHandle;

        //*
        //  RelationXHandle - Returns the X handle associated with this instance.
        //
    end;




Send mail to   warren.merrill@inl.gov with questions or comments about this web site.
Copyright © 1989-2006 Battelle Energy Alliance