%SYS
Tables Class Reference

This class describes the basic properties of a table and, depending on its type, can also contain the table data itself. More...

Inheritance diagram for Tables:
Collaboration diagram for Tables:

Static Public Member Functions

_.Library.Status Compile (_.Library.String Type, _.Library.String NameFrom, _.Library.String NameTo)
 Compiles a single Table<br>
More...
 
_.Library.Status Create (_.Library.String Type, _.Library.String NameFrom, _.Library.String NameTo, _.Library.String Properties)
 Creates a Table the NLS database. More...
 
_.Library.Status CreateSkeleton (_.Library.String Type, _.Library.String From, _.Library.String To, _.Library.Integer Maxchar, _.Library.ObjectHandle Table)
 Creates a Table with common default parameters
More...
 
_.Library.Status Delete (_.Library.String Type, _.Library.String NameFrom, _.Library.String NameTo, _.Library.Integer Deep)
 Deletes a Table. More...
 
_.Library.Boolean Exists (_.Library.String Type, _.Library.String NameFrom, _.Library.String NameTo, _.Library.ObjectHandle Table, _.Library.Status Status)
 Checks for the existence of a Table in the NLS database. More...
 
_.Library.Status Export (_.Library.String FileName, _.Library.Integer NumExported, _.Library.String Types, _.Library.String NamesFrom, _.Library.String NamesTo)
 Exports Table Objects to a file in xml format. More...
 
_.Library.Status ExportAllToNls (_.Library.Integer NumExported, _.Library.Integer Deep)
 Exports all Table records to ^nls. More...
 
_.Library.Status ExportDir (_.Library.String Dir, _.Library.Integer NumExported, _.Library.String Types, _.Library.String NamesFrom, _.Library.String NamesTo)
 Exports Table Objects to separate xml files. More...
 
_.Library.Status ExportList (_.Library.String FileName, _.Library.Integer NumExported, _.Library.String Tables)
 Similar to Export() but uses a list of Tables to export rather than a. More...
 
_.Library.Status ExportToNls (_.Library.String Type, _.Library.String NameFrom, _.Library.String NameTo, _.Library.Integer Deep)
 Exports one Table record to ^nls. More...
 
_.Library.Status FromToDeleteRow (_.Library.String Type, _.Library.String NameFrom, _.Library.String NameTo, _.Library.String FromCode)
 Deletes a single row in a "FromTo" table (XLT, COL or Case). More...
 
_.Library.Status FromToEditRow (_.Library.String Type, _.Library.String NameFrom, _.Library.String NameTo, _.Library.String FromCode, _.Library.String ToCode)
 Edits a single row in a "FromTo" table (XLT, COL or Case). More...
 
_.Library.Status Get (_.Library.String Type, _.Library.String NameFrom, _.Library.String NameTo, _.Library.String Properties)
 Gets a Table's properties from the NLS database. More...
 
_.Library.Status GetPropertiesFromNls (_.Library.String Type, _.Library.String NameFrom, _.Library.String NameTo, _.Library.String Properties, _.Library.String Ref)
 Gets a Table's properties from the ^nls global. More...
 
_.Library.Status Import (_.Library.String FileName, _.Library.Integer NumImported, _.Library.Integer Flags)
 Imports Table records from an xml file. More...
 
_.Library.Status ImportAllFromNls (_.Library.Integer NumImported, _.Library.Integer Flags, _.Library.Integer Deep, _.Library.String Ref)
 Imports Table records from ^nls. More...
 
_.Library.Status ImportDir (_.Library.String Dir, _.Library.String NumImported, _.Library.Boolean forcemulticompile)
 Imports table files from a directory. More...
 
_.Library.Status ImportFromNls (_.Library.String Type, _.Library.String NameFrom, _.Library.String NameTo, _.Library.Integer Deep, _.Library.String Ref)
 Imports one Table record from ^nls. More...
 
_.Library.Boolean IsLoadable (_.Library.String Type, _.Library.String NameFrom, _.Library.String NameTo, _.Library.ObjectHandle Table, _.Library.String Errors)
 Verifies whether a table can be loaded<br>
More...
 
