class multiprocess_mode¶
Enumeration class describing the multiprocess mode of a CodeSonar analysis process.
analysis.get_multiprocess_mode() returns an object of this class.
See Parallelism in CodeSonar: Analysis for more information about multiprocess modes.
multiprocess_mode Members¶
| Constructors | none |
| Static Method | from_integer() |
| Methods | __cmp__(), __eq__(), __ge__(), __gt__(), __hash__(), __le__(), __lt__(), __ne__(), __repr__(), __str__(), as_integer(), name() |
| Attributes | DEEP_PARSE_MASTER, INITIALIZING, MASTER, SERIAL, SLAVE |
multiprocess_mode Details¶
-
class
cs.multiprocess_mode¶ Enumeration class describing the multiprocess 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 multiprocess_mode.as_integer().Return type: multiprocess_modeRaises: result.ERROR_INVALID_ARGUMENTif_inneris not a valid integer representation for amultiprocess_modeinstance.Invariant: For
multiprocess_modex, multiprocess_mode.from_integer(x.as_integer()) == x>>> multiprocess_mode.from_integer(1) <cs.multiprocess_mode serial>
-
__cmp__(other)¶ Comparison function for
multiprocess_mode, with respect to a stable overall ordering.Parameters: other ( multiprocess_mode) – Themultiprocess_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
>>> multiprocess_mode.INITIALIZING.__cmp__(multiprocess_mode.MASTER) -1
-
__eq__(b)¶ Equality operator for
multiprocess_mode.Parameters: b ( multiprocess_mode) – Themultiprocess_modeobject to compare against.Return type: bool Returns: Trueifselfandbcompare equal,Falseotherwise.>>> multiprocess_mode.SLAVE == multiprocess_mode.SLAVE True
-
__ge__(b)¶ Greater-than-or-equal operator for
multiprocess_mode.Parameters: b ( multiprocess_mode) – Themultiprocess_modeobject to compare against.Return type: bool Returns: Trueifself>=b,Falseotherwise.>>> multiprocess_mode.SERIAL >= multiprocess_mode.MASTER False
-
__gt__(b)¶ Greater-than operator for
multiprocess_mode.Parameters: b ( multiprocess_mode) – Themultiprocess_modeobject to compare against.Return type: bool Returns: Trueifself>b,Falseotherwise.>>> multiprocess_mode.INITIALIZING > multiprocess_mode.INITIALIZING False
-
__hash__()¶ Hash function for
multiprocess_mode.Return type: int >>> hash(multiprocess_mode.MASTER) 2
-
__le__(b)¶ Less-than-or-equal operator for
multiprocess_mode.Parameters: b ( multiprocess_mode) – Themultiprocess_modeobject to compare against.Return type: bool Returns: Trueifself<=b,Falseotherwise.>>> multiprocess_mode.SERIAL <= multiprocess_mode.SLAVE True
-
__lt__(b)¶ Less-than operator for
multiprocess_mode.Parameters: b ( multiprocess_mode) – Themultiprocess_modeobject to compare against.Return type: bool Returns: Trueifself<b,Falseotherwise.>>> multiprocess_mode.MASTER < multiprocess_mode.SERIAL False
-
__ne__(b)¶ Inequality operator for
multiprocess_mode.Parameters: b ( multiprocess_mode) – Themultiprocess_modeobject to compare against.Return type: bool Returns: Falseifselfandbcompare equal,Trueotherwise.>>> multiprocess_mode.INITIALIZING != multiprocess_mode.SLAVE True
-
__repr__()¶ Get a representation of a
multiprocess_modeobject that includes information useful for debugging.Return type: str Returns: The string representation. >>> repr(multiprocess_mode.SERIAL) '<cs.multiprocess_mode serial>'
-
__str__()¶ Get a simple string representation of a
multiprocess_modeobject.Return type: str Returns: The string representation. >>> str(multiprocess_mode.MASTER) 'master'
-
as_integer()¶ Get an integer representation of
self.Return type: int Returns: An integer suitable for use with multiprocess_mode.from_integer().Invariant: For
multiprocess_modex, multiprocess_mode.from_integer(x.as_integer()) == x>>> multiprocess_mode.INITIALIZING.as_integer() 0
-
name()¶ Get the name of a
multiprocess_modeobject.Return type: str Returns: The name. >>> multiprocess_mode.INITIALIZING.name() 'initializing'
-
DEEP_PARSE_MASTER¶ >>> multiprocess_mode.DEEP_PARSE_MASTER <cs.multiprocess_mode master>
-
INITIALIZING¶ Every CodeSonar process always starts in this state.
If this value is returned by
analysis.get_multiprocess_mode(), it means that the function call occurred too early to get useful information.>>> multiprocess_mode.INITIALIZING <cs.multiprocess_mode initializing>
-
MASTER¶ Indicates that CodeSonar is running in parallel mode, and the current process is the analysis master or daemon master.
>>> multiprocess_mode.MASTER <cs.multiprocess_mode master>
-
SERIAL¶ Indicates that CodeSonar is running in serial mode (and therefore there is only one analysis process - the current one).
>>> multiprocess_mode.SERIAL <cs.multiprocess_mode serial>
-
SLAVE¶ Indicates that CodeSonar is running in parallel mode, and the current process is an analysis slave or daemon slave.
>>> multiprocess_mode.SLAVE <cs.multiprocess_mode slave>
-
static