76 string allowed =
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-+_.@" ;
79 string first =
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_" ;
81 string::size_type i = 0;
83 while( (i = in.find_first_not_of( allowed, i ) ) != string::npos)
85 in.replace( i, 1,
"_" ) ;
89 if( first.find( in[0] ) == string::npos )
105 nc_type x_type = NC_NAT ;
107 string var_type = element->type_name() ;
108 if( var_type ==
"Byte" )
110 else if( var_type ==
"String" )
112 else if( var_type ==
"Int16" )
119 else if( var_type ==
"UInt16" )
121 else if( var_type ==
"Int32" )
123 else if( var_type ==
"UInt32" )
125 else if( var_type ==
"Float32" )
127 else if( var_type ==
"Float64" )
154 vector<string>::const_iterator i = embed.begin() ;
155 vector<string>::const_iterator e = embed.end() ;
159 if( first ) new_name = (*i) ;
163 if( first ) new_name = name ;
166 original = new_name ;
210 case dods_structure_c:
213 case dods_sequence_c:
217 string err = (string)
"file out netcdf, unable to "
218 +
"write unknown variable type" ;
240 if( stax != NC_NOERR )
242 const char *nerr = nc_strerror( stax ) ;
245 err += (string)
": " + nerr ;
249 err += (string)
": unknown error" ;
exception thrown if inernal error encountered
A DAP Int32 and UInt32 with file out netcdf information included.
A DAP Array with file out netcdf information included.
A DAP Float64 with file out netcdf information included.
#define FONC_EMBEDDED_SEPARATOR
A DAP Grid with file out netcdf information included.
static vector< FONcDim * > Dimensions
A class representing the DAP Str class for file out netcdf.
static string name_prefix
If a variable name, dimension name, or attribute name begins with a character that is not supported b...
A DAP Structure with file out netcdf information included.
static nc_type get_nc_type(BaseType *element)
translate the OPeNDAP data type to a netcdf data type
A class representing the DAP Byte class for file out netcdf.
static void handle_error(int stax, string &err, const string &file, int line)
handle any netcdf errors
static void reset()
Resets the FONc transformation for a new input and out file.
A DAP BaseType with file out netcdf information included.
A DAP Float32 with file out netcdf information included.
static string gen_name(const vector< string > &embed, const string &name, string &original)
generate a new name for the embedded variable
static FONcBaseType * convert(BaseType *v)
creates a FONc object for the given DAP object
A DAP Int16 and UInt16 with file out netcdf information included.
A DAP Sequence with file out netcdf information included.
static string id2netcdf(string in)
convert the provided string to a netcdf allowed identifier.
static vector< FONcMap * > Maps
global list of maps that could be shared amongst the different grids