_.Library.Boolean IsValid (_.Library.String Type, _.Library.String NameFrom, _.Library.String NameTo, _.Library.String Errors, _.Library.String Warnings)
 Verifies validity of table<br>
More...
 
_.Library.Status Load (_.Library.String loc, _.Library.String typ, _.Library.String nam)
 Loads a Table from a Locale. More...
 
_.Library.Status Modify (_.Library.String Type, _.Library.String NameFrom, _.Library.String NameTo, _.Library.String Properties)
 Modifies an existing Table's properties in the NLS database. More...
 
_.Library.Status SetPropertiesToNls (_.Library.String Properties)
 Sets a Table's properties in ^nls. More...
 

Public Attributes

 COLRules
 For Collation tables only. More...
 
 Description
 Description of the Table. More...
 
 Identifiers
 For Identifier tables only. More...
 
 Modes
 For Mode tables only. More...
 
 NameFrom
 For XLT tables this corresponds to the source encoding or. More...
 
 NameTo
 For XLT tables this corresponds to the target encoding or. More...
 
 PatAliases
 For Patcode tables only. More...
 
 PatCodes
 For Patcode tables only. More...
 
 PatternRanges
 For pattern tables only. More...
 
 SubTableName
 For LowerCase, UpperCase, TitleCase, XLT, COL and Pattern tables. More...
 
 Type
 Type of table:
More...
 
 XLTDefaultAction
 For XLT tables only. More...
 
 XLTModeTableName
 For XLT modal tables only. More...
 
 XLTReplacementValue
 For XLT tables only. More...
 
 XLTReversibility
 For XLT tables only. More...
 
 XLTType
 For XLT tables only. More...
 
 XYActions
 For XY table only. More...
 

Static Public Attributes

 DOMAIN = None
 Default Localization Domain.
 

Detailed Description

This class describes the basic properties of a table and, depending on its type, can also contain the table data itself.



For types XLT, COL, and Case, the data points are stored in a SubTable object. For types Patcode, Ident and XY, the data points are kept in the Table object itself. Mode tables use a hybrid mechanism, with the modal escape sequences kept in the Table and the data points in a Mode SubTable. Pattern tables keep the pattern code ranges but also point to a Patcode Table.

Warning!

Only tables which have a "NameFrom" or "NameTo" property beginning with "y" (e.g. "yPrinterXYZ" or "yMytable") are considered custom tables and are preserved during system upgrades. All other tables are restored to their original state and any changes to them made with methods from this class will be lost in an upgrade.

Member Function Documentation

◆ Compile()

_.Library.Status Compile ( _.Library.String  Type,
_.Library.String  NameFrom,
_.Library.String  NameTo 
)
static

Compiles a single Table<br>

