class analysis_mode¶
Enumeration class describing the mode of a CodeSonar analysis process.
analysis.get_mode() returns an object of this class.
analysis_mode Members¶
| Constructors | none |
| Static Method | from_integer() |
| Methods | __cmp__(), __eq__(), __ge__(), __gt__(), __hash__(), __le__(), __lt__(), __ne__(), __repr__(), __str__(), as_integer(), name() |
| Attributes | DAEMON, INCREMENTAL, INITIALIZING, NORMAL |
analysis_mode Details¶
-
class
cs.analysis_mode¶ Enumeration class describing the mode of a CodeSonar analysis process.
-
static
from_integer(_inner)¶ Construct an instance from an integer representation.
Parameters: _inner (int) – The integer representation, as returned by analysis_mode.as_integer().Return type: analysis_modeRaises: result.ERROR_INVALID_ARGUMENTif_inneris not a valid integer representation for aanalysis_modeinstance.Invariant: For
analysis_modex, analysis_mode.from_integer(x.as_integer()) == x>>> analysis_mode.from_integer(3) <cs.analysis_mode daemon>
-
__cmp__(other)¶ Comparison function for
analysis_mode, with respect to a stable overall ordering.Parameters: other ( analysis_mode) – Theanalysis_modeobject 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
analysis_mode.INITIALIZING.__cmp__(analysis_mode.INCREMENTAL) -1
-
__eq__(b)¶ Equality operator for
analysis_mode.Parameters: b ( analysis_mode) – Theanalysis_modeobject to compare against.Return type: bool Returns: Trueifselfandbcompare equal,Falseotherwise.>>> analysis_mode.NORMAL == analysis_mode.INCREMENTAL False
-
__ge__(b)¶ Greater-than-or-equal operator for
analysis_mode.Parameters: b ( analysis_mode) – Theanalysis_modeobject to compare against.Return type: bool Returns: Trueifself>=b,Falseotherwise.>>> analysis_mode.INITIALIZING >= analysis_mode.DAEMON False
-
__gt__(b)¶ Greater-than operator for
analysis_mode.Parameters: b ( analysis_mode) – Theanalysis_modeobject to compare against.Return type: bool Returns: Trueifself>b,Falseotherwise.>>> analysis_mode.NORMAL > analysis_mode.INCREMENTAL False
-
__hash__()¶ Hash function for
analysis_mode.Return type: int >>> hash(analysis_mode.INITIALIZING) 0
-
__le__(b)¶ Less-than-or-equal operator for
analysis_mode.Parameters: b ( analysis_mode) – Theanalysis_modeobject to compare against.Return type: bool Returns: Trueifself<=b,Falseotherwise.>>> analysis_mode.DAEMON <= analysis_mode.NORMAL False
-
__lt__(b)¶ Less-than operator for
analysis_mode.Parameters: b ( analysis_mode) – Theanalysis_modeobject to compare against.Return type: bool Returns: Trueifself<b,Falseotherwise.>>> analysis_mode.NORMAL < analysis_mode.INCREMENTAL True
-
__ne__(b)¶ Inequality operator for
analysis_mode.Parameters: b ( analysis_mode) – Theanalysis_modeobject to compare against.Return type: bool Returns: Falseifselfandbcompare equal,Trueotherwise.>>> analysis_mode.DAEMON != analysis_mode.INITIALIZING True
-
__repr__()¶ Get a representation of a
analysis_modeobject that includes information useful for debugging.Return type: str Returns: The string representation. >>> repr(analysis_mode.DAEMON) '<cs.analysis_mode daemon>'
-
__str__()¶ Get a simple string representation of a
analysis_modeobject.Return type: str Returns: The string representation. >>> str(analysis_mode.INITIALIZING) 'initializing'
-
as_integer()¶ Get an integer representation of
self.Return type: int Returns: An integer suitable for use with analysis_mode.from_integer().Invariant: For
analysis_modex, analysis_mode.from_integer(x.as_integer()) == x>>> analysis_mode.DAEMON.as_integer() 3
-
name()¶ Get the name of a
analysis_modeobject.Return type: str Returns: The name. >>> analysis_mode.NORMAL.name() 'normal'
-
DAEMON¶ Indicates that the CodeSonar process is not analyzing anything - it is only running to service requests from the hub (for example, requests for source code listings).
>>> analysis_mode.DAEMON <cs.analysis_mode daemon>
-
INCREMENTAL¶ Indicates an incremental analysis: only new and otherwise-affected parts of the program are being analyzed; state associated with no-longer-present bits of the program may be deleted.
>>> analysis_mode.INCREMENTAL <cs.analysis_mode incremental>
-
INITIALIZING¶ The CodeSonar process always starts in this state.
If this value is returned by
analysis.get_mode(), it means that the function call occurred too early to get useful information.>>> analysis_mode.INITIALIZING <cs.analysis_mode initializing>
-
NORMAL¶ Indicates a nonincremental analysis ( INCREMENTAL_BUILD =No) or base analysis ( INCREMENTAL_BUILD =Yes and no parent analysis).
>>> analysis_mode.NORMAL <cs.analysis_mode normal>
-
static