class locations_node_flags

Flag class: describes properties of a locations_node .

locations_node_flags Details

class cs.locations_node_flags

Flag class: describes properties of a locations_node .

static from_integer(_inner)

Construct an instance from an integer representation.

Parameters:_inner (int) – The integer representation, as returned by locations_node_flags.as_integer().
Return type:locations_node_flags
Raises:result.ERROR_INVALID_ARGUMENT if _inner is not a valid integer representation for a locations_node_flags instance.

Invariant: For locations_node_flags x, locations_node_flags.from_integer(x.as_integer()) == x

>>> locations_node_flags.from_integer(28)
<cs.locations_node_flags endbox|primary|style0>
__and__(b)

AND operator for locations_node_flags .

Parameters:b (locations_node_flags) – AND operand.
Return type:locations_node_flags
Returns:A locations_node_flags object containing all flags that are in both self and b.
>>> locations_node_flags.APPLY_STYLE_TO_LINE & locations_node_flags.INTERPOLATE_STYLE
<cs.locations_node_flags none>
__cmp__(other)

Comparison function for locations_node_flags , with respect to a stable overall ordering.

Parameters:other (locations_node_flags) – The locations_node_flags object 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
>>> locations_node_flags.ENDBOX.__cmp__(locations_node_flags.DONT_MARK_CONTRIBUTING)
1
__eq__(b)

Equality operator for locations_node_flags .

Parameters:b (locations_node_flags) – The locations_node_flags object to compare against.
Return type:bool
Returns:True if self and b compare equal, False otherwise.
>>> locations_node_flags.ENDBOX == locations_node_flags.PRIMARY
False
__ge__(b)

Greater-than-or-equal operator for locations_node_flags .

Parameters:b (locations_node_flags) – The locations_node_flags object to compare against.
Return type:bool
Returns:True if self >= b , False otherwise.
>>> locations_node_flags.ENDBOX >= locations_node_flags.PRIMARY
False
__gt__(b)

Greater-than operator for locations_node_flags .

Parameters:b (locations_node_flags) – The locations_node_flags object to compare against.
Return type:bool
Returns:True if self > b , False otherwise.
>>> locations_node_flags.ENDBOX > locations_node_flags.PRIMARY
False
__hash__()

Hash function for locations_node_flags .

Return type:int
>>> hash(locations_node_flags.ENDBOX)
4
__invert__()

Complementation operator.

Return type:locations_node_flags
Returns:A locations_node_flags object containing the flags that are NOT contained in self.
>>> ~locations_node_flags.ENDBOX
<cs.locations_node_flags already_xml_encoded|dont_mark_contributing|primary|style0|style1|style2|style3|alternate_interesting|interpolate_style|apply_style_to_line>
__le__(b)

Less-than-or-equal operator for locations_node_flags .

Parameters:b (locations_node_flags) – The locations_node_flags object to compare against.
Return type:bool
Returns:True if self <= b , False otherwise.
>>> locations_node_flags.DONT_MARK_CONTRIBUTING <= locations_node_flags.PRIMARY
True
__lt__(b)

Less-than operator for locations_node_flags .

Parameters:b (locations_node_flags) – The locations_node_flags object to compare against.
Return type:bool
Returns:True if self < b , False otherwise.
>>> locations_node_flags.DONT_MARK_CONTRIBUTING < locations_node_flags.ENDBOX
True
__ne__(b)

Inequality operator for locations_node_flags .

Parameters:b (locations_node_flags) – The locations_node_flags object to compare against.
Return type:bool
Returns:False if self and b compare equal, True otherwise.
>>> locations_node_flags.ENDBOX != locations_node_flags.PRIMARY
True
__or__(b)

OR operator for locations_node_flags .

Parameters:b (locations_node_flags) – OR operand.
Return type:locations_node_flags
Returns:A locations_node_flags object containing all flags that are in at least one of self, b.
>>> locations_node_flags.ENDBOX | locations_node_flags.APPLY_STYLE_TO_LINE
<cs.locations_node_flags endbox|apply_style_to_line>
__repr__()

