Difference between revisions of "Extensions.DataType.EnumerationContainsName"

From emotive
Jump to navigation Jump to search
(Edited by Ngoc Tran.)
 
(7 intermediate revisions by one other user not shown)
Line 5: Line 5:
 
== OTL Syntax ==
 
== OTL Syntax ==
 
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;">
 
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;">
BooleanTerm = DataType.EnumerationContainsName(StringTerm, OtxLink);
+
BooleanTerm DataType.EnumerationContainsName(StringTerm name, OtxLink enumeration);
 
</syntaxhighlight>
 
</syntaxhighlight>
  
Line 17: Line 17:
 
{{TableRowPropertiesHeader}}
 
{{TableRowPropertiesHeader}}
 
{{TableRowPropertie1| Name | [[Core.DataTypes.SimpleDataType.String|String]] | [[Term]] | - | [1] | The element name to be checked inside the specified enumeration.}}
 
{{TableRowPropertie1| Name | [[Core.DataTypes.SimpleDataType.String|String]] | [[Term]] | - | [1] | The element name to be checked inside the specified enumeration.}}
{{TableRowPropertie2| Enumeration | [[OtxLink]] | - | - | [1] | This attribute identifies the specified enumeration to check the name. The link shall point to the corresponding '''EnumerationSignature'''.}}
+
{{TableRowPropertie2| Enumeration | [[OtxLink]] | - | - | [1] | This attribute identifies the specified enumeration to check the name. The link will point to the corresponding '''EnumerationSignature'''.}}
  
 
|}
 
|}
Line 24: Line 24:
 
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;">
 
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;">
 
package DataType.EnumerationSignature EnumerationSignature1(Integer EnumerationElement1 = 7, Integer EnumerationElement2 = 12);
 
package DataType.EnumerationSignature EnumerationSignature1(Integer EnumerationElement1 = 7, Integer EnumerationElement2 = 12);
 +
 +
/// Global Declarations
 +
 
public procedure main()
 
public procedure main()
 
{
 
{
  Boolean checkEnumName;
+
        /// Local Declarations
 +
 
 +
        Boolean checkEnumName;
 +
 
 +
        /// Flow
  
  checkName = DataType.EnumerationContainsName("EnumerationElement2", EnumerationSignature1);
+
        checkEnumName = DataType.EnumerationContainsName("EnumerationElement2", EnumerationSignature1);
 
}
 
}
 
</syntaxhighlight>
 
</syntaxhighlight>

Latest revision as of 02:57, 11 November 2019

Classification

Name EnumerationContainsName
Short Description Checks if the specified enumeration contains the name
Class Term
Extension OTX DataType extension
Group EnumerationContainsName related terms
Exceptions -
Checker Rules -
Standard Compliant Yes

OTL Syntax

BooleanTerm DataType.EnumerationContainsName(StringTerm name, OtxLink enumeration);

Description

EnumerationContainsName is a term to checks if the specified enumeration contains the name.

Return Value

The Term returns the value, see table below.

Icons Note.png In OTX, Terms are categorized according to its return data type!
Data Type Description
Boolean This value is TRUE if the specified enumeration contains the name.

Properties

Name Data Type Class Default Cardinality Description
Name String Term - [1] The element name to be checked inside the specified enumeration.
Enumeration OtxLink - - [1] This attribute identifies the specified enumeration to check the name. The link will point to the corresponding EnumerationSignature.

OTL Examples

package DataType.EnumerationSignature EnumerationSignature1(Integer EnumerationElement1 = 7, Integer EnumerationElement2 = 12);

/// Global Declarations

public procedure main()
{
        /// Local Declarations

        Boolean checkEnumName;

        /// Flow

        checkEnumName = DataType.EnumerationContainsName("EnumerationElement2", EnumerationSignature1);
}

See also

EnumerationContainsValue
EnumerationGetEntryList
GetEnumerationByName
GetEnumerationByValue
StructureCopy