Sage-ST ä

Blockdatalib

Documentation

BlockLargerThan BlockToFile BlockToString CalculateSlice
CleanBlockField ClearBlockFile CountBlockLines CountFileLines
FileLargerThan FileToBlock FileToString LoadControlFromBlock
UnloadControlToBlock




  procedure LoadControlFromBlock
             (messageType : in     DisplayW.DisplayMessageType;
              messageData : in     System.Address;
              Relation    : in     string;
              Field       : in     string;
              Success     : in out boolean);

  --*
  --  LoadControlFromBlock - Load control with data from a block field.
  --
  --
  --  This procedure loads the data from a block field to a control on
  --  a dialog.
  --
  --  CALLING SEQUENCE -
  --
  --    LoadControlFromBlock (messageType, messageData, Relation,
  --                          Field, Success)
  --
  --  ENTRY -
  --
  --    messageType : DisplayW.DisplayMessageType
  --      A parameter passed into the action proc, send into this routine.
  --
  --    messageData : System.Address
  --      A parameter passed into the action proc, send into this routine.
  --
  --    Relation : string
  --      Relation of the block field.
  --
  --    Field : string
  --      The name of the block data field.
  --
  --  EXIT -
  --
  --    Success : boolean
  --      True - No problems encountered, data loaded to control.
  --      False - Problem encountered, data not loaded.
  --




  procedure UnloadControlToBlock
             (messageType : in     DisplayW.DisplayMessageType;
              messageData : in     System.Address;
              Relation    : in     string;
              Field       : in     string;
              Success     : in out boolean);

  --*
  --  UnloadControlToBlock - Transfer data from control to block field.
  --
  --
  --  This procedure transfers the current contents of a control to
  --  a block data field.
  --
  --  CALLING SEQUENCE -
  --
  --    UnloadControlToBlock (messageType, messageData, Relation,
  --                          Field, Success)
  --
  --  ENTRY -
  --
  --    messageType : DisplayW.DisplayMessageType
  --      A parameter passed into the action proc, send into this routine.
  --
  --    messageData : SYSTEM.ADDRESS
  --      A parameter passed into the action proc, send into this routine.
  --
  --    Relation : string
  --      Relation of the block field.
  --
  --    Field : string
  --      The name of the block data field.
  --
  --  EXIT -
  --
  --    Success : BOOLEAN
  --      True - No problems encountered, data loaded to block field.
  --      False - Problem encountered, data not loaded.
  --




  procedure CleanBlockField
             (Relation : in     string;
              Field    : in     string;
              Success  : in out boolean);

  --*
  --  CleanBlockField - Clean the contents of a block data field.
  --
  --
  --  This procedure completely clears the contents of a block
  --  data field.  After this finishes any check of the field will
  --  show that it contains zero byte.
  --
  --  CALLING SEQUENCE -
  --
  --    CleanBlockField (Relation, Field)
  --
  --  ENTRY -
  --
  --    Relation : string
  --      Relation of the block field.
  --
  --    Field : string
  --      The name of the block data field.
  --
  --  EXIT -
  --
  --    Success : BOOLEAN
  --      True - No problems encountered, field cleared.
  --      False - Problem encountered, field is not cleared.
  --




  procedure BlockToFile
             (Relation   : in     string;
              BlockField : in     string;
              FileName   : in     string);

  --*
  --  BlockToFile - Copy data from block data field to a file.
  --
  --
  --  This procedure copies block data from the block data field
  --  into a file.  This is useful for doing reports and editing
  --  the data outside of the field.
  --
  --  CALLING SEQUENCE -
  --
  --    BlockToFile (Relation, BlockField, FileName)
  --
  --  ENTRY -
  --
  --    Relation : string
  --      Relation of the block field.
  --
  --    BlockField : string
  --      The name of the block data field.
  --
  --    FileName : string
  --      The name of the file to put the data in.
  --




  procedure FileToBlock
             (FileName   : in     string;
              Relation   : in     string;
              BlockField : in     string);

  --*
  --  FileToBlock - Copy data from a file to a block data field.
  --
  --
  --  This procedure copies block data from a file into a block
  --  data field.
  --
  --  CALLING SEQUENCE -
  --
  --    FileToBlock (FileName, Relation, BlockField)
  --
  --  ENTRY -
  --
  --    FileName : string
  --      The name of the file containing the data.
  --
  --    Relation : string
  --      Relation of the block field.
  --
  --    BlockField : string
  --      The name of the block data field.
  --




  function FileLargerThan
            (FileName  : in     string;
             CheckSize : in     Files.FilePosition) return boolean;

  --*
  --  FileLargerThan - Test if a file is larger than the given size.
  --
  --
  --  This procedure checks a file size to see if it is larger than
  --  the given CheckSize.  A boolean value is returned of the
  --  result.
  --
  --  CALLING SEQUENCE -
  --
  --    FileLargerThan (FileName, CheckSize)
  --
  --  ENTRY -
  --
  --    FileName : string
  --      The name of the file containing the data.
  --
  --    CheckSize : Files.FilePosition
  --      The size to check against the file.
  --
  --  EXIT -
  --
  --    FileLargerThan : BOOLEAN
  --      True - The current size of the file is larger then the CheckSize.
  --      False - The current size of the file is less than or equal to the
  --      CheckSize.
  --




  procedure CountFileLines
             (FileName  : in     string;
              maxLength : in     ModSys.S_Natural;
              numLines  : in out ModSys.S_Natural);

  --*
  --  CountFileLines - Count how many lines are in this file.
  --
  --
  --  This procedure counts the number of lines of data contained
  --  within this file.  Note that there is a max line length
  --  value used during the counting so if a current line in the
  --  file actually contains more data than this max value the
  --  line will be counted as two lines.
  --
  --  CALLING SEQUENCE -
  --
  --    CountFileLines (FileName, maxLength, numLines)
  --
  --  ENTRY -
  --
  --    FileName : string
  --      The name of the file containing the data.
  --
  --    maxLength : ModSys.S_Natural
  --      The max length to count as a single line.
  --
  --  EXIT -
  --
  --    NumLines : ModSys.S_Natural
  --      The number of lines that this file will produce when the data
  --      is pulled out given that the maxLength value is used at that
  --      time also.
  --




  procedure BlockToString
             (Relation   : in     string;
              Field      : in     string;
              LineNumber : in     ModSys.S_Natural;
              LineMax    : in     ModSys.S_Natural;
              line       : in out string);

  --*
  --  BlockToString - Get a line of data from a block data field.
  --
  --
  --  This procedure gets a line of data from the block field.  It
  --  uses the LineNumber parameter to calculate which piece of
  --  data is being requested.
  --
  --  CALLING SEQUENCE -
  --
  --    BlockToString (Relation, Field, LineNumber, LineMax, line)
  --
  --  ENTRY -
  --
  --    Relation : string
  --      The name of the relation holding the block field.
  --
  --    Field : string
  --      The name of the block data field.
  --
  --    LineNumber : ModSys.S_Natural
  --      The sequential number of the line to retrieve.  (i.e. 42 would
  --      request that the forty second line of data be return.
  --
  --    LineMax : ModSys.S_Natural
  --      A max number of characters to use when calculating lines of data.
  --
  --  EXIT -
  --
  --    line : string
  --      The buffer used to contain the line of data on return.
  --




  procedure FileToString
             (FileName   : in     string;
              LineNumber : in     ModSys.S_Natural;
              LineMax    : in     ModSys.S_Natural;
              line       : in out string);

  --*
  --  FileToString - Get a line of data from a file.
  --
  --
  --  This procedure gets a line of data from a file.  It
  --  uses the LineNumber parameter to calculate which piece of
  --  data is being requested.
  --
  --  CALLING SEQUENCE -
  --
  --    FileToString (FileName, LineNumber, LineMax, line)
  --
  --  ENTRY -
  --
  --    FileName : string
  --      The name of the file containing the data.
  --
  --    LineNumber : ModSys.S_Natural
  --      The sequential number of the line to retrieve.  (i.e. 42 would
  --      request that the forty second line of data be return.
  --
  --    LineMax : ModSys.S_Natural
  --      A max number of characters to use when calculating lines of data.
  --
  --  EXIT -
  --
  --    line : string
  --      The buffer used to contain the line of data on return.
  --




  function BlockLargerThan
            (Relation  : in     string;
             Field     : in     string;
             CheckSize : in     ModSys.S_Integer) return boolean;

  --*
  --  BlockLargerThan - Test if a block field is larger than the given size.
  --
  --
  --  This procedure checks a block field size to see if it is larger than
  --  the given CheckSize.  A boolean value is returned of the result.
  --
  --  CALLING SEQUENCE -
  --
  --    BlockLargerThan (Relation, Field, CheckSize)
  --
  --  ENTRY -
  --
  --    Relation : string
  --      The name of the relation containing the data.
  --
  --    Field : string
  --      The name of the field containing the data.
  --
  --    CheckSize : Files.FilePosition
  --      The size to check against the file.
  --
  --  EXIT -
  --
  --    BlockLargerThan : BOOLEAN
  --      True - The current size of the file is larger then the CheckSize.
  --      False - The current size of the file is less than or equal to the
  --      CheckSize.
  --




  procedure CountBlockLines
             (Relation  : in     string;
              Field     : in     string;
              maxLength : in     ModSys.S_Natural;
              numLines  : in out ModSys.S_Natural);

  --*
  --  CountBlockLines - Count how many lines are in a block field.
  --
  --
  --  This procedure counts the number of lines of data contained
  --  within a block field.  Note that there is a max line length
  --  value used during the counting so if a current line in the
  --  file actually contains more data than this max value the
  --  line will be counted as two lines.
  --
  --  CALLING SEQUENCE -
  --
  --    CountBlockLines (Relation, Field, maxLength, numLines)
  --
  --  ENTRY -
  --
  --    Relation : string
  --      The name of the relation containing the data.
  --
  --    Field : string
  --      The name of the field containing the data.
  --
  --    maxLength : ModSys.S_Natural
  --      The max length to count as a single line.
  --
  --  EXIT -
  --
  --    NumLines : ModSys.S_Natural
  --      The number of lines that this file will produce when the data
  --      is pulled out given that the maxLength value is used at that
  --      time also.
  --




  procedure ClearBlockFile
             (FileName : in     string);

  --*
  --  ClearBlockFile - Clear the contents of a file.
  --
  --
  --  This procedure completely clears the contents of a file.
  --  After this finishes any check of the file will show that
  --  it contains zero byte.
  --
  --  CALLING SEQUENCE -
  --
  --    ClearBlockFile (FileName)
  --
  --  ENTRY -
  --
  --    FileName : string
  --      The name of the file to clear.
  --




  procedure CalculateSlice
             (Buffer      : in     string;
              startOffset : in     ModSys.S_Natural;
              maxLength   : in     ModSys.S_Natural;
              numBytes    : in out ModSys.S_Natural;
              WasteBytes  : in out ModSys.S_Natural);

  --*
  --  CalculateSlice - Given startOffset what is the size of the next line.
  --
  --
  --  This procedure calculates the next slice (line) of data given the
  --  starting position of startOffset and using maxLength.  The numBytes
  --  param returns how many bytes of good data will be available and
  --  the WasteBytes param returns how many bad bytes.  The bad bytes come
  --  from things such as trying to use an offset that begins at the
  --  start of a CR LF pair.  In that case WasteBytes comes back as two.
  --
  --  CALLING SEQUENCE -
  --
  --    CalculateSlice (Buffer, startOffset, maxLength, numBytes,
  --                    WasteBytes)
  --
  --  ENTRY -
  --
  --    Buffer : string
  --      The buffer of data to check.
  --
  --    startOffset : ModSys.S_Natural
  --      The offset from the beginning of the buffer to start the
  --      calculation.
  --
  --    maxLength : ModSys.S_Natural
  --      The max length for a line of data.
  --
  --  EXIT -
  --
  --    numBytes : ModSys.S_Natural
  --      The number of bytes of data that will be a valid line.
  --
  --    WasteBytes : ModSys.S_Natural
  --      The number of bytes that will be ignore such as using
  --      an offset that starts in the middle of a CR LF pair.  In
  --      that case the LF would be a waste byte so a value of 1 would
  --      be returned.
  --




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