Public Member Functions | |
def | add (self, value) |
def | bound_1 (self) |
def | bound_2 (self) |
def | get_hibound (self) |
def | get_hiindex (self) |
def | get_lobound (self) |
def | get_loindex (self) |
def | get_size (self) |
def | get_value_unique (self) |
Public Member Functions inherited from SCL.BaseType.Type | |
def | get_scope (self) |
def | get_type (self) |
Detailed Description
EXPRESS definition: ================== A bag data type has as its domain unordered collections of like elements. The optional lower and upper bounds, which are integer-valued expressions, define the minimum and maximum number of elements that can be held in the collection defined by a bag data type. Syntax: 170 bag_type = BAG [ bound_spec ] OF base_type . 176 bound_spec = '[' bound_1 ':' bound_2 ']' . 174 bound_1 = numeric_expression . 175 bound_2 = numeric_expression . 171 base_type = aggregation_types | simple_types | named_types . Rules and restrictions: a) The bound_1 expression shall evaluate to an integer value greater than or equal to zero. It gives the lower bound, which is the minimum number of elements that can be in a bag value of this data type. bound_1 shall not produce the indeterminate (?) value. b) The bound_2 expression shall evaluate to an integer value greater than or equal to bound_1, or an indeterminate (?) value. It gives the upper bound, which is the maximum number of elements that can be in a bag value of this data type. If this value is indeterminate (?) the number of elements in a bag value of this data type is not be bounded from above. c) If the bound_spec is omitted, the limits are [0:?]. EXAMPLE 29 (This example defines an attribute as a bag of point (where point is a named data type assumed to have been declared elsewhere). a_bag_of_points : BAG OF point; The value of the attribute named a_bag_of_points can contain zero or more points. The same point instance may appear more than once in the value of a_bag_of_points. If the value is required to contain at least one element, the specification can provide a lower bound, as in: a_bag_of_points : BAG [1:?] OF point; The value of the attribute named a_bag_of_points now must contain at least one point. Python definition: ================== @TODO
Member Function Documentation
◆ add()
def SCL.AggregationDataTypes.BAG.add | ( | self, | |
value | |||
) |
Adds a value to the bag
References SCL.AggregationDataTypes.ARRAY._bound_1, SCL.AggregationDataTypes.LIST._bound_1, SCL.AggregationDataTypes.BAG._bound_1, SCL.AggregationDataTypes.ARRAY._bound_2, SCL.AggregationDataTypes.LIST._bound_2, SCL.AggregationDataTypes.BAG._bound_2, SCL.AggregationDataTypes.ARRAY._container, SCL.AggregationDataTypes.LIST._container, SCL.AggregationDataTypes.BAG._container, SCL.AggregationDataTypes.LIST._unbounded, SCL.AggregationDataTypes.BAG._unbounded, and SCL.BaseType.Type.get_type().
◆ bound_1()
def SCL.AggregationDataTypes.BAG.bound_1 | ( | self | ) |
References SCL.AggregationDataTypes.ARRAY._bound_1, SCL.AggregationDataTypes.LIST._bound_1, and SCL.AggregationDataTypes.BAG._bound_1.
◆ bound_2()
def SCL.AggregationDataTypes.BAG.bound_2 | ( | self | ) |
References SCL.AggregationDataTypes.ARRAY._bound_2, SCL.AggregationDataTypes.LIST._bound_2, and SCL.AggregationDataTypes.BAG._bound_2.
◆ get_hibound()
def SCL.AggregationDataTypes.BAG.get_hibound | ( | self | ) |
References SCL.AggregationDataTypes.ARRAY._bound_2, SCL.AggregationDataTypes.LIST._bound_2, and SCL.AggregationDataTypes.BAG._bound_2.
◆ get_hiindex()
def SCL.AggregationDataTypes.BAG.get_hiindex | ( | self | ) |
When V is a bag, list or set, the returned value is the actual number of elements in the aggregate value.
References SCL.AggregationDataTypes.ARRAY._container, SCL.AggregationDataTypes.LIST._container, and SCL.AggregationDataTypes.BAG._container.
◆ get_lobound()
def SCL.AggregationDataTypes.BAG.get_lobound | ( | self | ) |
References SCL.AggregationDataTypes.ARRAY._bound_1, SCL.AggregationDataTypes.LIST._bound_1, and SCL.AggregationDataTypes.BAG._bound_1.
◆ get_loindex()
def SCL.AggregationDataTypes.BAG.get_loindex | ( | self | ) |
◆ get_size()
def SCL.AggregationDataTypes.BAG.get_size | ( | self | ) |
When V is a bag, list or set, the returned value is the actual number of elements in the aggregate value.
References SCL.AggregationDataTypes.ARRAY._container, SCL.AggregationDataTypes.LIST._container, and SCL.AggregationDataTypes.BAG._container.
Referenced by SCL.AggregationDataTypes.BAG.get_value_unique().
◆ get_value_unique()
def SCL.AggregationDataTypes.BAG.get_value_unique | ( | self | ) |
Return True if all items are different in the container, UNKNOWN if some items are indeterminate, or False otherwise
References SCL.AggregationDataTypes.ARRAY._container, SCL.AggregationDataTypes.LIST._container, SCL.AggregationDataTypes.BAG._container, SCL.AggregationDataTypes.ARRAY.get_size(), SCL.AggregationDataTypes.LIST.get_size(), and SCL.AggregationDataTypes.BAG.get_size().
The documentation for this class was generated from the following file:
- src/Mod/Import/App/SCL/AggregationDataTypes.py