lookup (library)

Author(s): Göran Smedbäck.

Documentation on exports

PREDICATE

Usage: create_proto_element(Interface,Definition,Proto)

  • Description: The predicate will construct a proto structure containing the interface and the definition.
  • Call and exit should be compatible with:
    (basic_props:term/1)Interface is any term.
    (basic_props:term/1)Definition is any term.
    (basic_props:term/1)Proto is any term.
  • The following properties should hold at call time:
    (term_typing:nonvar/1)Interface is currently a term which is not a free variable.
    (term_typing:nonvar/1)Definition is currently a term which is not a free variable.
    (term_typing:var/1)Proto is a free variable.

PREDICATE

Usage: get_prototype_interface(Proto,Interface)

  • Description: The predicate will return the interface from a proto structure.
  • Call and exit should be compatible with:
    (basic_props:term/1)Proto is any term.
    (basic_props:term/1)Interface is any term.
  • The following properties should hold at call time:
    (term_typing:nonvar/1)Proto is currently a term which is not a free variable.
    (term_typing:var/1)Interface is a free variable.

PREDICATE

Usage: get_prototype_definition(Proto,Definition)

  • Description: The predicate will return the definition from a proto structure.
  • Call and exit should be compatible with:
    (basic_props:term/1)Proto is any term.
    (basic_props:term/1)Definition is any term.
  • The following properties should hold at call time:
    (term_typing:nonvar/1)Proto is currently a term which is not a free variable.
    (term_typing:var/1)Definition is a free variable.

PREDICATE

Usage: lookup_check_node(ParseIn,NodeTypeId,L,T)

  • Description: The predicate will check so that the node is of an acceptable type. If the node name is not found in the ordinary dictionary then the secondary dictionary is consulted, the personal one. Then the node have to be a Prototype, Externproto or a Defined one.
  • Call and exit should be compatible with:
    (field_value:parse/1)field_value:parse(ParseIn)
    (basic_props:atm/1)NodeTypeId is an atom.
    (basic_props:list/1)L is a list.
    (basic_props:list/1)T is a list.
  • The following properties should hold at call time:
    (term_typing:nonvar/1)ParseIn is currently a term which is not a free variable.
    (term_typing:nonvar/1)NodeTypeId is currently a term which is not a free variable.

PREDICATE

Usage: lookup_check_field(ParseIn,ParseOut,NodeTypeId,Field,L,T)

  • Description: The predicate will create some output through the DCG and the output command out/3. There will be formatting and the most important part there will be a check of the field type and of its values so that they correspond to the type.
  • Call and exit should be compatible with:
    (field_value:parse/1)field_value:parse(ParseIn)
    (field_value:parse/1)field_value:parse(ParseOut)
    (basic_props:atm/1)NodeTypeId is an atom.
    (basic_props:term/1)Field is any term.
    (basic_props:list/1)L is a list.
    (basic_props:list/1)T is a list.
  • The following properties should hold at call time:
    (term_typing:nonvar/1)ParseIn is currently a term which is not a free variable.
    (term_typing:var/1)ParseOut is a free variable.
    (term_typing:nonvar/1)NodeTypeId is currently a term which is not a free variable.
    (term_typing:nonvar/1)Field is currently a term which is not a free variable.

PREDICATE

Usage: lookup_check_interface_fieldValue(ParseIn,ParseOut,AccessType,FieldType,Id,FieldValue,DCGIn,DCGOut)

  • Description: The predicate formats the output for the interface part of the prototype. It also checks the values for the fields.
  • Call and exit should be compatible with:
    (field_value:parse/1)field_value:parse(ParseIn)
    (field_value:parse/1)field_value:parse(ParseOut)
    (basic_props:atm/1)AccessType is an atom.
    (basic_props:term/1)FieldType is any term.
    (basic_props:atm/1)Id is an atom.
    (basic_props:term/1)FieldValue is any term.
    (basic_props:string/1)DCGIn is a string (a list of character codes).
    (basic_props:string/1)DCGOut is a string (a list of character codes).
  • The following properties should hold at call time:
    (term_typing:nonvar/1)ParseIn is currently a term which is not a free variable.
    (term_typing:var/1)ParseOut is a free variable.
    (term_typing:nonvar/1)AccessType is currently a term which is not a free variable.
    (term_typing:nonvar/1)FieldType is currently a term which is not a free variable.
    (term_typing:nonvar/1)Id is currently a term which is not a free variable.
    (term_typing:nonvar/1)FieldValue is currently a term which is not a free variable.

PREDICATE

Usage: lookup_field(Parse,FieldTypeId,FieldId0,FieldId1)

  • Description: The predicate will control that the two connected Fields are of the same type, e.g., SFColor - SFColor, MFVec3f - MFVec3f.
  • Call and exit should be compatible with:
    (field_value:parse/1)field_value:parse(Parse)
    (basic_props:atm/1)FieldTypeId is an atom.
    (basic_props:atm/1)FieldId0 is an atom.
    (basic_props:atm/1)FieldId1 is an atom.
  • The following properties should hold at call time:
    (term_typing:nonvar/1)Parse is currently a term which is not a free variable.
    (term_typing:nonvar/1)FieldTypeId is currently a term which is not a free variable.
    (term_typing:nonvar/1)FieldId0 is currently a term which is not a free variable.
    (term_typing:nonvar/1)FieldId1 is currently a term which is not a free variable.

PREDICATE

