libdap++ Updated for version 3.8.2
|
Associate a rule with an ancillary resource. More...
#include <Resource.h>
Public Types | |
enum | rule { overwrite, replace, fallback } |
How are ancillary resources used. More... | |
Public Member Functions | |
virtual Resource::rule | get_rule () const |
virtual string | get_url () const |
Resource (const string &u) | |
Resource (const string &u, const string &r) throw (Error) | |
Resource (const string &u, const rule &r) | |
Resource () | |
virtual void | set_rule (const Resource::rule &r) |
virtual void | set_url (const string &u) |
virtual | ~Resource () |
Friends | |
ostream & | operator<< (ostream &os, const Resource &r) |
Bind an ancillary resource with the rule that should be used when combining it with a primary resource. Ancillary resources are always specified using URLs. If an ancillary resource is a local file, use file://
URLs.
Note that operator<< is defined for Resource as a function.
Definition at line 50 of file Resource.h.
The AIS uses this enumeration to describe how a given ancillary should be merged into a primary data source.
Definition at line 71 of file Resource.h.
libdap::Resource::Resource | ( | ) | [inline] |
Build a Resource with a null URL and set the combination rule to the default.
Definition at line 75 of file Resource.h.
libdap::Resource::Resource | ( | const string & | u | ) | [inline] |
Build a resource. Set the combination rule to the default value, which is overwrite.
u | The ancillary resource URL. |
Definition at line 81 of file Resource.h.
libdap::Resource::Resource | ( | const string & | u, |
const rule & | r | ||
) | [inline] |
Build a Resource.
u | The ancillary resource URL. |
r | The combination rule. |
Definition at line 87 of file Resource.h.
libdap::Resource::Resource | ( | const string & | u, |
const string & | r | ||
) | throw (Error) [inline] |
Build a Resource.
Note: If this is used in a callback, make sure to check the value of r
before calling this constructor. Exceptions thrown within callbacks are not portable. Valid values are "overwrite", "replace" and "fallback". The constructor accepts "default" as a synonym for "overwrite".
u | The ancillary resource URL. |
r | The name of the combination rule. |
Definition at line 100 of file Resource.h.
virtual libdap::Resource::~Resource | ( | ) | [inline, virtual] |
Definition at line 112 of file Resource.h.
virtual Resource::rule libdap::Resource::get_rule | ( | ) | const [inline, virtual] |
Return combination rule for this resource.
Definition at line 129 of file Resource.h.
virtual string libdap::Resource::get_url | ( | ) | const [inline, virtual] |
Return the resource URL.
Definition at line 116 of file Resource.h.
virtual void libdap::Resource::set_rule | ( | const Resource::rule & | r | ) | [inline, virtual] |
Set the resource's combination rule.
r | The combination rule. |
Definition at line 136 of file Resource.h.
virtual void libdap::Resource::set_url | ( | const string & | u | ) | [inline, virtual] |
ostream& operator<< | ( | ostream & | os, |
const Resource & | r | ||
) | [friend] |
Write the XML for this resource. This function is defined in AISResoruces.
os | Write to this ostream. r The Resource to write. |