|
OPeNDAP Hyrax Back End Server (BES)
Updated for version 3.8.3
|
#include "FreeFormCPP.h"#include "BaseType.h"#include "Error.h"#include "InternalErr.h"#include "dods-datatypes.h"

Go to the source code of this file.
Functions | |
| int | ff_prec (Type dods_type) |
| const string | ff_types (Type dods_type) |
| bool | file_exist (const char *filename) |
| const string | find_ancillary_rss_das (const string &dataset, const string &delimiter=format_delimiter(), const string &extension=format_extension()) |
| const string | find_ancillary_rss_formats (const string &dataset, const string &delimiter=format_delimiter(), const string &extension=format_extension()) |
| const string & | format_delimiter (const string &new_delimiter="") |
| const string & | format_extension (const string &new_extension="") |
| void | free_ff_char_vector (char **v, int len) |
| Free a char ** vector that db_ask() allocates. More... | |
| dods_float64 | get_float_value (BaseType *var) throw (InternalErr) |
| dods_uint32 | get_integer_value (BaseType *var) throw (InternalErr) |
| Get the value of the BaseType Variable. More... | |
| bool | is_float_type (BaseType *btp) |
| bool | is_integer_type (BaseType *btp) |
| const string | make_output_format (const string &name, Type type, const int width) |
| const string | makeND_output_format (const string &name, Type type, const int width, int ndim, const long *start, const long *edge, const long *stride, string *dname) |
| long | read_ff (const char *dataset, const char *if_file, const char *o_format, char *o_buffer, unsigned long size) |
| Read from a file/database using the FreeForm API. More... | |
| long | Records (const string &filename) |
| int | SetDodsDB (FF_STD_ARGS_PTR std_args, DATA_BIN_HANDLE dbin_h, char *Msgt) |
| Given a set of standard arguments (input filenames), allocate a DATA-BIN_HANDLE and return an error code. More... | |
Variables | |
| const int | Msgt_size = 255 |
| int ff_prec | ( | Type | dods_type | ) |
Definition at line 279 of file util_ff.cc.
Referenced by make_output_format(), makeND_output_format(), FFD4Sequence::read(), and FFSequence::read().
| const string ff_types | ( | Type | dods_type | ) |
Definition at line 247 of file util_ff.cc.
Referenced by make_output_format(), makeND_output_format(), FFD4Sequence::read(), and FFSequence::read().
| bool file_exist | ( | const char * | filename | ) |
Definition at line 532 of file util_ff.cc.
Referenced by ff_read_descriptors(), and read_attributes().
| const string find_ancillary_rss_das | ( | const string & | dataset, |
| const string & | delimiter = format_delimiter(), |
||
| const string & | extension = format_extension() |
||
| ) |
| const string find_ancillary_rss_formats | ( | const string & | dataset, |
| const string & | delimiter = format_delimiter(), |
||
| const string & | extension = format_extension() |
||
| ) |
| const string& format_delimiter | ( | const string & | new_delimiter = "" | ) |
| const string& format_extension | ( | const string & | new_extension = "" | ) |
| void free_ff_char_vector | ( | char ** | v, |
| int | len | ||
| ) |
Free a char ** vector that db_ask() allocates.
This code uses free() to do the delete.
Definition at line 232 of file util_ff.cc.
References free().

| dods_float64 get_float_value | ( | BaseType * | var | ) | |
| throw | ( | InternalErr | |||
| ) | |||||
Definition at line 735 of file util_ff.cc.
References get_integer_value().
Referenced by DODS_Time_Factory::get().

| dods_uint32 get_integer_value | ( | BaseType * | var | ) | |
| throw | ( | InternalErr | |||
| ) | |||||
Get the value of the BaseType Variable.
If it's not something that we can convert to an integer, throw InternalErr.
| var | The variable |
Definition at line 708 of file util_ff.cc.
Referenced by DODS_Time_Factory::get(), DODS_Date_Factory::get(), and get_float_value().
| bool is_float_type | ( | BaseType * | btp | ) |
Definition at line 678 of file util_ff.cc.
Referenced by DODS_Time_Factory::DODS_Time_Factory().
| bool is_integer_type | ( | BaseType * | btp | ) |
Definition at line 652 of file util_ff.cc.
Referenced by DODS_Date_Factory::DODS_Date_Factory(), and DODS_Time_Factory::DODS_Time_Factory().
| const string make_output_format | ( | const string & | name, |
| Type | type, | ||
| const int | width | ||
| ) |
| const string makeND_output_format | ( | const string & | name, |
| Type | type, | ||
| const int | width, | ||
| int | ndim, | ||
| const long * | start, | ||
| const long * | edge, | ||
| const long * | stride, | ||
| string * | dname | ||
| ) |
| long read_ff | ( | const char * | dataset, |
| const char * | if_file, | ||
| const char * | o_format, | ||
| char * | o_buffer, | ||
| unsigned long | bsize | ||
| ) |
Read from a file/database using the FreeForm API.
Data values are read using an input file descriptor and written using an output format description.
| dataset | The name of the file/database to read from |
| if_file | The input format descriptor |
| o_format | The output format description |
| o_buffer | Value-result parameter for the data |
| bsize | Size of the buffer in bytes |
Definition at line 156 of file util_ff.cc.
References BES_SYNTAX_USER_ERROR, BESDEBUG, struct_ff_bufsize::buffer, struct_ff_bufsize::bytes_used, err_count(), struct_ff_std_args::error_prompt, FALSE, ff_create_bufsize(), ff_create_std_args(), ff_destroy_bufsize(), ff_destroy_std_args(), struct_ff_std_args::input_file, struct_ff_std_args::input_format_file, struct_ff_std_args::struct_std_args_user::is_stdin_redirected, struct_ff_std_args::log_file, newform(), NULL, struct_ff_std_args::output_bufsize, struct_ff_std_args::output_file, struct_ff_std_args::output_format_buffer, SCRATCH_QUANTA, struct_ff_bufsize::total_bytes, struct_ff_bufsize::usage, and struct_ff_std_args::user.
Referenced by FFArray::extract_array(), FFD4Sequence::read(), and FFSequence::read().

| long Records | ( | const string & | filename | ) |
| int SetDodsDB | ( | FF_STD_ARGS_PTR | std_args, |
| DATA_BIN_HANDLE | dbin_h, | ||
| char * | Msgt | ||
| ) |
Given a set of standard arguments (input filenames), allocate a DATA-BIN_HANDLE and return an error code.
Once called, the caller should free the std_args parameter.
| std_args | A pointer to a structure that holds a number of input and out file names. |
Definition at line 402 of file util_ff.cc.
References assert, db_make(), db_set(), DBSET_CREATE_CONDUITS, DBSET_HEADER_FILE_NAMES, DBSET_HEADERS, DBSET_INIT_CONDUITS, DBSET_INPUT_FORMATS, DBSET_READ_EQV, dll_free_holdings(), ERR_API, ERR_MEM_LACK, FFF_DATA, FFF_INPUT, struct_ff_std_args::input_file, struct_ff_std_args::input_format_buffer, struct_ff_std_args::input_format_file, struct_ff_std_args::input_format_title, Msgt_size, NULL, struct_ff_std_args::output_file, struct_ff_std_args::records_to_read, and ROUTINE_NAME.
Referenced by ff_read_descriptors(), read_attributes(), and Records().

| const int Msgt_size = 255 |
Definition at line 44 of file util_ff.h.
Referenced by ff_read_descriptors(), and SetDodsDB().