BARfly Help - BAR Interfacial Function Reference - Summary

  BAR Interfacial Types

The BAR protocol standardizes the types used in interfacial functions.  The following is a brief description of the interfacial types.

Numerical Types

  • bool:  boolean quantity.  Zero equals false condition; nonzero equals true condition.  Size of this type is not mandated.
  • char:  1-byte integer, ranging from –128 to +127.
  • unsigned char:  1-byte integer, ranging from 0 to +255.
  • short:  2-byte integer, ranging from –32768 to +32767.
  • unsigned short:  2-byte integer, ranging from 0 to +65535
  • long:  4-byte integer, ranging from –(2^31) to +(2^31) – 1.
  • unsigned long:  4-byte integer, ranging from 0 to +(2^32) – 1.
  • longlong:  8-byte integer, ranging from –(2^63) to +(2^63) – 1.
  • unsigned longlong:  8-byte integer, ranging from 0 to +(2^64) – 1.
  • float:  4-byte floating point.  Format of this type is not mandated, but it is generally IEEE single-precision.
  • double:  8-byte floating point.  Format of this type is not mandated, but it is generally IEEE double-precision.
  • Node_Type_Constant:  enumerated type.  Size of this type is not mandated.  Has the following values:
    • BAR_SIMPLE_TYPE = 0
    • BAR_SIMPLE_STRUCT = 1
    • BAR_BITFIELD_STRUCT = 2
    • BAR_COMPLEX_STRUCT = 3
    • BAR_ARRAY_OF_SIMPLE = 4
    • BAR_ARRAY_OF_COMPLEX = 5
    • BAR_NODE_LIST = 8
    • BAR_DECISION_LIST = 9
    • BAR_ORGANIZED_BLOCK = 12
    • BAR_UNORGANIZED_BLOCK = 13
  • BAR_Ident_Type:  enumerated type.  Size of this type is not mandated.  Has the following values:
    • BAR_FILEEXTENSIONS = 0
    • BAR_FILETYPE = 1
    • BAR_FILEDESCRIPTION = 2
    • BAR_AUTHOR = 3
    • BAR_SOURCE = 4
    • BAR_EXACT_VERSION = 5
    • BAR_MIN_VERSION = 6

String Type

    BAR_String:  variable-length sequence of characters.  Size of this type is not mandated.

Identifier Types

  • BAR_Search_Field:  search string or numerical value (generally, types BAR_String and long).
  • Construct_Identifier:  construct identifier (generally, types BAR_String and long).
  • Variable_Identifier:  variable identifier (generally, types BAR_String and long).
  • Function_Identifier:  function identifier (generally, types BAR_String and long).
  • Enum_Identifier:  enumerated constant block identifier (generally, types BAR_String and long).
  • File_Identifier:  file identifier (generally, type BAR_String; usually has more implementations).
  • BAR_Identifier:  identifier for storage for a BAR I.F. (generally, type BAR_String; usually has more implementations).
  • BAR_Registry_Identifier:  identifier for storage for a BAR registry. (generally, type BAR_String; usually has more implementations).

Pointer-to-buffer Type

    Pointer_To_Buffer:  address of a memory location.  Size of this type is not mandated.

Bookmark Handle Type

    BAR_Bookmark:  handle for a node bookmark.  Size of this type is not mandated.

Interfacial Object Types

  • BAR_Interface:  interface representing a BAR object (generally, a reference to an object-oriented class instance).
  • BAR_Registry_Interface:  interface representing a BAR_Registry object (generally, a reference to an object-oriented class instance).

Complex Types

  • Value_Info:  A type used to receive multiple pieces of information from a type-lookup function.  Contains the following:
    • Construct_UID:  a long integer value representing the type of data structure.
    • Array_Index:  a long integer value indicating the number of elements of the first (or only) subscript of the array.  This shall be zero if the type is not an array.
    • Array_Index_2:  A long integer value indicating the number of elements of the second subscript of the array.  This shall be zero if the type is not an array, and one if the type is a one-dimensional array.
    • Byte_Size:  A long integer value indicating the number of bytes that composes the field.
    • Bit_Size:  A long integer value indicating the number of bits that composes the field.  This value will always be a multiple of eight for data not associated with Bit Field Structures or Bit Scan Blocks.  For data associated with Bit Fields or Bit Scan Blocks, this field can equal any positive value.
    • Is_Array:  Boolean value; true if array; false if not.
    • Is_2D_Array:  Boolean value; true if array with two dimensions; false if not.
    • Is_Pointer:  Boolean value; true if pointer to data; false if not.
    • Is_Unsigned:  Boolean value; true if unsigned; false if signed.
    • Is_Bigendian:  Boolean value; true if big endian format; false if little endian format.
  • Return_Value_Output:  A type used to receive a return value from an I.F. function call.  This type can represent any type of return value from an I.F. function.
  • Function_Argument_Input:  A type used to pass arguments to an I.F. function.  Contains the following:
    • Argument_Count:  An integer value representing the number of arguments in the data structure.
    • Argument_Sequence:  A sequence of values, represented either by their exact values or pointers or references to the values.  There are exactly Argument_Count arguments in the sequence.


  See also:  [Summary] [Compatibility Considerations]


BARfly Help Copyright © 2009 Christopher Allen