Log I/O
Loading...
Searching...
No Matches
LisComponent Class Referencesealed

Model a LIS component, representing one piece of information inside a LIS file. More...

Public Member Functions

int GetCategory ()
 Return component category.
 
int GetComponentType ()
 Return component type.
 
int GetLength ()
 Return component length in bytes.
 
string GetMnemonic ()
 Return component mnemonic.
 
int GetRepresentationCode ()
 Return representation code of the values of this component.
 
int GetSize ()
 Return component value size in bytes.
 
string GetUnit ()
 Return unit of measure for the values of this component.
 
object GetValue ()
 Convenience method to get the first value if the client knows that there are at most one.
 
IList< object > GetValues ()
 Return the value(s) of this component.
 
 LisComponent (int componentType, int category, string mnemonic, string unit, string value)
 Convenience constructor for creating a component with exactly one string-type object.
 
 LisComponent (int componentType, int representationCode, int size, int category, string mnemonic, string unit, List< object > values)
 Create a LIS component.
 
 LisComponent (int componentType, int representationCode, int size, int category, string mnemonic, string unit, object value)
 Convenience constructor for creating a component with exactly one value.
 
void SetMnemonic (string mnemonic)
 Set component mnemonic.
 
void SetValue (object value)
 Set value of this component.
 
override string ToString ()
 

Detailed Description

Model a LIS component, representing one piece of information inside a LIS file.

Author
Petroware AS

Constructor & Destructor Documentation

◆ LisComponent() [1/3]

LisComponent ( int componentType,
int representationCode,
int size,
int category,
string mnemonic,
string unit,
List< object > values )

Create a LIS component.

Parameters
componentTypeComponent type.
representationCodeRepresentation code.
sizeComponent size. <0,>.
categoryCategory.
mnemonicFeature mnemonic. Null if N/A.
unitFeature unit. Null if unitless or N/A.
valuesComponent values. Non-null.
Exceptions
ArgumentNullExceptionIf values is null.
ArgumentExceptionIf representationCode is invalid or size <= 0.

◆ LisComponent() [2/3]

LisComponent ( int componentType,
int representationCode,
int size,
int category,
string mnemonic,
string unit,
object value )

Convenience constructor for creating a component with exactly one value.

Parameters
componentTypeComponent type.
representationCodeRepresentation code.
sizeComponent size.
categoryCategory.
mnemonicFeature mnemonic. Null if N/A.
unitFeature unit. Null if unitless or N/A.
valueComponent value.
Exceptions
ArgumentExceptionIf representationCode is invalid or size <= 0.

◆ LisComponent() [3/3]

LisComponent ( int componentType,
int category,
string mnemonic,
string unit,
string value )

Convenience constructor for creating a component with exactly one string-type object.

Parameters
componentTypeComponent type.
categoryCategory.
mnemonicFeature mnemonic. Null if N/A.
unitFeature unit. Null if unitless or N/A.
valueComponent value.

Member Function Documentation

◆ GetCategory()

int GetCategory ( )

Return component category.

Returns
Component category.

◆ GetComponentType()

int GetComponentType ( )

Return component type.

Returns
Component type.

◆ GetLength()

int GetLength ( )

Return component length in bytes.

Returns
Component length in bytes including component header.

◆ GetMnemonic()

string GetMnemonic ( )

Return component mnemonic.

Returns
Component mnemonic. May be null if N/A.

◆ GetRepresentationCode()

int GetRepresentationCode ( )

Return representation code of the values of this component.

Returns
Representation code of the values.

◆ GetSize()

int GetSize ( )

Return component value size in bytes.

Returns
Component size not including component header.

◆ GetUnit()

string GetUnit ( )

Return unit of measure for the values of this component.

Returns
Unit of measure for the values of this component. Null if unitless or N/A.

◆ GetValue()

object GetValue ( )

Convenience method to get the first value if the client knows that there are at most one.

Returns
Value of this component. If there are more than one value present, the first one is returned. If there are no values, null is returned.

◆ GetValues()

IList< object > GetValues ( )

Return the value(s) of this component.

Returns
The value(s) of this component. Never null.

◆ SetMnemonic()

void SetMnemonic ( string mnemonic)

Set component mnemonic.

Parameters
mnemonicMnemonic to set. Null if N/A.

◆ SetValue()

void SetValue ( object value)

Set value of this component.

Parameters
valueValue to set. Null for absent.

The documentation for this class was generated from the following file: