#include "config.h"
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <ctype.h>
#include <time.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <string>
#include <sstream>
#include <vector>
#include <algorithm>
#include <stdexcept>
#include "BaseType.h"
#include "Str.h"
#include "Url.h"
#include "Sequence.h"
#include "Error.h"
#include "parser.h"
#include "util.h"
#include "debug.h"
Include dependency graph for util.cc:
Go to the source code of this file.
Functions | |
void | append_double_to_string (const double &num, string &str) |
void | append_long_to_string (long val, int base, string &str_val) |
string | dap_version () |
void | delete_xdrstdio (XDR *xdr) |
string | double_to_string (const double &num) |
void | downcase (string &s) |
string | file_to_string (FILE *fp) |
FILE * | get_temp_file (char *temp) |
char * | get_tempfile_template (char *file_template) |
const char * | libdap_name () |
const char * | libdap_root () |
const char * | libdap_version () |
string | long_to_string (long val, int base) |
XDR * | new_xdrstdio (FILE *stream, enum xdr_op xop) |
string | path_to_filename (string path) |
string | prune_spaces (const string &name) |
XDR * | set_xdrstdio (XDR *xdr, FILE *stream, enum xdr_op xop) |
string | systime () |
bool | unique_names (vector< BaseType * > l, const string &var_name, const string &type_name, string &msg) |
bool_t | xdr_str (XDR *xdrs, string &buf) |
|
Definition at line 516 of file util.cc. Referenced by double_to_string(). |
|
Definition at line 479 of file util.cc. Referenced by InternalErr::InternalErr(), long_to_string(), and parse_error(). |
|
Get the version of the DAP library. Definition at line 538 of file util.cc. References libdap_version(). |
Here is the call graph for this function:
|
Definition at line 194 of file util.cc. Referenced by DODSFilter::dataset_constraint(), and DODSFilter::functional_constraint(). |
|
Definition at line 527 of file util.cc. References append_double_to_string(). Referenced by GeoConstraint::set_bounding_box(). |
Here is the call graph for this function:
|
Definition at line 450 of file util.cc. Referenced by is_keyword(), and String_to_AttrType(). |
|
Read stuff from a file and dump it into a string. This assumes the file holds character data only. Intended for testing...
|
|
Intended for testing, this may have other uses. The template should be the pathname of the temporary file ending in 'XXXXXX' (as for mkstemp) and will be modified.
|
|
Build a template for a temporary file suitable for use with mkstemp. Look around for a reasonable place to put a temporary file. Check first the value of the TMPDIR env var. If that does not yield a path that's writable (as defined by access(..., W_OK|R_OK)) then look at P_tmpdir (as defined in stdio.h. If both come up empty, then use `./'. This function allocates storage using new. The caller must delete the char array.
Definition at line 575 of file util.cc. Referenced by get_temp_file(). |
|
|
|
Definition at line 250 of file util.cc. References libdap_root(). Referenced by libdap_root(). |
Here is the call graph for this function:
|
Return the version string for this package.
Definition at line 258 of file util.cc. Referenced by dap_version(). |
|
Definition at line 508 of file util.cc. References append_long_to_string(). Referenced by AISDatabaseParser::aisError(), AISDatabaseParser::aisFatalError(), AISDatabaseParser::aisWarning(), DDXParser::ddx_fatal_error(), RCReader::get_proxy_server_host_url(), SignalHandler::register_handler(), save_str(), and libdap::set_array_using_double(). |
Here is the call graph for this function:
|
Definition at line 173 of file util.cc. Referenced by DODSFilter::dataset_constraint(), and DODSFilter::functional_constraint(). |
|
Get the filename part from a path. This function can be used to return a string that has the directory components stripped from a path. This is useful when building error message strings. If WIN32 is defined, use '\' as the path separator, otherwise use '/' as the path separator.
|
|
Removed spaces from the front of a URL and also from the front of the CE. This function assumes that there are no holes in both the URL and the CE. It will remove leading space, but not other spaces.
Definition at line 93 of file util.cc. Referenced by Connect::Connect(), and is_keyword(). |
|
|
|
|
|
Definition at line 116 of file util.cc. References DBG. Referenced by DDS::check_semantics(), Grid::check_semantics(), Sequence::check_semantics(), and Structure::check_semantics(). |
|
Definition at line 218 of file util.cc. References DBG, and max_str_len. Referenced by Str::deserialize(), Vector::deserialize(), Str::serialize(), and Vector::serialize(). |