Parameters:

  • Type - Table type (eg: "LowerCase", "COL", "XLT", etc.)
  • NameFrom - Source character set (eg: "Unicode", "CP1250", "DTM-J", "etc.)</li> <li>NameTo - Target character set (eg: "Unicode", "CP1251", "Latin2", etc.)

◆ Create()

_.Library.Status Create ( _.Library.String  Type,
_.Library.String  NameFrom,
_.Library.String  NameTo,
_.Library.String  Properties 
)
static

Creates a Table the NLS database.



Parameters:

  • Type - Table type (eg: "LowerCase", "COL", "XLT", etc.)
  • NameFrom - Source character set (eg: "Unicode", "CP1250", "DTM-J", "etc.)</li> <li>NameTo - Target character set (eg: "Unicode", "CP1251", "Latin2", etc.)
  • Properties - Array of properties corresponding to the class properties

◆ CreateSkeleton()

_.Library.Status CreateSkeleton ( _.Library.String  Type,
_.Library.String  From,
_.Library.String  To,
_.Library.Integer  Maxchar,
_.Library.ObjectHandle  Table 
)
static

Creates a Table with common default parameters

Doesn't require passing a complete table specification.

Parameters:

  • Type - Table type (eg: "LowerCase", "COL", "XLT", etc.)
  • From - Source character set (eg: "Unicode", "CP1250", "DTM-J", "etc.)</li> <li>To - Target character set (eg: "Unicode", "CP1251", "Latin2", etc.)
  • Maxchar - Highest character: 0 (empty), 255 (8-bit), 65535 (Unicode)
  • Table - Return oref of the created object

◆ Delete()

_.Library.Status Delete ( _.Library.String  Type,
_.Library.String  NameFrom,
_.Library.String  NameTo,
_.Library.Integer  Deep 
)
static

Deletes a Table.



Parameters:

  • Type - Table type (eg: "LowerCase", "COL", "XLT", etc.)
  • NameFrom - Source character set (eg: "Unicode", "CP1250", "DTM-J", "etc.)</li> <li>NameTo - Target character set (eg: "Unicode", "CP1251", "Latin2", etc.)

◆ Exists()

_.Library.Boolean Exists ( _.Library.String  Type,
_.Library.String  NameFrom,
_.Library.String  NameTo,
_.Library.ObjectHandle  Table,
_.Library.Status  Status 
)
static

Checks for the existence of a Table in the NLS database.



Parameters:

  • Type - Table type (eg: "LowerCase", "COL", "XLT", etc.)
  • NameFrom - Source character set (eg: "Unicode", "CP1250", "DTM-J", "etc.)</li> <li>NameTo - Target character set (eg: "Unicode", "CP1251", "Latin2", etc.)

Return values:
If Value of the method = 0 (Table does not exist, or some error occured)

  • Table = Null
  • Status = Table "x" does not exist, or other error message

If Value of the method = 1 (Table exists)

  • Table = Object handle to Table
  • Status = $$$OK

◆ Export()

_.Library.Status Export ( _.Library.String  FileName,
_.Library.Integer  NumExported,
_.Library.String  Types,
_.Library.String  NamesFrom,
_.Library.String  NamesTo 
)
static

Exports Table Objects to a file in xml format.



Parameters:
FileName - Output file name NumExported (byref) - Returns number of Table records exported. Tables - Comma separated list of Tables to export, "*" = All

◆ ExportAllToNls()

_.Library.Status ExportAllToNls ( _.Library.Integer  NumExported,
_.Library.Integer  Deep 
)
static

Exports all Table records to ^nls.



Parameters:

  • Return values: Status
  • NumExported - Number of exported tables

◆ ExportDir()

_.Library.Status ExportDir ( _.Library.String  Dir,
_.Library.Integer  NumExported,
_.Library.String  Types,
_.Library.String  NamesFrom,
_.Library.String  NamesTo 
)
static

Exports Table Objects to separate xml files.



Parameters:
Dir - Directory where the files will be created NumExported (byref) - Returns number of Table records exported. Types/NamesFrom/NamesTo - Comma separated list of Tables to export, "*" = All

◆ ExportList()

_.Library.Status ExportList ( _.Library.String  FileName,
_.Library.Integer  NumExported,
_.Library.String  Tables 
)
static

Similar to Export() but uses a list of Tables to export rather than a.

query. Used internally by Locales.ExportList() and other utilities.

Parameters:

  • FileName - Output file name
  • NumExported - Number of exported SubTables [out]
  • Tables - Array of Tables to export

◆ ExportToNls()

_.Library.Status ExportToNls ( _.Library.String  Type,
_.Library.String  NameFrom,
_.Library.String  NameTo,
_.Library.Integer  Deep 
)
static

Exports one Table record to ^nls.



Parameters:

  • Type - Table type (eg: "LowerCase", "COL", "XLT", etc.)
  • NameFrom - Source character set (eg: "Unicode", "CP1250", "DTM-J", "etc.)</li> <li>NameTo - Target character set (eg: "Unicode", "CP1251", "Latin2", etc.)
  • Deep - If true export associated SubTable(s)

◆ FromToDeleteRow()

_.Library.Status FromToDeleteRow ( _.Library.String  Type,
_.Library.String  NameFrom,
_.Library.String  NameTo,
_.Library.String  FromCode 
)
static

Deletes a single row in a "FromTo" table (XLT, COL or Case).



Parameters:

  • Type - Table type (eg: "LowerCase", "COL", "XLT")
  • NameFrom - Source character set (eg: "Unicode", "CP1250", "DTM-J", "etc.)</li> <li>NameTo - Target character set (eg: "Unicode", "CP1251", "Latin2", etc.)
  • FromCode - Source character or sequence

◆ FromToEditRow()

_.Library.Status FromToEditRow ( _.Library.String  Type,
_.Library.String  NameFrom,
_.Library.String  NameTo,
_.Library.String  FromCode,
_.Library.String  ToCode 
)
static

Edits a single row in a "FromTo" table (XLT, COL or Case).



Parameters:

  • Type - Table type (eg: "LowerCase", "COL", "XLT")
  • NameFrom - Source character set (eg: "Unicode", "CP1250", "DTM-J", "etc.)</li> <li>NameTo - Target character set (eg: "Unicode", "CP1251", "Latin2", etc.)
  • FromCode - Source character or sequence
  • ToCode - Target character or sequence

◆ Get()

_.Library.Status Get ( _.Library.String  Type,
_.Library.String  NameFrom,
_.Library.String  NameTo,
_.Library.String  Properties 
)
static

Gets a Table's properties from the NLS database.



Parameters:

  • Name - Name of the Table to get
  • Properties - Array of properties. See the Create() method for a full list

◆ GetPropertiesFromNls()

_.Library.Status GetPropertiesFromNls ( _.Library.String  Type,
_.Library.String  NameFrom,
_.Library.String  NameTo,
_.Library.String  Properties,
_.Library.String  Ref 
)
static

Gets a Table's properties from the ^nls global.



Parameters:

  • Type - Type of table ("XLT", "COL", etc.)
  • From - Source character set ("Latin1", "Unicode", etc)
  • To - Destination character set
  • Properties - Reference to array where properties will be stored
  • Ref - Source global reference

See the Create method for more information on properties returned

◆ Import()

_.Library.Status Import ( _.Library.String  FileName,
_.Library.Integer  NumImported,
_.Library.Integer  Flags 
)
static

Imports Table records from an xml file.



Parameters:

  • FileName - Filename to import Table records from
  • NumImported (byref) - Returns number of records imported
  • Flags - Control import
    • Bit 0 - Do not import records, just return count

Note: On failure, no records will be imported

◆ ImportAllFromNls()

_.Library.Status ImportAllFromNls ( _.Library.Integer  NumImported,
_.Library.Integer  Flags,
_.Library.Integer  Deep,
_.Library.String  Ref 
)
static

Imports Table records from ^nls.



Parameters:

  • NumImported (byref) - Returns number of records imported
  • Flags - Control import
    • Bit 0 - Do not import records, just return count
  • Ref - Source global reference

◆ ImportDir()

_.Library.Status ImportDir ( _.Library.String  Dir,
_.Library.String  NumImported,
_.Library.Boolean  forcemulticompile 
)
static

Imports table files from a directory.



Parameters:

  • Dir - Directory to import NLS files from
  • NumImported (byref) - Returns number of tables imported.

◆ ImportFromNls()

_.Library.Status ImportFromNls ( _.Library.String  Type,
_.Library.String  NameFrom,
_.Library.String  NameTo,
_.Library.Integer  Deep,
_.Library.String  Ref 
)
static

Imports one Table record from ^nls.



Parameters:

  • Type - Table type (eg: "LowerCase", "COL", "XLT")
  • NameFrom - Character set or name (eg: "Unicode", "DTM-J")
  • NameTo - Character set or name (eg: "Unicode", "DTM-J")
  • Deep - If true also import associated SubTables
  • Ref - Source global reference

◆ IsLoadable()

_.Library.Boolean IsLoadable ( _.Library.String  Type,
_.Library.String  NameFrom,
_.Library.String  NameTo,
_.Library.ObjectHandle  Table,
_.Library.String  Errors 
)
static

Verifies whether a table can be loaded<br>

Parameters:

  • Type - Table type (eg: "LowerCase", "COL", "XLT")
  • NameFrom - Character set or name (eg: "Unicode", "DTM-J")
  • NameTo - Character set or name (eg: "Unicode", "DTM-J")
  • Table - Returned Table reference
  • Errors - Returned list of errors

Returns: True if table has been compiled and can be loaded
False otherwise

◆ IsValid()

_.Library.Boolean IsValid ( _.Library.String  Type,
_.Library.String  NameFrom,
_.Library.String  NameTo,
_.Library.String  Errors,
_.Library.String  Warnings 
)
static

Verifies validity of table<br>

Parameters:

  • Type - Table type (eg: "LowerCase", "COL", "XLT")
  • NameFrom - Character set or name (eg: "Unicode", "DTM-J")
  • NameTo - Character set or name (eg: "Unicode", "DTM-J")
  • Errors - Returned list of errors

Warnings - Returned list of warnings Returns: True if the table has a consistent definition
False otherwise

◆ Load()

_.Library.Status Load ( _.Library.String  loc,
_.Library.String  typ,
_.Library.String  nam 
)
static

Loads a Table from a Locale.



Parameters:

  • loc - Name of locale that contains table (eg: "jpnw")
  • typ - Type of table (eg: "XLT", "UpperCase", "XY")
  • nam - Name of table in locale (eg: "CP1252", "UnicodeBig")

If typ="COL" or typ="XLT", loads both input and output sides.
If loc = current locale, changes defaults if necessary

◆ Modify()

_.Library.Status Modify ( _.Library.String  Type,
_.Library.String  NameFrom,
_.Library.String  NameTo,
_.Library.String  Properties 
)
static

Modifies an existing Table's properties in the NLS database.



Parameters:

  • Type - Table type (eg: "LowerCase", "COL", "XLT", etc.)
  • NameFrom - Source character set (eg: "Unicode", "CP1250", "DTM-J", "etc.)</li> <li>NameTo - Target character set (eg: "Unicode", "CP1251", "Latin2", etc.)
  • Properties - Array of properties to modify.

See the Create() method for a description of the Properties parameter.
If a specific property is not passed in the properties array, or is the same as the existing value, the value is not modified.

◆ SetPropertiesToNls()

_.Library.Status SetPropertiesToNls ( _.Library.String  Properties)
static

Sets a Table's properties in ^nls.



Parameters:

  • Properties - Array with locale properties

Member Data Documentation

◆ COLRules

COLRules

For Collation tables only.


$LB(collation #,local encoding rule,global encoding rule)  

◆ Description

Description

Description of the Table.


 

◆ Identifiers

Identifiers

For Identifier tables only.


$LB("start:num","start:num",...)
 

◆ Modes

Modes

For Mode tables only.


array({mode-index})="mode-name:mode-bytes:mode-seq"
 

◆ NameFrom

NameFrom

For XLT tables this corresponds to the source encoding or.

character set. For the other types this is the character set used by the current locale.  

◆ NameTo

NameTo

For XLT tables this corresponds to the target encoding or.

character set. For the other types is is usually the name of the table.  

◆ PatAliases

PatAliases

For Patcode tables only.


$LB("alias:codes","alias:codes",...)
 

◆ PatCodes

PatCodes

For Patcode tables only.


$LB("code:num","code:num",...)
 

◆ PatternRanges

PatternRanges

For pattern tables only.


array("A")=$LB("start:num","start:num",...)
 

◆ SubTableName

SubTableName

For LowerCase, UpperCase, TitleCase, XLT, COL and Pattern tables.

 

◆ Type

Type

Type of table:

Lowercase, UpperCase, TitleCase,
XLT, COL, Mode, Pattern, Ident, XY, Patcode
 

◆ XLTDefaultAction

XLTDefaultAction

For XLT tables only.


XLT Default actions:
0 - Generate error
1 - Replace with replacement string/value
2 - Replace with original string/value (ignore)
 

◆ XLTModeTableName

XLTModeTableName

For XLT modal tables only.


XLT Name of mode table.
 

◆ XLTReplacementValue

XLTReplacementValue

For XLT tables only.


XLT Replacement value.
 

◆ XLTReversibility

XLTReversibility

For XLT tables only.


XLT Reversibility:
0 - Non-reversible (ambiguous)
1 - Reversible
2 - Generated from a reversible table
 

◆ XLTType

XLTType

For XLT tables only.


XLT Table type:
0 - Non-modal to non-modal
1 - Non-modal to modal
2 - Modal to modal
 

◆ XYActions

XYActions

For XY table only.


array({xytype})=$LB("start:num","start:num",...)
xytype:
0 - Normal printing character
1 - Full width character
2 - Non printing character
3 - Backspace character
4 - Line feed character
5 - Form feed character
6 - Carriage return character
7 - Escape sequence character