interface iAttributes {
    asObject: object;
    asString: string;
    attrs: iAttribute[];
    count: number;
    SetFromEval(attr): void;
    add(attr, ignoreGroup?, newOnly?): void;
    addVal(pName, pValue, pGroup?): void;
    asArray(nameList, group?): object;
    attrVal(attrName, group?): iAttrVal;
    clear(): void;
    copyAttributeGroup(attrs, group?): void;
    deleteAttribute(name, group?): void;
    deleteGroup(group): void;
    firstFromGroup(group): iAttribute;
    get(attrName, group?): iAttribute;
    getIDsForWhere(): string;
    processAttributes(startAttr, dataObj, lang): void;
}

Properties

asObject: object

Converts all attributes to object Used only for fEval method Thanks to this method attributes can be updated using structure:

Example

attr._a.addVal(<attributeName>, <attributeValue>)
asString: string
attrs: iAttribute[]
count: number

Count of attributes

Methods

  • Converts values from evaluation back to the attributes

    Warning: Used only for fEval method

    Parameters

    • attr: object

    Returns void

    Pararm

    Attr

    object with attribuets create by asObject function

  • Add atribute to the list of attributes. Changes value of existintg atrribute, if there is alrady attributes of the given name and group

    • Important: Passed attributes are put to the list od attributes. By default it does not create a new instance of them - be carefull about that! User copyAttributes if copy requested

    Parameters

    • attr: iAttribute | iAttribute[]

      single attribute or list of attributes, if list provided, each attribute is copied

    • Optional ignoreGroup: boolean

      optional, if true attribute is searched only by name and the group is disregarded; however updated attribute always has group

    • Optional newOnly: boolean

      default false; when true, only those attributes that are not in the current set are added. those that are already in set are not updated

    Returns void

  • Simple way to add new value as a fceParam Intended to be used in json-defined scrips

    Parameters

    Returns void

    Example

    attr._a.addVal('title', obj.name)
    
  • Creates and array from the attribute values

    Parameters

    • nameList: string[]

      optional list of names if set, only attributes from list are copies to the array

    • Optional group: AttrGroup

      optional group name; if set only attributes from the group are copied

    Returns object

    copied values

  • Returns value of the attributes if attribute is available or undefined if not Verifies srings and converts them to the number or bool values

    Parameters

    Returns iAttrVal

  • Clears all attributes

    Returns void

  • Add all attributes from a single group

    • If group makes no sense (copy all), use add
    • Makes real copy - i.e. crates new instance of each attribute from the group

    Parameters

    • attrs: iAttributes

      from when (source) are copies

    • Optional group: AttrGroup

      name of the group to copy. If not defined all attributes are copied

    Returns void

  • Delete attribute, if exists

    Parameters

    Returns void

  • Delete all attributes of the group

    Parameters

    Returns void

  • Parameters

    • group: string

    Returns iAttribute

  • from the list of attributes returns attribute of the requested name, if that is available return undefined iff not available

    If some attributes have no group defined, function accepts them for any group. It allows json command definition simpler. But be carefull that those parameters are not managed within the group operations. It also fulfill the group of the attribute if that is not defined to make the next part of the provessing standard

    Attribute names are not case sensitive

    Parameters

    Returns iAttribute

  • Returns string for were command from IDs group

    Returns string

  • Evaluates attributes in the command

    Parameters

    Returns void

    Example

    attr.listVal replaces to the value of the listVal attribute