Gentee Programming Language > Documentation > GT language Download documentation

GT API methods

In order to work with GT data, you should use variables of the gt type. Such a variable is a tree of objects of the gtitem type. Each of them stores information about the corresponding object with GT data. To be able to use all these methods, you need to enable the library gt.ge from the subdirectory Lib of the Gentee installation folder.

  • Operations
  • Methods
  • Methods for working with GT objects
  • Functions

    Operations

    Operations defined for the variable of gt type are listed below. The second column contains possible statements where typename is a variable or an expression of the specified type.
     
    OperationSyntaxReturn typeComments
    +=gt += strgtAdding GT data to an existing GT object.
    foreachUsing in the foreach operator. The description of an additional variable of the gtitems type is required. The foreach operator is used for variables of the gtitem type and goes through all child items of this object.

    gtitems gtis
    ...
    foreach gtitem cur, gti.items( gtis )
    {
       ...
    }

    Methods

    gt.findFind an object
    gt.getGet the text of an object
    gt.getvalGet a numerical value
    gt.modifyModify the data of an object
    gt.processProcess a text
    gt.readRead GT data
    gt.rootRoot item

    Methods for working with GT objects

    gtitem.childGet a child object
    gtitem.delDelete an object
    gtitem.getGet the text
    gtitem.findSearching for an attribute
    gtitem.getattribGet the value of an attribute
    gtitem.getattribclearGet the value of the attribute
    gtitem.getfullnameGet the full name
    gtitem.getgtGet an object of the gt type
    gtitem.getobjAn object of the predefined type
    gtitem.gettreeitemGet a tree item
    gtitem.getvalattribThe numerical value of an attribute
    gtitem.insertProcessing and inserting data
    gtitem.ischildA check for embedded objects
    gtitem.iscommentComment or not
    gtitem.isrootWhether it is a root object
    gtitem.keyGet the value of a key
    gtitem.listGet a list item
    gtitem.listcountThe number of items in a list
    gtitem.modifyModify the data of an object
    gtitem.modifyattribModify the attribute of an object
    gtitem.modifyattribnotChange the attribute to 0 or 1
    gtitem.moveMove an object
    gtitem.nameObject name
    gtitem.parentObject owner
    gtitem.tostrConvert into a string
    gtitem.valueThe text of an object
    gtitem.valueattribThe text of an attribute

    Functions

    gttextInsert a function into the text


     Copyright © 2004-2006 Gentee Inc. All rights reserved.