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

Class representing a LAS section in terms of its title and its containing records. More...

Public Types

enum  SectionType { PARAMETER , DEFINITION , DATA }
 The different section types. More...
 

Public Member Functions

void AddRecord (int index, LasRecord record)
 Add the specified record at the given index of this LAS section.
 
void AddRecord (LasRecord record)
 Add the specified record to this LAS section.
 
override bool Equals (object obj)
 
LasParameterRecord FindParameterRecord (string parameterName)
 Find a specific parameter record of this section.
 
string GetAssociation ()
 Return name of the associated section of this section.
 
override int GetHashCode ()
 
string GetName ()
 Return name of this section.
 
IList< LasParameterRecordGetParameterRecords ()
 Get all the parameter records of this section.
 
string GetParameterValue (string parameterName)
 Get value of a specific parameter of this section.
 
IList< LasRecordGetRecords ()
 Return all (non-data) records of this section.
 
SectionType GetSectionType ()
 Return type of this section.
 
 LasSection (string name)
 Create an empty LAS parameter section with the specified name.
 
 LasSection (string name, string association)
 Create an empty LAS parameter section with the specified name and association.
 
void RemoveRecord (LasRecord record)
 Remove the specified record from this section.
 
override string ToString ()
 

Detailed Description

Class representing a LAS section in terms of its title and its containing records.

A LAS section title has the following format on disk:

    ~name[modifier] [| association]
  

The optional modifier is either _Parameter, _Definition or _Data if it is present. The association is the name of a different section that this one is associated with, typically in a definition/data relation.

In a disk file a section contains all records between the section title record and the next section title record.

See LAS 3.0 Specification for details.

Author
Petroware AS

Member Enumeration Documentation

◆ SectionType

The different section types.

Enumerator
PARAMETER 

Parameter section.

DEFINITION 

Definition section.

DATA 

Data section.

Constructor & Destructor Documentation

◆ LasSection() [1/2]

LasSection ( string name,
string association )

Create an empty LAS parameter section with the specified name and association.

Parameters
nameName of section. Non-null.
associationSection association. Null if N/A.
Exceptions
ArgumentNullExceptionIf name is null.

◆ LasSection() [2/2]

LasSection ( string name)

Create an empty LAS parameter section with the specified name.

Parameters
nameName of section. Non-null.
Exceptions
ArgumentNullExceptionIf name is null.

Member Function Documentation

◆ AddRecord() [1/2]

void AddRecord ( int index,
LasRecord record )

Add the specified record at the given index of this LAS section.

Parameters
indexIndex to insert to. [0,nRecords>.
recordRecord to add. Non-null.
Exceptions
ArgumentExceptionIf index is out of bounds.
ArgumentNullExceptionIf record is null.

◆ AddRecord() [2/2]

void AddRecord ( LasRecord record)

Add the specified record to this LAS section.

Parameters
recordRecord to add. Non-null.
Exceptions
ArgumentNullExceptionIf record is null.

◆ FindParameterRecord()

LasParameterRecord FindParameterRecord ( string parameterName)

Find a specific parameter record of this section.

Parameters
parameterNameName of parameter record to find. Case insensitive. Non-null.
Returns
Requested record, or null if not found.
Exceptions
ArgumentNullExceptionIf parameterName is null.

◆ GetAssociation()

string GetAssociation ( )

Return name of the associated section of this section.

Returns
Name of the associated section of this section, or null if none. If the association is implicit (LAS 2.0), null is returned.

◆ GetName()

string GetName ( )

Return name of this section.

Returns
Name of this section. Never null.

◆ GetParameterRecords()

IList< LasParameterRecord > GetParameterRecords ( )

Get all the parameter records of this section.

Returns
All the parameter records of this section. Never null.

◆ GetParameterValue()

string GetParameterValue ( string parameterName)

Get value of a specific parameter of this section.

Parameters
parameterNameName of parameter record to find value of. Case insensitive. Non-null.
Returns
Requested value, or null if absent or parameter is not found.
Exceptions
ArgumentNullExceptionIf parameterName is null.

◆ GetRecords()

IList< LasRecord > GetRecords ( )

Return all (non-data) records of this section.

Returns
All non-data records of this section. Never null.

◆ GetSectionType()

SectionType GetSectionType ( )

Return type of this section.

Returns
Type of this section. Never null.

◆ RemoveRecord()

void RemoveRecord ( LasRecord record)

Remove the specified record from this section.

If the record is not in this section, this call has no effect.

Parameters
recordRecord to remove. Non-null.
Exceptions
ArgumentNullExceptionIf record is null.

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