Difference between revisions of "Extensions.DataType.EnumerationContainsValue"

From emotive
Jump to navigation Jump to search
(Edited by Ngoc Tran.)
 
(14 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{DISPLAYTITLE:OTX '''EnumerationContainsValue'''}}[[Category:DataTypes]]
+
{{DISPLAYTITLE:OTX '''EnumerationContainsValue'''}}[[Category:DataType]]
 
== Classification ==
 
== Classification ==
{{ClassificationActivity | EnumerationContainsValue | Checks if the specified enumeration contains the value | [[Term]] | [[Extensions.DataTypes|OTX DataTypes extension]] | [[EnumerationContainsValue related terms]] | - | - }}
+
{{ClassificationActivity | EnumerationContainsValue | Checks if the specified enumeration contains the value | [[Term]] | [[Extensions.DataType|OTX DataTypes extension]] | [[Extensions.DataType#Terms|EnumerationContainsValue related terms]] | - | - }}
  
 
== OTL Syntax ==
 
== OTL Syntax ==
 
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;">
 
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;">
DataTypes.EnumerationContainsValue(NumericTerm, EnumerationSignature);
+
/// Local Declarations
 +
Boolean BooleanVariable = false;
 +
/// Flow
 +
BooleanVariable = DataType.EnumerationContainsValue(NumericTerm, OtxLink);
 
</syntaxhighlight>
 
</syntaxhighlight>
  
Line 11: Line 14:
 
'''EnumerationContainsValue''' is a term to checks if the specified enumeration contains the value.
 
'''EnumerationContainsValue''' is a term to checks if the specified enumeration contains the value.
  
{{TermReturnValue| [[Extensions.Core.Boolean|Boolean]] | This value is TRUE if the specified enumeration contains the value. }}
+
{{TermReturnValue| [[Core.DataTypes.SimpleDataType.Boolean|Boolean]] | This value is TRUE if the specified enumeration contains the value. }}
  
 
== Properties ==
 
== Properties ==
Line 17: Line 20:
 
{{TableRowPropertiesHeader}}
 
{{TableRowPropertiesHeader}}
 
{{TableRowPropertie1| Value | - | [[Term]] | - | [1] | The numeric value to be checked inside the specified enumeration.}}
 
{{TableRowPropertie1| Value | - | [[Term]] | - | [1] | The numeric value to be checked inside the specified enumeration.}}
{{TableRowPropertie2| Enumeration | [[OtxLink]] | - | - | [1] | This attribute identifies the specified enumeration to check the value. The link shall point to the corresponding '''EnumerationSignature'''.}}
+
{{TableRowPropertie2| Enumeration | [[OtxLink]] | - | - | [1] | This attribute identifies the specified enumeration to check the value. The link will point to the corresponding '''EnumerationSignature'''.}}
  
 
|}
 
|}
Line 23: Line 26:
 
== OTL Examples ==
 
== OTL Examples ==
 
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;">
 
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;">
package DataTypes.EnumerationSignature EnumerationSignature1(Integer EnumerationElement1 = 7,
+
package DataType.EnumerationSignature EnumerationSignature1(Integer EnumerationElement1 = 7, Integer EnumerationElement2 = 12);
Integer EnumerationElement2 = 12);
+
 
 +
/// Global Declarations
 +
 
 
public procedure main()
 
public procedure main()
 
{
 
{
  Boolean checkEnumName;
+
        /// Local Declarations
 +
 
 +
        Boolean checkEnumValue;
 +
 
 +
        /// Flow
  
  checkName = DataTypes.EnumerationContainsValue(12, EnumerationSignature1);
+
        checkEnumValue = DataType.EnumerationContainsValue(12, EnumerationSignature1);
 
}
 
}
 
</syntaxhighlight>
 
</syntaxhighlight>
  
 
== See also ==
 
== See also ==
[[Extensions.DataTypes.EnumerationContainsName|EnumerationContainsName]] <br/>
+
[[Extensions.DataType.EnumerationContainsName|EnumerationContainsName]] <br/>
<!-- [[Extensions.DataTypes.EnumerationContainsValue|EnumerationContainsValue]] <br/> -->
+
<!-- [[Extensions.DataType.EnumerationContainsValue|EnumerationContainsValue]] <br/> -->
[[Extensions.DataTypes.EnumerationGetEntryList|EnumerationGetEntryList]] <br/>
+
[[Extensions.DataType.EnumerationGetEntryList|EnumerationGetEntryList]] <br/>
[[Extensions.DataTypes.GetEnumerationByName|GetEnumerationByName]] <br/>
+
[[Extensions.DataType.GetEnumerationByName|GetEnumerationByName]] <br/>
[[Extensions.DataTypes.GetEnumerationByValue|GetEnumerationByValue]] <br/>
+
[[Extensions.DataType.GetEnumerationByValue|GetEnumerationByValue]] <br/>
[[Extensions.DataTypes.StructureCopy|StructureCopy]] <br/>
+
[[Extensions.DataType.StructureCopy|StructureCopy]] <br/>

Latest revision as of 02:57, 11 November 2019

Classification

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

OTL Syntax

/// Local Declarations
Boolean BooleanVariable = false;
/// Flow
BooleanVariable = DataType.EnumerationContainsValue(NumericTerm, OtxLink);

Description

EnumerationContainsValue is a term to checks if the specified enumeration contains the value.

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 value.

Properties

Name Data Type Class Default Cardinality Description
Value - Term - [1] The numeric value to be checked inside the specified enumeration.
Enumeration OtxLink - - [1] This attribute identifies the specified enumeration to check the value. 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 checkEnumValue;

        /// Flow

        checkEnumValue = DataType.EnumerationContainsValue(12, EnumerationSignature1);
}

See also

EnumerationContainsName
EnumerationGetEntryList
GetEnumerationByName
GetEnumerationByValue
StructureCopy