Log I/O
LasSection Class Reference

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 (LasRecord record)
 Add the specified record to this LAS section. More...
 
void AddRecord (int index, LasRecord record)
 Add the specified record at the given index of this LAS section. More...
 
LasParameterRecord FindParameterRecord (string parameterName)
 Find a specific parameter record of this section. More...
 
string GetAssociation ()
 Return name of the associated section of this section. More...
 
string GetName ()
 Return name of this section. More...
 
IList< LasParameterRecordGetParameterRecords ()
 Get all the parameter records of this section. More...
 
string GetParameterValue (string parameterName)
 Get value of a specific parameter of this section. More...
 
IList< LasRecordGetRecords ()
 Return all (non-data) records of this section. More...
 
SectionType GetSectionType ()
 Return type of this section. More...
 
 LasSection (string name, string association)
 Create an empty LAS parameter section with the specified name and association. More...
 
 LasSection (string name)
 Create an empty LAS parameter section with the specified name. More...
 
void RemoveRecord (LasRecord record)
 Remove the specified record from this section. More...
 
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 the LAS 3.0 documentation for details.

Author
Petroware AS

Member Enumeration Documentation

enum SectionType
strong

The different section types.

Enumerator
PARAMETER 

Parameter section.

DEFINITION 

Definition section.

DATA 

Data section.

Constructor & Destructor Documentation

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 ( 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

void AddRecord ( LasRecord  record)

Add the specified record to this LAS section.

Parameters
recordRecord to add. Non-null.
Exceptions
ArgumentNullExceptionIf record is null.
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.
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.
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.
string GetName ( )

Return name of this section.

Returns
Name of this section. Never null.
IList<LasParameterRecord> GetParameterRecords ( )

Get all the parameter records of this section.

Returns
All the parameter records of this section. Never null.
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.
IList<LasRecord> GetRecords ( )

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

Returns
All non-data records of this section. Never null.
SectionType GetSectionType ( )

Return type of this section.

Returns
Type of this section. Never null.
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: