class cfg_path_node_flags¶
Flag class: characterizes a cfg_path_node .
cfg_path_node_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 | ALREADY_XML_ENCODED, CONTRIBUTES, DONT_MARK_CONTRIBUTING, ENDBOX, NEW_PATH, NONE, PRIMARY |
cfg_path_node_flags Details¶
-
class
cs.cfg_path_node_flags¶ Flag class: characterizes a
cfg_path_node.-
static
from_integer(_inner)¶ Construct an instance from an integer representation.
Parameters: _inner (int) – The integer representation, as returned by cfg_path_node_flags.as_integer().Return type: cfg_path_node_flagsRaises: result.ERROR_INVALID_ARGUMENTif_inneris not a valid integer representation for acfg_path_node_flagsinstance.Invariant: For
cfg_path_node_flagsx, cfg_path_node_flags.from_integer(x.as_integer()) == x>>> cfg_path_node_flags.from_integer(0) <cs.cfg_path_node_flags none>
-
__and__(b)¶ AND operator for
cfg_path_node_flags.Parameters: b ( cfg_path_node_flags) – AND operand.Return type: cfg_path_node_flagsReturns: A cfg_path_node_flagsobject containing all flags that are in bothselfandb.>>> cfg_path_node_flags.NONE & cfg_path_node_flags.CONTRIBUTES <cs.cfg_path_node_flags none>
-
__cmp__(other)¶ Comparison function for
cfg_path_node_flags, with respect to a stable overall ordering.Parameters: other ( cfg_path_node_flags) – Thecfg_path_node_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
>>> cfg_path_node_flags.CONTRIBUTES.__cmp__(cfg_path_node_flags.PRIMARY) 1
-
__eq__(b)¶ Equality operator for
cfg_path_node_flags.Parameters: b ( cfg_path_node_flags) – Thecfg_path_node_flagsobject to compare against.Return type: bool Returns: Trueifselfandbcompare equal,Falseotherwise.>>> cfg_path_node_flags.NEW_PATH == cfg_path_node_flags.ENDBOX False
-
__ge__(b)¶ Greater-than-or-equal operator for
cfg_path_node_flags.Parameters: b ( cfg_path_node_flags) – Thecfg_path_node_flagsobject to compare against.Return type: bool Returns: Trueifself>=b,Falseotherwise.>>> cfg_path_node_flags.NONE >= cfg_path_node_flags.NEW_PATH False
-
__gt__(b)¶ Greater-than operator for
cfg_path_node_flags.Parameters: b ( cfg_path_node_flags) – Thecfg_path_node_flagsobject to compare against.Return type: bool Returns: Trueifself>b,Falseotherwise.>>> cfg_path_node_flags.ENDBOX > cfg_path_node_flags.DONT_MARK_CONTRIBUTING False
-
__hash__()¶ Hash function for
cfg_path_node_flags.Return type: int >>> hash(cfg_path_node_flags.PRIMARY) 8
-
__invert__()¶ Complementation operator.
Return type: cfg_path_node_flagsReturns: A cfg_path_node_flagsobject containing the flags that are NOT contained inself.>>> ~cfg_path_node_flags.PRIMARY <cs.cfg_path_node_flags already_xml_encoded|endbox|dont_mark_contributing|contributes|new_path>
-
__le__(b)¶ Less-than-or-equal operator for
cfg_path_node_flags.Parameters: b ( cfg_path_node_flags) – Thecfg_path_node_flagsobject to compare against.Return type: bool Returns: Trueifself<=b,Falseotherwise.>>> cfg_path_node_flags.CONTRIBUTES <= cfg_path_node_flags.NONE False
-
__lt__(b)¶ Less-than operator for
cfg_path_node_flags.Parameters: b ( cfg_path_node_flags) – Thecfg_path_node_flagsobject to compare against.Return type: bool Returns: Trueifself<b,Falseotherwise.>>> cfg_path_node_flags.DONT_MARK_CONTRIBUTING < cfg_path_node_flags.NEW_PATH True
-
__ne__(b)¶ Inequality operator for
cfg_path_node_flags.Parameters: b ( cfg_path_node_flags) – Thecfg_path_node_flagsobject to compare against.Return type: bool Returns: Falseifselfandbcompare equal,Trueotherwise.>>> cfg_path_node_flags.CONTRIBUTES != cfg_path_node_flags.ENDBOX True
-
__or__(b)¶ OR operator for
cfg_path_node_flags.Parameters: b ( cfg_path_node_flags) – OR operand.Return type: cfg_path_node_flagsReturns: A cfg_path_node_flagsobject containing all flags that are in at least one ofself,b.>>> cfg_path_node_flags.NEW_PATH | cfg_path_node_flags.ENDBOX <cs.cfg_path_node_flags endbox|new_path>
-
__repr__()¶ Get a representation of a
cfg_path_node_flagsobject that includes information useful for debugging.Return type: str Returns: The string representation. >>> repr(cfg_path_node_flags.PRIMARY) '<cs.cfg_path_node_flags primary>'
-
__str__()¶ Get a simple string representation of a
cfg_path_node_flagsobject.Return type: str Returns: The string representation. >>> str(cfg_path_node_flags.NONE) 'none'
-
as_integer()¶ Get an integer representation of
self.Return type: int Returns: An integer suitable for use with cfg_path_node_flags.from_integer().Invariant: For
cfg_path_node_flagsx, cfg_path_node_flags.from_integer(x.as_integer()) == x>>> cfg_path_node_flags.ENDBOX.as_integer() 4
-
name()¶ Get the name of a
cfg_path_node_flagsobject.Return type: str >>> cfg_path_node_flags.DONT_MARK_CONTRIBUTING.name() 'dont_mark_contributing'
-
ALREADY_XML_ENCODED¶ Special characters such as ‘<’ and ‘>’ are already XML-escaped in the ‘problem’ string.
>>> cfg_path_node_flags.ALREADY_XML_ENCODED <cs.cfg_path_node_flags already_xml_encoded>
-
CONTRIBUTES¶ This location contributes to a warning path.
By default, code excerpts in warning reports are expanded to show contributing vertices.
>>> cfg_path_node_flags.CONTRIBUTES <cs.cfg_path_node_flags contributes>
-
DONT_MARK_CONTRIBUTING¶ This location should not be additionally highlighted in the code listing.
(Note that in some cases CodeSonar will have independently determined that the location shouldn’t be additionally highlighted.)
>>> cfg_path_node_flags.DONT_MARK_CONTRIBUTING <cs.cfg_path_node_flags dont_mark_contributing>
-
ENDBOX¶ The GUI should display an end box at this location (rather than an event box):
- Warning class name instead of event id.
- “Show: All events | Only primary events” links.
>>> cfg_path_node_flags.ENDBOX <cs.cfg_path_node_flags endbox>
-
NEW_PATH¶ This node starts a new path (that is, it is not the CFG path successor of the previous node in the list).
When you are specifying multiple paths in the path argument to the
warningclassreport()andreport_return_warning()methods that report a warning with a path, use this flag to identify the first node of each path.The typical use case is for concurrency bugs, where the code involved may not be in a single path.
>>> cfg_path_node_flags.NEW_PATH <cs.cfg_path_node_flags new_path>
-
NONE¶ Use this if you don’t want any other flags.
>>> cfg_path_node_flags.NONE <cs.cfg_path_node_flags none>
-
PRIMARY¶ The event at this location is a “primary event” and should be displayed by default in the GUI Warning Report.
Do not set this flag if you are setting
cscpnf_endbox. (End boxes are always displayed.)>>> cfg_path_node_flags.PRIMARY <cs.cfg_path_node_flags primary>
-
static