OpenCPN Partial API docs
Loading...
Searching...
No Matches
GribRecordSet Class Reference

Manages a collection of GribRecord objects representing multiple meteorological parameters at a single point in time. More...

#include <GribRecordSet.h>

Inheritance diagram for GribRecordSet:
GribTimelineRecordSet

Public Member Functions

 GribRecordSet (unsigned int id)
 Creates an empty record set.
 
void SetUnRefGribRecord (int i, GribRecord *pGR)
 Sets a GRIB record that this set owns and will be responsible for deleting.
 
void RemoveGribRecords ()
 Removes and deletes all GRIB records owned by this set.
 

Public Attributes

time_t m_Reference_Time
 Reference time for this set of records.
 
unsigned int m_ID
 Unique identifier for this record set.
 
GribRecordm_GribRecordPtrArray [Idx_COUNT]
 Array of pointers to GRIB records representing different meteorological parameters.
 

Detailed Description

Manages a collection of GribRecord objects representing multiple meteorological parameters at a single point in time.

While a GribRecord represents a single parameter's grid data (e.g., temperature or wind-x component), GribRecordSet bundles related records together to provide a complete meteorological picture for one timestamp. For example, it might contain:

  • Surface winds (both X and Y components)
  • Wind components at different pressure levels (850hPa, 700hPa, etc.)
  • Temperature, pressure, humidity
  • Wave and current data

Records are stored in a fixed-size array where each index corresponds to a specific parameter as defined by the Idx_* enumeration. The set can either:

  • Own records (usually interpolated records it created)
  • Reference records (owned by the GRIB file reader)
Note
This class handles memory management for records it owns via m_GribRecordUnref

Definition at line 93 of file GribRecordSet.h.

Constructor & Destructor Documentation

◆ GribRecordSet()

GribRecordSet::GribRecordSet ( unsigned int  id)
inline

Creates an empty record set.

Parameters
idUnique identifier for this record set. The id is used to uniquely identify this record set within a GRIB file.

Definition at line 102 of file GribRecordSet.h.

◆ ~GribRecordSet()

virtual GribRecordSet::~GribRecordSet ( )
inlinevirtual

Definition at line 109 of file GribRecordSet.h.

Member Function Documentation

◆ RemoveGribRecords()

void GribRecordSet::RemoveGribRecords ( )
inline

Removes and deletes all GRIB records owned by this set.

Records not owned by this set are left untouched.

Definition at line 134 of file GribRecordSet.h.

◆ SetUnRefGribRecord()

void GribRecordSet::SetUnRefGribRecord ( int  i,
GribRecord pGR 
)
inline

Sets a GRIB record that this set owns and will be responsible for deleting.

Typically used for interpolated records created between two time points. The set takes ownership and will delete the record when appropriate.

Parameters
iIndex in the record array where to store the record
pGRPointer to the GRIB record to store

Definition at line 120 of file GribRecordSet.h.

Member Data Documentation

◆ m_GribRecordPtrArray

GribRecord* GribRecordSet::m_GribRecordPtrArray[Idx_COUNT]

Array of pointers to GRIB records representing different meteorological parameters.

Each index corresponds to a specific parameter (wind, gust, wave, etc). Records may be owned by this set (tracked by m_GribRecordUnref) or referenced from elsewhere.

Definition at line 155 of file GribRecordSet.h.

◆ m_ID

unsigned int GribRecordSet::m_ID

Unique identifier for this record set.

Definition at line 145 of file GribRecordSet.h.

◆ m_Reference_Time

time_t GribRecordSet::m_Reference_Time

Reference time for this set of records.

Definition at line 143 of file GribRecordSet.h.


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