Class DetectorResultObject
- Namespace
- VirtualLabAPI.Core.LightPath
- Assembly
- VirtualLabAPI.dll
Class representing a the result of a detector. The result can be either a list of physical values or a single physical value, a VirtualLab document type, or a special object combining field data and view properties (ComplexAmplitudeView or HarmonicFieldsSetView).
[Serializable]
public class DetectorResultObject : ManualSerialization, IEquatable<IObjectBase>, ISerializable, IDeserializationCallback, IDisposable, ICloneable
- Inheritance
-
ObjectBaseSerializableObjectBaseManualSerializationDetectorResultObject
- Implements
-
IEquatable<IObjectBase>
- Inherited Members
Constructors
DetectorResultObject(List<PhysicalValueBase>, string)
Constructor if the detector returns a list of PhysicalValueBase objects.
public DetectorResultObject(List<PhysicalValueBase> data, string description)
Parameters
dataList<PhysicalValueBase>The result data of the detector.
descriptionstringThe description of the detector.
DetectorResultObject(List<PhysicalValue>, string)
Constructor if the detector returns a list of PhysicalValue objects.
public DetectorResultObject(List<PhysicalValue> data, string description)
Parameters
dataList<PhysicalValue>The result data of the detector.
descriptionstringThe description of the detector.
DetectorResultObject(IDocument, string, string)
Constructor if the detector returns an IDocument object (for example a DataArrayBase).
public DetectorResultObject(IDocument data, string detectorName, string subDetector = "")
Parameters
dataIDocumentThe result data of the detector.
detectorNamestringThe name of the detector to which this result belongs.
subDetectorstringOptional name of the sub-detector to which this result belongs.
Exceptions
- ArgumentException
The given document is not serializable.
Properties
CompleteTitle
Gets the complete title (description [= detector name] + sub-detector.
public string CompleteTitle { get; }
Property Value
- string
Only the Description if SubDetector is empty or null, "{SubDetector} – {Description}" otherwise.
Data
Gets the result data of the detector.
public object Data { get; }
Property Value
Description
Gets and sets the name of the detector to which this result belongs.
public string Description { get; set; }
Property Value
SubDetector
Gets and sets the name of the sub-detector to which this result belongs.
public string SubDetector { get; set; }
Property Value
Type
Gets the type of the result data.
public Type Type { get; }
Property Value
Methods
Clone()
Creates a new object that is a copy of the current instance.
public override object Clone()
Returns
- object
A new object that is a copy of this instance.
Equals(object?, EqualityIntent)
Determines whether the specified object is equal to this instance.
public override bool Equals(object? otherObject, EqualityIntent equalityIntent)
Parameters
otherObjectobjectThe object to compare with this instance.
equalityIntentEqualityIntentDefines what kind of equality you want to check when comparing two objects, for example all values or just physical equality.
Returns
GetDataAsDocument()
Gets the data as document.
public IDocument GetDataAsDocument()
Returns
- IDocument
The data as document.
nullof the data is a list of physical values.
GetHashCode()
Serves as the default hash function.
public override int GetHashCode()
Returns
- int
A hash code for the current object.
IsCalculated()
Flag which determines whether results are already inserted to the DetectorResultObject.
public bool IsCalculated()
Returns
- bool
TRUE: Results have already been added.
Show(DetectingDeviceBaseOSE, SnippetWithSourceCode?, string, LightPathLog?)
Shows the specified generating detecting device. Shows a reference.
public void Show(DetectingDeviceBaseOSE generatingDetectingDevice, SnippetWithSourceCode? snippet = null, string caption = "", LightPathLog? logger = null)
Parameters
generatingDetectingDeviceDetectingDeviceBaseOSEThe generating detecting device.
snippetSnippetWithSourceCodeOptional snippet that generated the result.
captionstringThe caption of the resulting document window. if this optional parameter is not specified, "{subDetectorString} – {detectorString}" is used.
loggerLightPathLogOptional logger (for Classic Field Tracing).
Show(Lightpath, string, LightPathLog)
Shows the specified generating detecting device. Shows a reference.
public void Show(Lightpath parentSetup, string caption = "", LightPathLog logger = null)
Parameters
parentSetupLightpathThe parent Optical containing the detector (and maybe detector add-on) which generated the result.
captionstringThe caption of the resulting document window. if this optional parameter is not specified, "{subDetectorString} – {detectorString}" is used.
loggerLightPathLogOptional logger (for Classic Field Tracing).