smartinspectpython.siviewercontext

Module: siviewercontext.py

Revision History

Date Version Description
2023/05/30 3.0.0.0 Initial Version.

@export
class SIViewerContext:

Is the abstract base class for a viewer context. A viewer context is the library-side representation of a viewer in the Console.

A viewer context contains a viewer ID and data which can be displayed in a viewer in the Console. Every viewer in the Console has a corresponding viewer context class in this library. A viewer context is capable of processing data and to format it in a way so that the corresponding viewer in the Console can display it.

Viewer contexts provide a simple way to extend the functionality of the SmartInspect library. See the SISession.LogCustomContext method for a detailed example.

Threadsafety:

This class is not guaranteed to be thread-safe.

Initializes a new instance of the class.

ViewerData: _io.BytesIO

Returns the actual data which will be displayed in the viewer specified by the viewer id.

This property must be overridden by inheriting class.

Returns the viewer ID which specifies the viewer to use in the Console.

def Dispose(self, disposing: bool) -> None:

Releases any unmanaged (and optionally) managed resources of this viewer context.

Arguments:
  • disposing (bool): True if managed resources should be released and false otherwise.