|
Programming Reference for VirtualLab Fusion
2025.2
|
Base class for a complex or double value with a physical unit. More...
Public Member Functions | |
| override object | Clone () |
| override bool | Equals (object otherObject, EqualityIntent equalityIntent) |
| Determines whether the specified Object is equal to this instance. | |
| Complex | GetComplexValue () |
| Gets the actual value as a complex number. | |
| PhysicalValueBase (MeasuredQuantity measuredQuantity, string comment) | |
| Standard constructor. | |
| PhysicalValueBase (PhysicalProperty physicalProperty) | |
| Standard constructor. | |
| PhysicalValueBase (PhysicalProperty physicalProperty, string comment) | |
| Standard constructor. | |
| PhysicalValueBase (PhysicalValueBase physicalValueBase) | |
| Copy constructor. | |
| PhysicalValueBase (SerializationInfo info, StreamingContext context) | |
| Deserialization constructor. See the ISerializable interface for more details. | |
| string | ToString (int significantDigits) |
| Returns a System.String that represents this instance. | |
| string | ToString (string format, IFormatProvider formatProvider=null) |
| ToString function provided by the IFormattable interface. Returns a System.String that represents this instance. | |
Static Public Member Functions | |
| static string | GetFormatString (bool showPhysicalUnits, int numberOfDigits, ComplexToStringConversionFormat? complexNumberFormat=null) |
| Gets the format string which can be used for the ToString method. | |
Properties | |
| object | ActualParameterRunResult [get] |
| Gets the actual parameter run result. | |
| string | Comment [get, set] |
| A comment specifying what the PhysicalValue actually is. | |
| MeasuredQuantity | MeasuredQuantity [get, set] |
| Gets and sets the measured quantity (e.g. length) of the physical value. | |
| virtual PhysicalProperty | PhysicalProperty [get, set] |
| The unit of the PhysicalValue. | |
Base class for a complex or double value with a physical unit.
| PhysicalValueBase | ( | PhysicalProperty | physicalProperty | ) |
Standard constructor.
| physicalProperty | The unit of the PhysicalValue. |
| PhysicalValueBase | ( | PhysicalProperty | physicalProperty, |
| string | comment | ||
| ) |
Standard constructor.
| physicalProperty | The unit of the PhysicalValue. |
| comment | A comment specifying what the PhysicalValue actually is. |
| PhysicalValueBase | ( | MeasuredQuantity | measuredQuantity, |
| string | comment | ||
| ) |
Standard constructor.
| measuredQuantity | The measured quantity of the physical value (e.g. length). |
| comment | A comment specifying what the PhysicalValue actually is. |
| PhysicalValueBase | ( | PhysicalValueBase | physicalValueBase | ) |
Copy constructor.
| physicalValueBase | PhysicalValueBase object to copy. |
| PhysicalValueBase | ( | SerializationInfo | info, |
| StreamingContext | context | ||
| ) |
Deserialization constructor. See the ISerializable interface for more details.
| info | SerializationInfo |
| context | StreamingContext |
| override bool Equals | ( | object | otherObject, |
| EqualityIntent | equalityIntent | ||
| ) |
Determines whether the specified Object is equal to this instance.
| otherObject | The Object to compare with this instance. |
| equalityIntent | Defines what kind of equality you want to check when comparing two objects, for example all values or just physical equality. |
true if the specified Object is equal to this instance; otherwise, false. | Complex GetComplexValue | ( | ) |
Gets the actual value as a complex number.
|
static |
Gets the format string which can be used for the ToString method.
| showPhysicalUnits | If set to true physical units shall be shown in the formatted string. |
| numberOfDigits | The number of digits. Should be in the range 1 ... 15. Other wise the global digit precision is used. |
| complexNumberFormat | The complex number format (RealImaginary, AmplitudePhase or SinusCosinus). Can be omitted for real-valued physical values. |
|
abstract |
Returns a System.String that represents this instance.
| significantDigits | The significant digits. |
|
abstract |
ToString function provided by the IFormattable interface. Returns a System.String that represents this instance.
| format | The format. "U" or an empty string means that the string is formatted with units (e.g. "1 nm"). "G" means that the string is formatted without units (e.g. "1e-9"). "F" means that the string is formatted as "{Comment} of {Value with units}" (e.g. "wavelength of 300 nm"). |
In all cases you can add a number to specify the number of digits that shall be used. E.g. "U3" results in "1.23 nm", while "U4" results in "1.234 nm". After a comma you can add the ComplexToStringConversionFormat for complex physical values. The GetFormatString method can be used to generate a matching format string.
For any other string the ToString(format, formatProvider) of the Value is used.
| formatProvider | Optional culture specific format provider used for formatting the value (if format is not "U" or "F"). |
|
getset |
Gets and sets the measured quantity (e.g. length) of the physical value.