36 static char rcsid[]
not_used =
"$Id$";
41 #include "AttrTable.h"
43 #include "InternalErr.h"
44 #include "dods-datatypes.h"
57 AttrTable *at = dds.get_attr_table().find_container(attribute_name);
59 throw Error(
string(
"DODS_Time_Factory requires that the ")
60 + attribute_name +
string(
" attribute be present."));
62 string hours_name = at->get_attr(
"hours_variable");
63 string mins_name = at->get_attr(
"minutes_variable");
64 string secs_name = at->get_attr(
"seconds_variable");
65 string gmt = at->get_attr(
"gmt_time");
79 _hours = dds.var(hours_name);
81 throw Error(
"DODS_Time_Factory: The variable used for hours must be an integer.");
83 _minutes = dds.var(mins_name);
85 throw Error(
"DODS_Time_Factory: The variable used for minutes must be an integer.");
87 _seconds = dds.var(secs_name);
89 throw Error(
"DODS_Time_Factory: The variable used for seconds must be an integer.");
bool is_integer_type(BaseType *btp)
bool is_float_type(BaseType *btp)
virtual DODS_Time get()
Read a time value from a dataset.
dods_float64 get_float_value(BaseType *var)
dods_uint32 get_integer_value(BaseType *var)
Get the value of the BaseType Variable.