# MI - Fimex: MetNoFimex::GribFileIndex Class Reference

# MetNoFimex::GribFileIndex Class Reference

`#include <GribFileIndex.h>`

List of all members.

## Public Member Functions

| GribFileIndex ()
| GribFileIndex (boost::filesystem::path gribFilePath, bool ignoreExistingXml=false)
virtual | ~GribFileIndex ()
const std::vector < GribFileMessage > & | listMessages () const
const std::string & | getUrl () const

## Constructor & Destructor Documentation

MetNoFimex::GribFileIndex::GribFileIndex | ( |  | ) |

MetNoFimex::GribFileIndex::GribFileIndex | ( | boost::filesystem::path | gribFilePath,
|  | bool | ignoreExistingXml = `false` |
| ) |  |  |

Initialize the gribFileIndex for the gribFile gribFilePath. If ignoreExistingXml = false, searches for existing indexes in

- file.grbml
- ENV{GRIB_FILE_INDEX}/file.grbml

Otherwise, it parses the grib-file and creates a index in memory.

Performance for getting an index of a 150MB grib-file with some 10s of messages:

- remote NFS file, first time: 16s
- file completely in memory: 1.1s
- xml-file: 0.1s

virtual MetNoFimex::GribFileIndex::~GribFileIndex | ( |  | ) | `[virtual]`

## Member Function Documentation

const std::vector<GribFileMessage>& MetNoFimex::GribFileIndex::listMessages | ( |  | ) | const`[inline]`

const std::string& MetNoFimex::GribFileIndex::getUrl | ( |  | ) | const`[inline]`

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

- include/fimex/GribFileIndex.h