|
libdap++
Updated for version 3.8.2
|
#include <Ancillary.h>
Static Public Member Functions | |
| static string | find_ancillary_file (const string &pathname, const string &ext, const string &dir, const string &file) |
| Find a file with ancillary data. | |
| static string | find_group_ancillary_file (const string &pathname, const string &ext) |
| static void | read_ancillary_das (DAS &das, const string &pathname, const string &dir="", const string &file="") |
| static void | read_ancillary_dds (DDS &dds, const string &pathname, const string &dir="", const string &file="") |
Definition at line 48 of file Ancillary.h.
| string libdap::Ancillary::find_ancillary_file | ( | const string & | pathname, |
| const string & | ext, | ||
| const string & | dir, | ||
| const string & | file | ||
| ) | [static] |
This function accepts a dataset path name, and searches for a matching ancillary data file name with a very specific set of search rules, given here:
directory filename extension
same same `.'given
given same `.'given
same given `.'given
given given `.'given
Where ``same'' refers to the input dataset pathname, and ``given'' refers to the function arguments.
For example, If you call this function with a dataset name of /a/data, an extension of das, a directory of b, and a filename of ralph, the function will look (in order) for the following files:
/a/data.das
/b/data.das
/a/ralph.das
/b/ralph.das
The function will return a string containing the name of the first file in the list that exists, if any.
pathname.ext 3/17/99 jhrg| pathname | The input pathname of a dataset. |
| ext | The input extension the desired file is to have. |
| dir | The input directory in which the desired file may be found. |
| file | The input filename the desired file may have. |
Definition at line 66 of file Ancillary.cc.
References DBG.
Referenced by read_ancillary_das(), and read_ancillary_dds().
| string libdap::Ancillary::find_group_ancillary_file | ( | const string & | name, |
| const string & | ext | ||
| ) | [static] |
Assume that name refers to a file that is one of a group of files which share a common `base' name and differ only by some prefix or suffix digits (e.g. 00base, 01base, ... or base00, ... have the base name base). This function looks for a file base.ext.
| name | The name (full or relative) to one member of a group of files. |
| ext | The extension of the group's ancillary file. Note that ext should include a period (.) if that needs to separate the base name from the extension. |
Definition at line 135 of file Ancillary.cc.
References DBG.
| void libdap::Ancillary::read_ancillary_das | ( | DAS & | das, |
| const string & | pathname, | ||
| const string & | dir = "", |
||
| const string & | file = "" |
||
| ) | [static] |
Definition at line 193 of file Ancillary.cc.
References DBG, find_ancillary_file(), and libdap::DAS::parse().

| void libdap::Ancillary::read_ancillary_dds | ( | DDS & | dds, |
| const string & | pathname, | ||
| const string & | dir = "", |
||
| const string & | file = "" |
||
| ) | [static] |
Definition at line 210 of file Ancillary.cc.
References DBG, find_ancillary_file(), and libdap::DDS::parse().