Get a representation of a locations_node_flags object that includes information useful for debugging.

Return type:str
Returns:The string representation.
>>> repr(locations_node_flags.STYLE1)
'<cs.locations_node_flags style1>'
__str__()

Get a simple string representation of a locations_node_flags object.

Return type:str
Returns:The string representation.
>>> str(locations_node_flags.INTERPOLATE_STYLE)
'interpolate_style'
as_integer()

Get an integer representation of self.

Return type:int
Returns:An integer suitable for use with locations_node_flags.from_integer().

Invariant: For locations_node_flags x, locations_node_flags.from_integer(x.as_integer()) == x

>>> locations_node_flags.STYLE2.as_integer()
64
name()

Get the name of a locations_node_flags object.

Return type:str
>>> locations_node_flags.DONT_MARK_CONTRIBUTING.name()
'dont_mark_contributing'
ALREADY_XML_ENCODED

Singleton set containing the “already XML encoded” flag: special characters such as ‘<’ and ‘>’ are already XML-escaped in the ‘problem’ string.

>>> locations_node_flags.ALREADY_XML_ENCODED
<cs.locations_node_flags already_xml_encoded>
ALTERNATE_INTERESTING

Singleton set containing the “alternate interesting” flag: this location should be rendered in the “alternate interesting” style, which is less eye-catching than the “super interesting” style used for actual errors.

This style is suitable for strong supporting evidence for a warning which is not, itself, incorrect.

>>> locations_node_flags.ALTERNATE_INTERESTING
<cs.locations_node_flags alternate_interesting>
APPLY_STYLE_TO_LINE

Singleton set containing the “apply style to line” flag: the specified style will be applied to the entire line if it is the only style used on that line.

>>> locations_node_flags.APPLY_STYLE_TO_LINE
<cs.locations_node_flags apply_style_to_line>
DONT_MARK_CONTRIBUTING

Singleton set containing the “don’t mark contributing” flag: this location should not be additionally highlighted in the code listing.

This removes any additional marking CodeSonar may place on this particular event.

>>> locations_node_flags.DONT_MARK_CONTRIBUTING
<cs.locations_node_flags dont_mark_contributing>
ENDBOX

Singleton set containing the “endbox” flag: the GUI should display an end box at this location (rather than an event box).

An end box has:

  • Warning class name instead of event id.
  • “Show: All events | Only primary events” links.
>>> locations_node_flags.ENDBOX
<cs.locations_node_flags endbox>
INTERPOLATE_STYLE

Singleton set containing the “interpolate style” flag: the specified style should be heuristically applied to text other than the actual events between and around those events.

>>> locations_node_flags.INTERPOLATE_STYLE
<cs.locations_node_flags interpolate_style>
NONE

Empty set: contains no flags.

>>> locations_node_flags.NONE
<cs.locations_node_flags none>
PRIMARY

Singleton set containing the “primary” flag: the event at this location is a “primary event” and should be displayed by default in the GUI Warning Report.

Do not use this flag in combination with locations_node_flags.ENDBOX. (End boxes are always displayed.)

>>> locations_node_flags.PRIMARY
<cs.locations_node_flags primary>
STYLE0

Singleton set containing the “style0” flag: this location should be rendered in the style0 style, which looks identical to “on_path”.

>>> locations_node_flags.STYLE0
<cs.locations_node_flags style0>
STYLE1

Singleton set containing the “style1” flag: this location should be rendered in the alternate style1 style.

>>> locations_node_flags.STYLE1
<cs.locations_node_flags style1>
STYLE2

Singleton set containing the “style2” flag: this location should be rendered in the alternate style2 style.

>>> locations_node_flags.STYLE2
<cs.locations_node_flags style2>
STYLE3

Singleton set containing the “style3” flag: this location should be rendered in the alternate style3 style.

>>> locations_node_flags.STYLE3
<cs.locations_node_flags style3>