55 inline bool double_eq(
double lhs,
double rhs,
double epsilon = 1.0e-5)
57 return fabs(lhs - rhs) < epsilon;
69 bool unique_names(vector<BaseType *> l,
const string &var,
const string &type,
string &msg);
71 const char *libdap_root();
73 extern "C" const char *libdap_name();
76 void flush_stream(iostream ios, FILE *out);
125 void append_long_to_string(
long val,
int base,
string &str_val);
126 string long_to_string(
long val,
int base = 10);
143 void append_double_to_string(
const double &num,
string &str);
144 string double_to_string(
const double &num);
148 int glob(
const char *c,
const char *s );
149 time_t
parse_time(
const char * str,
bool expand);
150 bool size_ok(
unsigned int sz,
unsigned int nelem);
151 bool pathname_ok(
const string &path,
bool strict =
true);
153 string open_temp_fstream(ofstream &f,
const string &name_template,
const string &suffix =
"");
time_t parse_time(const char *str, bool expand)
bool is_constructor_type(Type t)
Returns true if the instance is a constructor (i.e., Structure, Sequence or Grid) type variable...
string prune_spaces(const string &name)
string open_temp_fstream(ofstream &f, const string &name_template, const string &suffix)
string extract_string_argument(BaseType *arg)
bool dir_exists(const string &dir)
bool size_ok(unsigned int sz, unsigned int nelem)
sanitize the size of an array. Test for integer overflow when dynamically allocating an array...
bool is_vector_type(Type t)
Returns true if the instance is a vector (i.e., array) type variable.
Type
Identifies the data type.
top level DAP object to house generic methods
void set_array_using_double(Array *dest, double *src, int src_len)
bool pathname_ok(const string &path, bool strict)
Does the string name a potentially valid pathname? Test the given pathname to verify that it is a val...
double * extract_double_array(Array *a)
ObjectType get_type(const string &value)
string D4type_name(Type t)
Returns the type of the class instance as a string. Supports all DAP4 types and not the DAP2-only typ...
string path_to_filename(string path)
bool is_quoted(const string &s)
bool is_simple_type(Type t)
Returns true if the instance is a numeric, string or URL type variable.
double extract_double_value(BaseType *arg)
string remove_quotes(const string &s)
The basic data type for the DODS DAP types.
string D2type_name(Type t)
Returns the type of the class instance as a string. Supports all DAP2 types and not the DAP4-only typ...
bool is_host_big_endian()
Does this host use big-endian byte order?
const char * libdap_version()
A multidimensional array of identical data types.
int glob(const char *c, const char *s)
bool double_eq(double lhs, double rhs, double epsilon=1.0e-5)
bool is_integer_type(Type t)