libdap++ Updated for version 3.8.2

libdap::Ancillary Class Reference

#include <Ancillary.h>

List of all members.

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="")

Detailed Description

Definition at line 48 of file Ancillary.h.


Member Function Documentation

builddir build BUILD libdap Ancillary cc builddir build BUILD libdap Ancillary cc builddir build BUILD libdap Ancillary cc 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.

Note:
This code now checks for pathname.ext 3/17/99 jhrg
Parameters:
pathnameThe input pathname of a dataset.
extThe input extension the desired file is to have.
dirThe input directory in which the desired file may be found.
fileThe input filename the desired file may have.
Returns:
A string containing the pathname of the file found by searching with the given components. If no file was found, the null string is returned.

Definition at line 69 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.

Parameters:
nameThe name (full or relative) to one member of a group of files.
extThe 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.
Returns:
The pathname to the group's ancillary file if found, otherwise the empty string ("").

Definition at line 138 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 196 of file Ancillary.cc.

References DBG, and find_ancillary_file().

Here is the call graph for this function:

void libdap::Ancillary::read_ancillary_dds ( DDS dds,
const string &  pathname,
const string &  dir = "",
const string &  file = "" 
) [static]

Definition at line 213 of file Ancillary.cc.

References DBG, find_ancillary_file(), and libdap::DDS::parse().

Here is the call graph for this function:


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