virtualnew Interpreter()
Constructor: Generates the id and initializes the (in and out) types and values.
Requires
- module:easejs
- module:MathUuid
- module:AttributeType
- module:AttributeValue
- module:AttributeTypeList
- module:AttributeValueList
- module:InterpreterDescription
Members
-
protecteddiscovererDiscoverer
-
Associated Discoverer.
-
idstring
-
Id of the Interpreter. Will be generated.
-
protectedinAttributeTypesAttributeTypeList
-
Types of all attributes that can be handled.
-
protectedinAttributeValuesAttributeValueList
-
List of the data that should be interpreted.
-
protectedlastInterpretationDate
-
Last interpretation time.
-
namestring
-
Name of the Interpreter.
-
protectedoutAttributeTypesAttributeTypeList
-
Types of all attributes that will be returned.
-
protectedoutAttributeValuesAttributeValueList
-
List of interpreted data.
Methods
-
callInterpreter(_dataToInterpret, _function)
-
Validates the data and calls interpretData.
Name Type Description _dataToInterpret
AttributeValueList Data that should be interpreted. _function
function nullable For additional actions, if an asynchronous function is used. -
protectedcanHandle(_inAtts)
-
Checks whether the specified data match the expected.
Name Type Description _inAtts
AttributeValueList Data that should be verified. -
getId(){string}
-
Returns the id of the interpreter.
-
getInAttributeTypes(){AttributeTypeList}
-
Returns the expected inAttributeTypes.
-
protectedgetInterpretedData(){AttributeValueList}
-
Returns the interpreted data.
-
virtualgetInterpreterDescription(){InterpreterDescription}
-
Returns the description of this component.
-
protectedgetLastInterpretionTime(){Date}
-
Returns the time of the last interpretation.
-
getName(){string}
-
Returns the name of the interpreter.
-
getOutAttributeTypes(){AttributeTypeList}
-
Returns the provided outAttributeTypes.
-
getType(){string}
-
Returns the type of this class, in this case "Interpreter".
-
virtual,protectedinitInAttributes()
-
Initializes the inAttributes.
-
virtual,protectedinitOutAttributes()
-
Initializes the outAttributes.
-
virtualinterpretData(_data, _function)
-
Interprets the data.
Name Type Description _data
AttributeValueList Data that should be interpreted. _function
function nullable For additional actions, if an asynchronous function is used. -
protectedisInAttribute(_attribute){boolean}
-
Verifies whether the specified attribute is contained in inAttributeList.
Name Type Description _attribute
AttributeValue Attribute that should be verified. -
protectedisOutAttribute(_attribute){boolean}
-
Verifies whether the specified attribute is contained in outAttributeList.
Name Type Description _attribute
AttributeValue Attribute that should be verified. -
register()
-
Registers the component to the associated Discoverer.
-
setDiscoverer(_discoverer)
-
Sets and registers to the associated Discoverer.
Name Type Description _discoverer
Discoverer Discoverer -
protectedsetInAttribute(_name, _type, _value, _parameter)
-
Sets an inAttribute.
Name Type Description _name
string name of the attribute _type
string type of the attribute _value
string value of the attribute _parameter
ParameterList | Array Parameter of the attribute. -
protectedsetInAttributeValues(_attributeValueList)
-
Sets an inAttributes.
Name Type Description _attributeValueList
AttributeValueList | Array Attributes to set. -
protectedsetOutAttribute(_name, _type, _value, _parameter)
-
Adds an outAttribute.
Name Type Description _name
string name of the attribute _type
string type of the attribute _value
string value of the attribute _parameter
ParameterList | Array Parameter of the attribute.