class xr_occ_iter_flags¶
Flag class: properties for xr_occurrence_iterator and xr_homonym_iterator iterators.
xr_occ_iter_flags Members¶
| Constructors | none |
| Static Method | from_integer() |
| Methods | __and__(), __cmp__(), __eq__(), __ge__(), __gt__(), __hash__(), __invert__(), __le__(), __lt__(), __ne__(), __or__(), __repr__(), __str__(), as_integer(), name() |
| Attributes | DONTCARE_COMPLETE, DONTCARE_DEF_OR_COMPLETE, DROP_LIBMODEL_DEFS, DROP_LIBMODEL_OCCS, NONE, POPULATE_COUNTERS |
xr_occ_iter_flags Details¶
-
class
cs.xr_occ_iter_flags¶ Flag class: properties for
xr_occurrence_iteratorandxr_homonym_iteratoriterators.-
static
from_integer(_inner)¶ Construct an instance from an integer representation.
Parameters: _inner (int) – The integer representation, as returned by xr_occ_iter_flags.as_integer().Return type: xr_occ_iter_flagsRaises: result.ERROR_INVALID_ARGUMENTif_inneris not a valid integer representation for axr_occ_iter_flagsinstance.Invariant: For
xr_occ_iter_flagsx, xr_occ_iter_flags.from_integer(x.as_integer()) == x>>> xoi = (xr_occ_iter_flags.POPULATE_COUNTERS | xr_occ_iter_flags.DONTCARE_COMPLETE).as_integer() >>> xoi 20 >>> xr_occ_iter_flags.from_integer(xoi) <cs.xr_occ_iter_flags dontcare_complete|populate_counters>
-
__and__(b)¶ AND operator for
xr_occ_iter_flags.Parameters: b ( xr_occ_iter_flags) – AND operand.Return type: xr_occ_iter_flagsReturns: A xr_occ_iter_flagsobject containing all flags that are in bothselfandb.>>> xr_occ_iter_flags.NONE & xr_occ_iter_flags.DROP_LIBMODEL_DEFS <cs.xr_occ_iter_flags none>
-
__cmp__(other)¶ Comparison function for
xr_occ_iter_flags, with respect to a stable overall ordering.Parameters: other ( xr_occ_iter_flags) – Thexr_occ_iter_flagsobject to compare against.Return type: int Returns: An integer N such that: - N==0 if the two objects compare equal
- N<0 if
self< other - N>0 if
self> other
>>> xr_occ_iter_flags.DROP_LIBMODEL_DEFS.__cmp__(xr_occ_iter_flags.NONE) 1
-
__eq__(b)¶ Equality operator for
xr_occ_iter_flags.Parameters: b ( xr_occ_iter_flags) – Thexr_occ_iter_flagsobject to compare against.Return type: bool Returns: Trueifselfandbcompare equal,Falseotherwise.>>> xr_occ_iter_flags.DONTCARE_COMPLETE == xr_occ_iter_flags.DROP_LIBMODEL_DEFS False
-
__ge__(b)¶ Greater-than-or-equal operator for
xr_occ_iter_flags.Parameters: b ( xr_occ_iter_flags) – Thexr_occ_iter_flagsobject to compare against.Return type: bool Returns: Trueifself>=b,Falseotherwise.>>> xr_occ_iter_flags.NONE >= xr_occ_iter_flags.DONTCARE_COMPLETE False
-
__gt__(b)¶ Greater-than operator for
xr_occ_iter_flags.Parameters: b ( xr_occ_iter_flags) – Thexr_occ_iter_flagsobject to compare against.Return type: bool Returns: Trueifself>b,Falseotherwise.>>> xr_occ_iter_flags.DONTCARE_COMPLETE > xr_occ_iter_flags.NONE True
-
__hash__()¶ Hash function for
xr_occ_iter_flags.Return type: int >>> hash(xr_occ_iter_flags.DROP_LIBMODEL_DEFS) 1
-
__invert__()¶ Complementation operator.
Return type: xr_occ_iter_flagsReturns: A xr_occ_iter_flagsobject containing the flags that are NOT contained inself.>>> ~xr_occ_iter_flags.DONTCARE_COMPLETE <cs.xr_occ_iter_flags drop_libmodel_defs|drop_libmodel_occs|dontcare_def_or_complete|populate_counters>
-
__le__(b)¶ Less-than-or-equal operator for
xr_occ_iter_flags.Parameters: b ( xr_occ_iter_flags) – Thexr_occ_iter_flagsobject to compare against.Return type: bool Returns: Trueifself<=b,Falseotherwise.>>> xr_occ_iter_flags.DROP_LIBMODEL_DEFS <= xr_occ_iter_flags.DONTCARE_COMPLETE True
-
__lt__(b)¶ Less-than operator for
xr_occ_iter_flags.Parameters: b ( xr_occ_iter_flags) – Thexr_occ_iter_flagsobject to compare against.Return type: bool Returns: Trueifself<b,Falseotherwise.>>> xr_occ_iter_flags.NONE < xr_occ_iter_flags.DROP_LIBMODEL_OCCS True
-
__ne__(b)¶ Inequality operator for
xr_occ_iter_flags.Parameters: b ( xr_occ_iter_flags) – Thexr_occ_iter_flagsobject to compare against.Return type: bool Returns: Falseifselfandbcompare equal,Trueotherwise.>>> xr_occ_iter_flags.NONE != xr_occ_iter_flags.DROP_LIBMODEL_OCCS True
-
__or__(b)¶ OR operator for
xr_occ_iter_flags.Parameters: b ( xr_occ_iter_flags) – OR operand.Return type: xr_occ_iter_flagsReturns: A xr_occ_iter_flagsobject containing all flags that are in at least one ofself,b.>>> xr_occ_iter_flags.DROP_LIBMODEL_OCCS | xr_occ_iter_flags.NONE <cs.xr_occ_iter_flags drop_libmodel_occs>
-
__repr__()¶ Get a representation of a
xr_occ_iter_flagsobject that includes information useful for debugging.Return type: str Returns: The string representation. >>> repr(xr_occ_iter_flags.NONE) '<cs.xr_occ_iter_flags none>'
-
__str__()¶ Get a simple string representation of a
xr_occ_iter_flagsobject.Return type: str Returns: The string representation. >>> str(xr_occ_iter_flags.DROP_LIBMODEL_DEFS) 'drop_libmodel_defs'
-
as_integer()¶ Get an integer representation of
self.Return type: int Returns: An integer suitable for use with xr_occ_iter_flags.from_integer().Invariant: For
xr_occ_iter_flagsx, xr_occ_iter_flags.from_integer(x.as_integer()) == x>>> xoi = (xr_occ_iter_flags.POPULATE_COUNTERS | xr_occ_iter_flags.DONTCARE_COMPLETE).as_integer() >>> xoi 20 >>> xr_occ_iter_flags.from_integer(xoi) <cs.xr_occ_iter_flags dontcare_complete|populate_counters>
-
name()¶ Get the name of a
xr_occ_iter_flagsobject.Return type: str >>> xr_occ_iter_flags.DROP_LIBMODEL_DEFS.name() 'drop_libmodel_defs'
-
DONTCARE_COMPLETE¶ Singleton set containing the “don’t care about completeness” flag: if two tuples differ only in completeness, only one of the two will be returned.
>>> xr_occ_iter_flags.DONTCARE_COMPLETE <cs.xr_occ_iter_flags dontcare_complete>
-
DONTCARE_DEF_OR_COMPLETE¶ Set containing the “don’t care about definition location or completeness” flags: if two tuples differ only in completeness and/or definition location, only one of the two will be returned.
>>> xr_occ_iter_flags.DONTCARE_DEF_OR_COMPLETE <cs.xr_occ_iter_flags dontcare_complete|dontcare_def_or_complete>
-
DROP_LIBMODEL_DEFS¶ Singleton set containing the “drop library model definitions” flag: if an occurrence’s associated definition is in a library model, don’t include the occurrence in the iteration.
>>> xr_occ_iter_flags.DROP_LIBMODEL_DEFS <cs.xr_occ_iter_flags drop_libmodel_defs>
-
DROP_LIBMODEL_OCCS¶ Singleton set containing the “drop library model occurrences” flag: if an occurrence is in a library model, don’t include it in the iteration.
>>> xr_occ_iter_flags.DROP_LIBMODEL_OCCS <cs.xr_occ_iter_flags drop_libmodel_occs>
-
NONE¶ Empty set: contains no flags.
>>> xr_occ_iter_flags.NONE <cs.xr_occ_iter_flags none>
-
POPULATE_COUNTERS¶ Compute and store tuple counts for later retrieval by
xr_occurrence_iteratororxr_homonym_iteratorget_*() functions.The following are only available when this flag is specified.
xr_occurrence_iteratorfunctionsxr_occurrence_iterator.get_scanned_count(),xr_occurrence_iterator.get_unscanned_count(),xr_occurrence_iterator.get_matched_count().xr_homonym_iteratorfunctionsxr_homonym_iterator.get_scanned_count(),xr_homonym_iterator.get_unscanned_count(),xr_homonym_iterator.get_matched_count().
>>> xr_occ_iter_flags.POPULATE_COUNTERS <cs.xr_occ_iter_flags populate_counters>
-
static