Usage: lookup_route(Parse,NodeTypeId0,FieldId0,NodeTypeId1,FieldId1)

  • Description: The predicate will check the routing behaviour for two given fields. They will be checked according to the binding rules, like name changes access proporties. The node types for the field must of course be given for the identification.
  • Call and exit should be compatible with:
    (field_value:parse/1)field_value:parse(Parse)
    (basic_props:atm/1)NodeTypeId0 is an atom.
    (basic_props:atm/1)FieldId0 is an atom.
    (basic_props:atm/1)NodeTypeId1 is an atom.
    (basic_props:atm/1)FieldId1 is an atom.
  • The following properties should hold at call time:
    (term_typing:nonvar/1)Parse is currently a term which is not a free variable.
    (term_typing:nonvar/1)NodeTypeId0 is currently a term which is not a free variable.
    (term_typing:nonvar/1)FieldId0 is currently a term which is not a free variable.
    (term_typing:nonvar/1)NodeTypeId1 is currently a term which is not a free variable.
    (term_typing:nonvar/1)FieldId1 is currently a term which is not a free variable.

PREDICATE

Usage: lookup_fieldTypeId(FieldTypeId)

  • Description: The predicate just make a check to see if the given FieldType id is among the allowed. You can not construct own ones and the check is mearly a spellcheck.
  • Call and exit should be compatible with:
    (basic_props:atm/1)FieldTypeId is an atom.
  • The following properties should hold at call time:
    (term_typing:nonvar/1)FieldTypeId is currently a term which is not a free variable.

PREDICATE

Usage: lookup_get_fieldType(Parse,NodeTypeId,FieldId,FieldType)

  • Description: The predicate will return the given field's type. It will start the search in the ordinar dictionary and then to the personal dictionary sarting off with 'PROTO'. After it will go for 'DEF' and 'EXTERNPROTO'.
  • Call and exit should be compatible with:
    (field_value:parse/1)field_value:parse(Parse)
    (basic_props:atm/1)NodeTypeId is an atom.
    (basic_props:atm/1)FieldId is an atom.
    (basic_props:atm/1)FieldType is an atom.
  • The following properties should hold at call time:
    (term_typing:nonvar/1)Parse is currently a term which is not a free variable.
    (term_typing:nonvar/1)NodeTypeId is currently a term which is not a free variable.
    (term_typing:nonvar/1)FieldId is currently a term which is not a free variable.
    (term_typing:var/1)FieldType is a free variable.

PREDICATE

Usage: lookup_field_access(Parse,NodenameId,FieldId,FieldId)

  • Description: The predicate will control that the access proporties are correct according to the certain rules that we have. It makes a check to see if the fields are of the same access type or if one of them is an exposedField. It is not doing a route check up to control that behaviour entirely.
  • Call and exit should be compatible with:
    (field_value:parse/1)field_value:parse(Parse)
    (basic_props:atm/1)NodenameId is an atom.
    (basic_props:atm/1)FieldId is an atom.
    (basic_props:atm/1)FieldId is an atom.
  • The following properties should hold at call time:
    (term_typing:nonvar/1)Parse is currently a term which is not a free variable.
    (term_typing:nonvar/1)NodenameId is currently a term which is not a free variable.
    (term_typing:nonvar/1)FieldId is currently a term which is not a free variable.
    (term_typing:nonvar/1)FieldId is currently a term which is not a free variable.

PREDICATE

Usage: lookup_set_def(Parse,Name,Node)

  • Description: The predicate will enter a new post in the personal dictionary for the node definition.
  • Call and exit should be compatible with:
    (field_value:parse/1)field_value:parse(Parse)
    (basic_props:atm/1)Name is an atom.
    (basic_props:term/1)Node is any term.
  • The following properties should hold at call time:
    (term_typing:nonvar/1)Parse is currently a term which is not a free variable.
    (term_typing:nonvar/1)Name is currently a term which is not a free variable.
    (term_typing:nonvar/1)Node is currently a term which is not a free variable.

PREDICATE

Usage: lookup_set_prototype(Parse,Name,Interface,Definition)

  • Description: The predicate will insert the prototype definition in the personal dictionary and will give a warning if there is a multiple name given.
  • Call and exit should be compatible with:
    (field_value:parse/1)field_value:parse(Parse)
    (basic_props:atm/1)Name is an atom.
    (basic_props:term/1)Interface is any term.
    (basic_props:term/1)Definition is any term.
  • The following properties should hold at call time:
    (term_typing:nonvar/1)Parse is currently a term which is not a free variable.
    (term_typing:nonvar/1)Name is currently a term which is not a free variable.
    (term_typing:nonvar/1)Interface is currently a term which is not a free variable.
    (term_typing:nonvar/1)Definition is currently a term which is not a free variable.

PREDICATE

Usage: lookup_set_extern_prototype(Parse,Name,Interface,Strings)

  • Description: The predicate will insert the external prototype definition in the personal dictionary and will give a warning if there is a multiple name given.
  • Call and exit should be compatible with:
    (field_value:parse/1)field_value:parse(Parse)
    (basic_props:atm/1)Name is an atom.
    (basic_props:term/1)Interface is any term.
    (basic_props:term/1)Strings is any term.
  • The following properties should hold at call time:
    (term_typing:nonvar/1)Parse is currently a term which is not a free variable.
    (term_typing:nonvar/1)Name is currently a term which is not a free variable.
    (term_typing:nonvar/1)Interface is currently a term which is not a free variable.
    (term_typing:nonvar/1)Strings is currently a term which is not a free variable.