191 std::vector<dimension> _shape;
193 bool direct_io_flag =
false;
205 uint64_t
print_array(FILE *out, uint64_t index,
unsigned int dims, uint64_t
shape[]);
207 uint64_t
print_array(ostream &out, uint64_t index,
unsigned int dims, uint64_t
shape[]);
209 std::vector<dimension> &
shape() {
return _shape; }
217 typedef std::vector<dimension>::const_iterator
Dim_citer;
248 void rename_dim(
const string &oldName =
"",
const string &newName =
"");
276 virtual unsigned int dimensions(
bool constrained =
false);
284 void print_decl(ostream &out,
string space =
" ",
bool print_semi =
true,
bool constraint_info =
false,
285 bool constrained =
false)
override;
287 void print_xml(ostream &out,
string space =
" ",
bool constrained =
false)
override;
293 virtual void print_xml_core(FILE *out,
string space,
bool constrained,
string tag);
294 virtual void print_xml_core(ostream &out,
string space,
bool constrained,
string tag);
297 virtual void print_as_map_xml(ostream &out,
string space =
" ",
bool constrained =
false);
299 void print_val(ostream &out,
string space =
"",
bool print_decl_p =
true)
override;
301 void print_xml(FILE *out,
string space =
" ",
bool constrained =
false)
override;
302 virtual void print_as_map_xml(FILE *out,
string space =
" ",
bool constrained =
false);
303 void print_val(FILE *out,
string space =
"",
bool print_decl_p =
true)
override;
304 void print_decl(FILE *out,
string space =
" ",
bool print_semi =
true,
bool constraint_info =
false,
305 bool constrained =
false)
override;
309 bool is_dap4_projected(std::vector<std::string> &projected_dap4_inventory)
override;
311 void dump(ostream &strm)
const override;
315 void set_dio_flag(
bool dio_flag_value =
true) { direct_io_flag = dio_flag_value; }
virtual void print_as_map_xml_writer(XMLWriter &xml, bool constrained)
void print_dap4(XMLWriter &xml, bool constrained=false) override
Print the DAP4 representation of an array.
virtual int dimension_start(Dim_iter i, bool constrained=false)
Return the start index of a dimension.
virtual void clear_constraint()
Clears the projection; add each projected dimension explicitly using add_constraint.
virtual void add_constraint_ll(Dim_iter i, int64_t start, int64_t stride, int64_t stop)
var_storage_info & get_var_storage_info()
virtual int64_t dimension_start_ll(Dim_iter i, bool constrained=false)
bool get_dio_flag() const
virtual int64_t dimension_stop_ll(Dim_iter i, bool constrained=false)
virtual int dimension_stop(Dim_iter i, bool constrained=false)
Return the stop index of the constraint.
void dump(ostream &strm) const override
dumps information about this object
virtual void update_length(int size=0)
bool is_dap4_projected(std::vector< std::string > &projected_dap4_inventory) override
virtual void add_constraint(Dim_iter i, int start, int stride, int stop)
Adds a constraint to an Array dimension.
virtual string dimension_name(Dim_iter i)
Returns the name of the specified dimension.
void print_decl(ostream &out, string space=" ", bool print_semi=true, bool constraint_info=false, bool constrained=false) override
Prints a DDS entry for the Array.
virtual int64_t dimension_size_ll(Dim_iter i, bool constrained=false)
void print_xml(ostream &out, string space=" ", bool constrained=false) override
void print_val(ostream &out, string space="", bool print_decl_p=true) override
Prints the value of the variable.
BaseType * ptr_duplicate() override
void append_dim(int size, const string &name="")
Add a dimension of a given size.
std::vector< dimension >::iterator Dim_iter
virtual D4Dimension * dimension_D4dim(Dim_iter i)
void rename_dim(const string &oldName="", const string &newName="")
Renames dimension.
std::vector< BaseType * > * transform_to_dap2(AttrTable *parent_attr_table) override
Transforms this instance of a D4Array into the corresponding DAP2 object.
std::vector< dimension > & shape()
virtual int dimension_size(Dim_iter i, bool constrained=false)
Returns the size of the dimension.
virtual void print_xml_writer_core(XMLWriter &out, bool constrained, string tag)
std::vector< dimension >::const_iterator Dim_citer
void add_var(BaseType *v, Part p=nil) override
Add the BaseType pointer to this constructor type instance.
uint64_t print_array(FILE *out, uint64_t index, unsigned int dims, uint64_t shape[])
Print the value given the current constraint.
virtual void print_as_map_xml(ostream &out, string space=" ", bool constrained=false)
void print_xml_writer(XMLWriter &xml, bool constrained=false) override
virtual void reset_constraint()
Reset constraint to select entire array.
void set_var_storage_info(const var_storage_info &my_vs_info)
Set the variable storage information for direct IO optimization.
virtual ~Array()
The Array destructor.
virtual void print_xml_core(FILE *out, string space, bool constrained, string tag)
void add_var_nocopy(BaseType *v, Part p=nil) override
void append_dim_ll(int64_t size, const string &name="")
void prepend_dim(int size, const string &name="")
void set_dio_flag(bool dio_flag_value=true)
void transform_to_dap4(D4Group *root, Constructor *container) override
DAP2 to DAP4 transform.
Array(const string &n, BaseType *v, bool is_dap4=false)
Array constructor.
bool check_semantics(string &msg, bool all=false) override
Check semantic features of the Array.
virtual void update_length_ll(unsigned long long size=0)
virtual unsigned int dimensions(bool constrained=false)
Return the total number of dimensions in the array.
virtual int64_t dimension_stride_ll(Dim_iter i, bool constrained=false)
void _duplicate(const Array &a)
Array & operator=(const Array &rhs)
virtual int dimension_stride(Dim_iter i, bool constrained=false)
Returns the stride value of the constraint.
Contains the attributes for a dataset.
The basic data type for the DODS DAP types.
virtual string name() const
Returns the name of the class instance.
virtual bool is_dap4() const
Vector(const string &n, BaseType *v, const Type &t, bool is_dap4=false)
The Vector constructor.
top level DAP object to house generic methods
Part
Names the parts of multi-section constructor data types.
int64_t start
The constraint start index.
int64_t stride
The constraint stride.
string name
The name of this dimension.
D4Dimension * dim
If not null, a weak pointer to the D4Dimension.
int64_t size
The unconstrained dimension size.
int64_t stop
The constraint end index.
bool use_sdim_for_slice
Used to control printing the DMR in data responses.
dimension(int64_t s, string n)
int64_t c_size
Size of dimension once constrained.
unsigned long long chunk_buffer_size
vector< unsigned long long > chunk_coords
unsigned long long chunk_direct_io_offset
vector< size_t > chunk_dims
vector< var_chunk_info_t > var_chunk_info
vector< unsigned int > deflate_levels