Barista Data Structures

 

When launching a Barista defined form, grid or inquiry, all information about a form (controls, entry and validation rules, etc.) is internally stored and referenced by a predefined set of "Attribute Codes". The two categories of attributes are listed below (see Table Attribute Codes & Column Attribute Codes).

During normal processing, these attributes are invisible to the end user. When in Callpoints, these attributes are available via the callpoint! object. Developers, however, may wish to access, and in some cases create selected attributes when calling selected Barista publics from within custom standalone programs.

The first set of arrays needed are the Attribute Definition Arrays. These arrays contain information about the purpose of the attributes and is required to access and manipulate the Table Attribute Codes & Column Attribute Codes. The Attribute Definition Arrays, one for the table attributes ( _tbl$[] ), and one for the column attributes ( _col$[] ), are created with a call to the Attribute Definition public:

call "bam_attr_init.bbj",attr_def_tbl$[all],attr_def_col$[all]

 

Both arrays have the same format:

[0,0] – Contains a ";" delimited string of all attribute codes ("ALID;CPGM;CPRO;… ")

[<attribute_no>,0] – Contains the attribute information definition string:
+---------------------------------------------(01,04) - Attribute Code
|   
 +-----------------------------------------(06,20) - Attribute Description
|    |                   +---------------------(27,01) - Data Type
|    |                   |                                C - Character
|   
 |                   |                                N - Numeric
|   
 |                   | +-------------------(29) - Internal Barista Information

|    |                   | |

AAAA-BBBBBBBBBBBBBBBBBBBB-C-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

 

It is important to note the Attribute Definition Arrays arrays are intended to be read-only and should not be modified at any time.

The second set of arrays needed are the Attribute Arrays. These arrays contain the attribute value information needed by Barista to process the desired objects. The Attribute Arrays, one for the table attributes ( attr_tbl$[] ), and one for the column attributes ( attr_col$[] ), are normally maintained by Barista, but can be created manually.

attr_tbl$[]

[0] – Contains a ";" delimited string of all table attribute codes ("ALID;CPGM;CPRO;… ")

[<attribute_no>] – Contains the corresponding table attribute value.

 

attr_col$[]

[0,0] – Contains a ";" delimited string of all column attribute codes ("DVAR;DTAL;CSEQ;VTYP;… ")

[0,1] – Contains a ";" delimited string of 40 byte padded segments, each containing <table.column>.

[<table.column>,<attribute_no>] – Contains the attribute value for the column.



______________________________________________________________________________________

Copyright BASIS International Ltd. BARISTA®, AddonSoftware®, BBj®, Visual PRO/5®, PRO/5®, and BBx® are registered trademarks.