#include <cstdio>
#include <vector>
#include "Byte.h"
#include "Int16.h"
#include "UInt16.h"
#include "Int32.h"
#include "UInt32.h"
#include "Float32.h"
#include "Float64.h"
#include "Str.h"
#include "Url.h"
#include "Array.h"
#include "Structure.h"
#include "Sequence.h"
#include "Grid.h"
#include "BaseType.h"
Go to the source code of this file.
Namespaces | ||||||||||
namespace | libdap | |||||||||
The Byte constructor. | ||||||||||
Defines | ||||||||||
#define | _util_h 1 | |||||||||
Functions | ||||||||||
FILE * | libdap::compressor (FILE *output, int &childpid) | |||||||||
string | libdap::dap_version () | |||||||||
bool | libdap::deflate_exists () | |||||||||
const char * | libdap::dods_progress () | |||||||||
void | libdap::downcase (string &s) | |||||||||
string | libdap::file_to_string (FILE *fp) | |||||||||
FILE * | libdap::get_temp_file (char *temp) | |||||||||
const char * | libdap::libdap_name () | |||||||||
const char * | libdap::libdap_root () | |||||||||
const char * | libdap::libdap_version () | |||||||||
time_t | libdap::parse_time (const char *str, bool expand) | |||||||||
string | libdap::path_to_filename (string path) | |||||||||
string | libdap::prune_spaces (const string &name) | |||||||||
string | libdap::remove_quotes (const string &s) | |||||||||
string | libdap::systime () | |||||||||
FILE * | libdap::text_to_temp (string text) | |||||||||
bool | libdap::unique_names (vector< BaseType * > l, const string &var_name, const string &type_name, string &msg) | |||||||||
Double to string conversion functions | ||||||||||
Conversions from double to a character representation which gets appended to a string. This function depends on the standard routine sprintf to convert a double to a textual representation which gets appended to the string 'str'.
| ||||||||||
void | libdap::append_double_to_string (const double &num, string &str) | |||||||||
string | libdap::double_to_string (const double &num) | |||||||||
Integer to string conversion functions | ||||||||||
Fast, safe conversions from long to a character representation which gets appended to a string. This method will take a long value 'val' and it will recursively divide it by 'base' in order to "extract" one by one the digits which compose it; these digits will be appended to the string str_val which will become the textual representation of 'val'. Please notice that the digits ``extracted'' from `val' will vary depending on the base chosen for the conversion; for example val=15 converted to base 10 will yield the digits (1,5), converted to base 16 will yield (F) and converted to base 2 will yield (1,1,1,1).
| ||||||||||
void | libdap::append_long_to_string (long val, int base, string &str_val) | |||||||||
string | libdap::long_to_string (long val, int base) | |||||||||
Security functions | ||||||||||
bool | libdap::pathname_ok (const string &path, bool strict) | |||||||||
Does the string name a potentailly valid pathname? Test the given pathname to verfiy that it is a valid name. We define this as: Contains only printable characters; and Is less then 256 characters. If strict is true, test that the pathname consists of only letters, digits, and underscore, dash and dot characters instead of the more general case where a pathname can be composed of any printable characters. | ||||||||||
bool | libdap::size_ok (uint sz, uint nelem) | |||||||||
sanitize the size of an array. Test for integer overflow when dynamically allocating an array. |