libdap::Array Class Reference

A multidimensional array of identical data types. More...

`#include <Array.h>`

Inheritance diagram for libdap::Array:

## Classes

struct | dimension
struct | var_chunk_info_t
struct | var_storage_info

## Public Types

typedef std::vector< dimension >::const_iterator | Dim_citer
typedef std::vector< dimension >::iterator | Dim_iter

## Public Member Functions

virtual void | add_constraint (Dim_iter i, D4Dimension *dim)
virtual void | add_constraint (Dim_iter i, int start, int stride, int stop)
| Adds a constraint to an Array dimension.
virtual void | add_constraint_ll (Dim_iter i, int64_t start, int64_t stride, int64_t stop)
void | add_var (BaseType *v, Part p=nil) override
| Add the BaseType pointer to this constructor type instance.
void | add_var_nocopy (BaseType *v, Part p=nil) override
void | append_dim (D4Dimension *dim)
void | append_dim (int size, const string &name="")
| Add a dimension of a given size.
void | append_dim_ll (int64_t size, const string &name="")
| Array (const Array &rhs)
| The Array copy constructor.
| Array (const string &n, BaseType *v, bool is_dap4=false)
| Array constructor.
| Array (const string &n, const string &d, BaseType *v, bool is_dap4=false)
| Array constructor.
bool | check_semantics (string &msg, bool all=false) override
| Check semantic features of the Array.
void | clear_all_dims ()
virtual void | clear_constraint ()
| Clears the projection; add each projected dimension explicitly using add_constraint.
Dim_iter | dim_begin ()
Dim_iter | dim_end ()
virtual D4Dimension * | dimension_D4dim (Dim_iter i)
virtual string | dimension_name (Dim_iter i)
| Returns the name of the specified dimension.
virtual int | dimension_size (Dim_iter i, bool constrained=false)
| Returns the size of the dimension.
virtual int64_t | dimension_size_ll (Dim_iter i, bool constrained=false)
virtual int | dimension_start (Dim_iter i, bool constrained=false)
| Return the start index of a dimension.
virtual int64_t | dimension_start_ll (Dim_iter i, bool constrained=false)
virtual int | dimension_stop (Dim_iter i, bool constrained=false)
| Return the stop index of the constraint.
virtual int64_t | dimension_stop_ll (Dim_iter i, bool constrained=false)
virtual int | dimension_stride (Dim_iter i, bool constrained=false)
| Returns the stride value of the constraint.
virtual int64_t | dimension_stride_ll (Dim_iter i, bool constrained=false)
virtual unsigned int | dimensions (bool constrained=false)
| Return the total number of dimensions in the array.
void | dump (ostream &strm) const override
| dumps information about this object
bool | get_dio_flag () const
var_storage_info & | get_var_storage_info ()
bool | is_dap2_grid ()
bool | is_dap4_projected (std::vector< std::string > &projected_dap4_inventory) override
virtual D4Maps * | maps ()
Array & | operator= (const Array &rhs)
void | prepend_dim (D4Dimension *dim)
void | prepend_dim (int size, const string &name="")
virtual void | print_as_map_xml (FILE *out, string space=" ", bool constrained=false)
virtual void | print_as_map_xml (ostream &out, string space=" ", bool constrained=false)
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.
void | print_decl (FILE *out, string space=" ", bool print_semi=true, bool constraint_info=false, bool constrained=false) override
void | print_decl (ostream &out, string space=" ", bool print_semi=true, bool constraint_info=false, bool constrained=false) override
void | print_val (FILE *out, string space="", bool print_decl_p=true) override
void | print_val (ostream &out, string space="", bool print_decl_p=true) override
void | print_xml (FILE *out, string space=" ", bool constrained=false) override
| Prints a DDS entry for the Array.
void | print_xml (ostream &out, string space=" ", bool constrained=false) override
virtual void | print_xml_core (FILE *out, string space, bool constrained, string tag)
virtual void | print_xml_core (ostream &out, string space, bool constrained, string tag)
void | print_xml_writer (XMLWriter &xml, bool constrained=false) override
virtual void | print_xml_writer_core (XMLWriter &out, bool constrained, string tag)
BaseType * | ptr_duplicate () override
void | rename_dim (const string &oldName="", const string &newName="")
| Renames dimension.
virtual void | reset_constraint ()
| Reset constraint to select entire array.
void | set_dio_flag (bool dio_flag_value=true)
void | set_var_storage_info (const var_storage_info &my_vs_info)
| Set the variable storage information for direct IO optimization.
std::vector< BaseType * > * | transform_to_dap2 (AttrTable *parent_attr_table) override
| Transforms this instance of a D4Array into the corresponding DAP2 object.
void | transform_to_dap4 (D4Group *root, Constructor *container) override
virtual void | update_length (int size=0)
virtual void | update_length_ll (unsigned long long size=0)
virtual | ~Array ()
| The Array destructor.

## Protected Member Functions

void | _duplicate (const Array &a)
uint64_t | print_array (FILE *out, uint64_t index, unsigned int dims, uint64_t shape[])
| Print the value given the current constraint.
uint64_t | print_array (ostream &out, uint64_t index, unsigned int dims, uint64_t shape[])
| Print the value given the current constraint.
std::vector< dimension > & | shape ()

## Friends

class | ArrayTest
class | D4Group

## Detailed Description

A multidimensional array of identical data types.

This class is used to hold arrays of data. The elements of the array can be simple or compound data types. There is no limit on the number of dimensions an array can have, or on the size of each dimension.

If desired, the user can give each dimension of an array a name. You can, for example, have a 360x180 array of temperatures, covering the whole globe with one-degree squares. In this case, you could name the first dimension Longitude and the second dimension Latitude. This can help prevent a great deal of confusion.

The Array is used as part of the Grid class, where the dimension names are crucial to its structure. The dimension names correspond to Map vectors, holding the actual values for that column of the array.

In DAP4, the Array may be a Coverage or a simple Array. In the former case the Array will have both named dimensions and maps, where the maps (instances of D4Map) are what make the Array a Coverage. Coverages are a generalization of DAP2 Grids.

Each array dimension carries with it its own projection information. The projection information takes the form of three integers: the start, stop, and stride values. This is clearest with an example. Consider a one-dimensional array 10 elements long. If the start value of the dimension constraint is 3, then the constrained array appears to be seven elements long. If the stop value is changed to 7, then the array appears to be five elements long. If the stride is changed to two, the array will appear to be 3 elements long. Array constraints are written as: [start:stride:stop].

    A = [1 2 3 4 5 6 7 8 9 10]

    A[3::] = [4 5 6 7 8 9 10]

    A[3::7] = [4 5 6 7 8]

    A[3:2:7] = [4 6 8]

    A[0:3:9] = [1 4 7 10]

Note
  Arrays use zero-based indexing.
  This class is used for both DAP2 and DAP4.
  An interesting 'feature' of the DAP4 Array is that its Maps are added after construction. None of the Array constructors build the Maps, but the copy ctor is supposed to copy it correctly. The original design has pointers for the parent and the source of the Map's value, but the actual 'parent' array is the object being constructed, so it does not exist! I have thus replaced the pointers with paths. Use the dataset's root group find_var() method to get the objects. The root group can be found using the new BaseType::get_ancestor() method. jhrg 9/16/22

See also
  Grid
  Vector
  dimension

Definition at line 121 of file Array.h.

## Member Typedef Documentation

## Dim_citer

typedef std::vector<dimension>::const_iterator libdap::Array::Dim_citer

A constant iterator used to access the various dimensions of an Array.

See also
  dim_begin()
  dim_end()

Definition at line 227 of file Array.h.

## Dim_iter

typedef std::vector<dimension>::iterator libdap::Array::Dim_iter

An iterator used to access the various dimensions of an Array. Most of the methods that access various properties of a dimension use an instance of Dim_iter.

See also
  dim_begin()
  dim_end()

Definition at line 235 of file Array.h.

## Constructor & Destructor Documentation

## Array() [1/3]

libdap::Array::Array | ( | const string & | n,
|  | BaseType * | v,
|  | bool | is_dap4 = false )

Array constructor.

Build an array with a name and an element type. The name may be omitted, which will create a nameless variable. The template (element type) pointer may also be omitted, but if it is omitted when the Array is created, it must be added (with `add_var()` od add_var_nocopy()) before `read()` or `deserialize()` is called.

This version of add_var() calls Array::add_var().

Parameters

  n | A string containing the name of the variable to be created.
  v | A pointer to a variable of the type to be included in the Array. May be null and set later using add_var() or add_var_nocopy()

Definition at line 133 of file Array.cc.

## Array() [2/3]

libdap::Array::Array | ( | const string & | n,
|  | const string & | d,
|  | BaseType * | v,
|  | bool | is_dap4 = false )

Array constructor.

Build an array on the server-side with a name, a dataset name from which this Array is being created, and an element type.

This version of add_var() calls Array::add_var().

Parameters

  n | A string containing the name of the variable to be created.
  d | A string containing the name of the dataset from which this variable is being created.
  v | A pointer to a variable of the type to be included in the Array.

Definition at line 152 of file Array.cc.

## Array() [3/3]

libdap::Array::Array | ( | const Array & | rhs | ) |

The Array copy constructor.

Definition at line 160 of file Array.cc.

## ~Array()

libdap::Array::~Array | ( |  | ) |

virtual

The Array destructor.

Definition at line 163 of file Array.cc.

## Member Function Documentation

## _duplicate()

void libdap::Array::_duplicate | ( | const Array & | a | ) |

protected

Definition at line 75 of file Array.cc.

## add_constraint() [1/2]

void libdap::Array::add_constraint | ( | Dim_iter | i,
|  | D4Dimension * | dim )

virtual

Definition at line 703 of file Array.cc.

## add_constraint() [2/2]

void libdap::Array::add_constraint | ( | Dim_iter | i,
|  | int | start,
|  | int | stride,
|  | int | stop )

virtual

Adds a constraint to an Array dimension.

Once a dimension has been created (see append_dim()), it can be constrained. This will make the array appear to the rest of the world to be smaller than it is. This functions sets the projection for a dimension, and marks that dimension as part of the current projection.

Note
  A stride value <= 0 or > the array size is an error and causes add_constraint to throw an Error. Similarly, start or stop values > size also cause an Error exception to be thrown.

Parameters

  i | An iterator pointing to the dimension in the list of dimensions.
  start | The start index of the constraint.
  stride | The stride value of the constraint.
  stop | The stop index of the constraint. A value of -1 indicates 'to the end' of the array.

Exceptions

  Error | Thrown if the any of values of start, stop or stride cannot be applied to this array.

Definition at line 627 of file Array.cc.

## add_constraint_ll()

void libdap::Array::add_constraint_ll | ( | Dim_iter | i,
|  | int64_t | start,
|  | int64_t | stride,
|  | int64_t | stop )

virtual

Definition at line 669 of file Array.cc.

## add_var()

void libdap::Array::add_var | ( | BaseType * | v,
|  | Part | p = nil )

override

Add the BaseType pointer to this constructor type instance.

Propagate the name of the BaseType instance to this instance. This ensures that variables at any given level of the DDS table have unique names (i.e., that Arrays do not have their default name ""). If v's name is null, then assume that the array is named and don't overwrite it with v's null name.

Note
  It is possible for the BaseType pointer to be null when this method is called, a behavior that differs considerably from that of the other 'add_var()' methods.
  This version checks to see if v is an array. If so, it calls Vector::add_var() using the template variable of v and then appends the dimensions of v to this array. This somewhat obscure behavior simplifies 'translating' Sequences to arrays when the actual variable being translated is not a regular Sequence but an array of Sequences. This is of very debatable usefulness, but it's here all the same.

Parameters

  v | The template variable for the array
  p | The Part parameter defaults to nil and is ignored by this method.

Definition at line 456 of file Array.cc.

## add_var_nocopy()

void libdap::Array::add_var_nocopy | ( | BaseType * | v,
|  | Part | p = nil )

override

Definition at line 475 of file Array.cc.

## append_dim() [1/2]

void libdap::Array::append_dim | ( | D4Dimension * | dim | ) |

Definition at line 522 of file Array.cc.

## append_dim() [2/2]

void libdap::Array::append_dim | ( | int | size,
|  | const string & | name = "" )

Add a dimension of a given size.

Given a size and a name, this function adds a dimension to the array. For example, if the Array is already 10 elements long, calling append_dim with a size of 5 will transform the array into a 10x5 matrix. Calling it again with a size of 2 will create a 10x5x2 array, and so on. This sets Vector's length member as a side effect.

Parameters

  size | The size of the desired new row.
  name | The name of the new dimension. This defaults to an empty string.

Definition at line 504 of file Array.cc.

## append_dim_ll()

void libdap::Array::append_dim_ll | ( | int64_t | size,
|  | const string & | name = "" )

Definition at line 511 of file Array.cc.

## check_semantics()

bool libdap::Array::check_semantics | ( | string & | msg,
|  | bool | all = false )

override

Check semantic features of the Array.

This function checks semantic features of the Array. Currently, the only check specific to the Array is that there must be dimensions. The rest is inherited from BaseType::check_semantics().

Returns
  A boolean value. FALSE means there was a problem.

Definition at line 1319 of file Array.cc.

## clear_all_dims()

void libdap::Array::clear_all_dims | ( |  | ) |

Remove all the dimensions currently set for the Array. This also removes all constraint information.

Definition at line 553 of file Array.cc.

## clear_constraint()

void libdap::Array::clear_constraint | ( |  | ) |

virtual

Clears the projection; add each projected dimension explicitly using add_constraint.

Tell the Array object to clear the constraint information about dimensions. Do this once before calling add_constraint() for each new constraint expression. Only the dimensions explicitly selected using add_constraint() will be sent.

Deprecated
  This should never be used.

Definition at line 600 of file Array.cc.

## dim_begin()

Array::Dim_iter libdap::Array::dim_begin | ( |  | ) |

Returns an iterator to the first dimension of the Array.

Definition at line 718 of file Array.cc.

## dim_end()

Array::Dim_iter libdap::Array::dim_end | ( |  | ) |

Returns an iterator past the last dimension of the Array.

Definition at line 721 of file Array.cc.

## dimension_D4dim()

D4Dimension * libdap::Array::dimension_D4dim | ( | Dim_iter | i | ) |

virtual

Definition at line 887 of file Array.cc.

## dimension_name()

string libdap::Array::dimension_name | ( | Dim_iter | i | ) |

virtual

Returns the name of the specified dimension.

This function returns the name of the dimension indicated with p. Since this method is public, it is possible to call it before the Array object has been properly initialized. This will cause an exception. So don't do that.

Parameters

  i | The dimension.

Returns
  A pointer to a string containing the dimension name.

Definition at line 876 of file Array.cc.

## dimension_size()

int libdap::Array::dimension_size | ( | Dim_iter | i,
|  | bool | constrained = false )

virtual

Returns the size of the dimension.

Return the size of the array dimension referred to by i. If the dimension is constrained the constrained size is returned if constrained is `true`.

Parameters

  i | The dimension.
  constrained | If this parameter is TRUE, the method returns the constrained size of the array so long as a constraint has been applied to this dimension. If TRUE and no constraint has been applied, this method returns zero. If it is FALSE, the method ignores any constraint that has been applied to this dimension and returns the full size of the dimension. The default value is FALSE.

Returns
  An integer containing the size of the specified dimension.

Definition at line 752 of file Array.cc.

## dimension_size_ll()

int64_t libdap::Array::dimension_size_ll | ( | Dim_iter | i,
|  | bool | constrained = false )

virtual

Definition at line 848 of file Array.cc.

## dimension_start()

int libdap::Array::dimension_start | ( | Dim_iter | i,
|  | bool | constrained = false )

virtual

Return the start index of a dimension.

Use this function to return the start index of an array dimension. If the array is constrained (indicated with the constrained argument), the start index of the constrained array is returned (or zero if the dimension in question is not selected at all). See also dimension_stop() and dimension_stride().

Parameters

  i | The dimension.
  constrained | If this parameter is TRUE, the function returns the start index only if the dimension is constrained (subject to a start, stop, or stride constraint). If the dimension is not constrained, the function returns zero. If it is FALSE, the function returns the start index whether or not the dimension is constrained.

Returns
  The desired start index.

Definition at line 790 of file Array.cc.

## dimension_start_ll()

int64_t libdap::Array::dimension_start_ll | ( | Dim_iter | i,
|  | bool | constrained = false )

virtual

Definition at line 860 of file Array.cc.

## dimension_stop()

int libdap::Array::dimension_stop | ( | Dim_iter | i,
|  | bool | constrained = false )

virtual

Return the stop index of the constraint.

Use this function to return the stop index of an array dimension. If the array is constrained (indicated with the constrained argument), the stop index of the constrained array is returned (or zero if the dimension in question is not selected at all). See also dimension_start() and dimension_stride().

Parameters

  i | The dimension.
  constrained | If this parameter is TRUE, the function returns the stop index only if the dimension is constrained (subject to a start, stop, or stride constraint). If the dimension is not constrained, the function returns zero. If it is FALSE, the function returns the stop index whether or not the dimension is constrained.

Returns
  The desired stop index.

Definition at line 815 of file Array.cc.

## dimension_stop_ll()

int64_t libdap::Array::dimension_stop_ll | ( | Dim_iter | i,
|  | bool | constrained = false )

virtual

Definition at line 862 of file Array.cc.

## dimension_stride()

int libdap::Array::dimension_stride | ( | Dim_iter | i,
|  | bool | constrained = false )

virtual

Returns the stride value of the constraint.

Use this function to return the stride value of an array dimension. If the array is constrained (indicated with the constrained argument), the stride value of the constrained array is returned (or zero if the dimension in question is not selected at all). See also dimension_stop() and dimension_start().

Parameters

  i | The dimension.
  constrained | If this parameter is TRUE, the function returns the stride value only if the dimension is constrained (subject to a start, stop, or stride constraint). If the dimension is not constrained, the function returns zero. If it is FALSE, the function returns the stride value whether or not the dimension is constrained.

Returns
  The stride value requested, or zero, if constrained is TRUE and the dimension is not selected.

Definition at line 841 of file Array.cc.

## dimension_stride_ll()

int64_t libdap::Array::dimension_stride_ll | ( | Dim_iter | i,
|  | bool | constrained = false )

virtual

Definition at line 864 of file Array.cc.

## dimensions()

unsigned int libdap::Array::dimensions | ( | bool | constrained = false | ) |

virtual

Return the total number of dimensions in the array.

Return the total number of dimensions contained in the array. When constrained is TRUE, return the number of dimensions given the most recently evaluated constraint expression.

Parameters

  constrained | A boolean flag to indicate whether the array is constrained or not. Ignored.

Definition at line 733 of file Array.cc.

## dump()

void libdap::Array::dump | ( | ostream & | strm | ) | const

override

dumps information about this object

Displays the pointer value of this instance and information about this instance.

Parameters

  strm | C++ i/o stream to dump the information to

Returns
  void

Definition at line 1379 of file Array.cc.

## get_dio_flag()

bool libdap::Array::get_dio_flag | ( |  | ) | const

inline

Definition at line 324 of file Array.h.

## get_var_storage_info()

var_storage_info & libdap::Array::get_var_storage_info | ( |  | ) |

inline

Definition at line 326 of file Array.h.

## is_dap2_grid()

bool libdap::Array::is_dap2_grid | ( |  | ) |

Definition at line 233 of file Array.cc.

## is_dap4_projected()

bool libdap::Array::is_dap4_projected | ( | std::vector< std::string > & | inventory | ) |

override

When send_p() is true and the attributes or variables have dap4 data types then a description of the instance is added to the inventory and true is returned.

Parameters

  inventory | is a value-result parameter

Returns
  True when send_p() is true, false otherwise

Definition at line 1353 of file Array.cc.

## maps()

D4Maps * libdap::Array::maps | ( |  | ) |

virtual

Definition at line 889 of file Array.cc.

## operator=()

Array & libdap::Array::operator= | ( | const Array & | rhs | ) |

Definition at line 167 of file Array.cc.

## prepend_dim() [1/2]

void libdap::Array::prepend_dim | ( | D4Dimension * | dim | ) |

Definition at line 542 of file Array.cc.

## prepend_dim() [2/2]

void libdap::Array::prepend_dim | ( | int | size,
|  | const string & | name = "" )

Creates a new OUTER dimension (slowest varying in rowmajor) for the array by prepending rather than appending it.

Parameters

  size | cardinality of the new dimension
  name | optional name for the new dimension

Definition at line 534 of file Array.cc.

## print_array() [1/2]

uint64_t libdap::Array::print_array | ( | FILE * | out,
|  | uint64_t | index,
|  | unsigned int | dims,
|  | uint64_t | shape[] )

protected

Print the value given the current constraint.

Prints the values in ASCII of the entire (constrained) array. This method Attempts to make an aesthetically pleasing display. However, it is primarily intended for debugging purposes.

Parameters

  out | Write the output to this FILE *.
  index |
  dims |
  shape |

Definition at line 1214 of file Array.cc.

## print_array() [2/2]

uint64_t libdap::Array::print_array | ( | ostream & | out,
|  | uint64_t | index,
|  | unsigned int | dims,
|  | uint64_t | shape[] )

protected

Print the value given the current constraint.

Prints the values in ASCII of the entire (constrained) array. This method Attempts to make an anesthetically pleasing display. However, it is primarily intended for debugging purposes.

Parameters

  out | Write the output to this ostream
  index |
  dims |
  shape |

Definition at line 1233 of file Array.cc.

## print_as_map_xml() [1/2]

void libdap::Array::print_as_map_xml | ( | FILE * | out,
|  | string | space = " ",
|  | bool | constrained = false )

virtual

Deprecated

Definition at line 1112 of file Array.cc.

## print_as_map_xml() [2/2]

void libdap::Array::print_as_map_xml | ( | ostream & | out,
|  | string | space = " ",
|  | bool | constrained = false )

virtual

Deprecated

Definition at line 1121 of file Array.cc.

## print_as_map_xml_writer()

void libdap::Array::print_as_map_xml_writer | ( | XMLWriter & | xml,
|  | bool | constrained )

virtual

Definition at line 1147 of file Array.cc.

## print_dap4()

void libdap::Array::print_dap4 | ( | XMLWriter & | xml,
|  | bool | constrained = false )

override

Print the DAP4 representation of an array.

Parameters

  xml |
  constrained |

Definition at line 987 of file Array.cc.

## print_val() [1/2]

void libdap::Array::print_val | ( | FILE * | out,
|  | string | space = "",
|  | bool | print_decl_p = true )

override

Definition at line 1277 of file Array.cc.

## print_val() [2/2]

void libdap::Array::print_val | ( | ostream & | out,
|  | string | space = "",
|  | bool | print_decl_p = true )

override

Definition at line 1283 of file Array.cc.

## print_xml() [1/2]

void libdap::Array::print_xml | ( | FILE * | out,
|  | string | space = " ",
|  | bool | constrained = false )

override

Prints a DDS entry for the Array.

Prints a declaration for the Array. This is what appears in a DDS. If the Array is constrained, the declaration will reflect the size of the Array once the constraint is applied.

Parameters

  out | Write the output to this FILE *.
  space | A string containing spaces to precede the declaration.
  print_semi | A boolean indicating whether to print a semi-colon after the declaration. (TRUE means ``print a semi-colon.'')
  constraint_info | A boolean value. See BaseType::print_decl().
  constrained | This argument should be TRUE if the Array is constrained, and FALSE otherwise. */ void Array::print_decl(FILE *out, string space, bool print_semi, bool constraint_info, bool constrained) { ostringstream oss; print_decl(oss, space, print_semi, constraint_info, constrained); fwrite(oss.str().data(), sizeof(char), oss.str().length(), out); }

/** Prints a declaration for the Array. This is what appears in a DDS. If the Array is constrained, the declaration will reflect the size of the Array once the constraint is applied.

Prints a DDS entry for the Array.

Parameters

  out | Write the output to this ostream.
  space | A string containing spaces to precede the declaration.
  print_semi | A boolean indicating whether to print a semi-colon after the declaration. (TRUE means ``print a semi-colon.'')
  constraint_info | A boolean value. See BaseType::print_decl().
  constrained | This argument should be TRUE if the Array is constrained, and FALSE otherwise. */ void Array::print_decl(ostream &out, string space, bool print_semi, bool constraint_info, bool constrained) { if (constrained && !send_p()) return;

print it, but w/o semicolon var()->print_decl(out, space, false, constraint_info, constrained);

for (Dim_citer i = _shape.begin(); i != _shape.end(); i++) { out << "["; if ((*i).name != "") { out << id2www((*i).name) << " = "; } if (constrained) { out << (*i).c_size << "]"; } else { out << (*i).size << "]"; } }

if (print_semi) { out << ";\n"; } }

/**

Deprecated

Definition at line 1094 of file Array.cc.

## print_xml() [2/2]

void libdap::Array::print_xml | ( | ostream & | out,
|  | string | space = " ",
|  | bool | constrained = false )

override

Deprecated

Definition at line 1103 of file Array.cc.

## print_xml_core() [1/2]

void libdap::Array::print_xml_core | ( | FILE * | out,
|  | string | space,
|  | bool | constrained,
|  | string | tag )

virtual

Deprecated

Definition at line 1130 of file Array.cc.

## print_xml_core() [2/2]

void libdap::Array::print_xml_core | ( | ostream & | out,
|  | string | space,
|  | bool | constrained,
|  | string | tag )

virtual

Deprecated

Definition at line 1139 of file Array.cc.

## print_xml_writer()

void libdap::Array::print_xml_writer | ( | XMLWriter & | xml,
|  | bool | constrained = false )

override

Definition at line 1145 of file Array.cc.

## print_xml_writer_core()

void libdap::Array::print_xml_writer_core | ( | XMLWriter & | out,
|  | bool | constrained,
|  | string | tag )

virtual

Definition at line 1178 of file Array.cc.

## ptr_duplicate()

BaseType * libdap::Array::ptr_duplicate | ( |  | ) |

override

Definition at line 165 of file Array.cc.

## rename_dim()

void libdap::Array::rename_dim | ( | const string & | oldName = "",
|  | const string & | newName = "" )

Renames dimension.

Renames dimension to a new name

Definition at line 560 of file Array.cc.

## reset_constraint()

void libdap::Array::reset_constraint | ( |  | ) |

virtual

Reset constraint to select entire array.

Resets the dimension constraint information so that the entire array is selected.

Definition at line 578 of file Array.cc.

## set_dio_flag()

void libdap::Array::set_dio_flag | ( | bool | dio_flag_value = true | ) |

inline

Definition at line 325 of file Array.h.

## set_var_storage_info()

void libdap::Array::set_var_storage_info | ( | const var_storage_info & | my_vs_info | ) |

Set the variable storage information for direct IO optimization.

Parameters

  the | struct that stores the variable storage information.

Returns
  void

Definition at line 1409 of file Array.cc.

## shape()

std::vector< dimension > & libdap::Array::shape | ( |  | ) |

inline protected

Definition at line 219 of file Array.h.

## transform_to_dap2()

std::vector< BaseType * > * libdap::Array::transform_to_dap2 | ( | AttrTable * | parent_attr_table | ) |

override

Transforms this instance of a D4Array into the corresponding DAP2 object.

This transformation may return an Array or a Grid object. The DAP2 Grid construct is semantically contained in the DAP4 concept of arrays with Map arrays. If all of the Maps are one dimensional then the D4Array can be represented as a Grid object.

Parameters

  The | AttrTable pointer parent_attr_table is used by Groups, which disappear from the DAP2 representation. Their children are returned in the the BAseType vector their attributes are added to parent_attr_table.

Returns
  A pointer to a vector of BaseType pointers (right?). In this D4Array case returned vector may contain a DAP2 Array or a Grid. Or, if the Array' prototype is a type that cannot be represented in DAP2 the return will be NULL.

Definition at line 287 of file Array.cc.

## transform_to_dap4()

void libdap::Array::transform_to_dap4 | ( | D4Group * | root,
|  | Constructor * | container )

override

Definition at line 175 of file Array.cc.

## update_length()

void libdap::Array::update_length | ( | int | size = 0 | ) |

virtual

Deprecated
  Calling this method should never be necessary. It is used internally and called whenever the size of the Array is changed, e.g., by a constraint.

Changes the length property of the array.

Definition at line 98 of file Array.cc.

## update_length_ll()

void libdap::Array::update_length_ll | ( | unsigned long long | size = 0 | ) |

virtual

Definition at line 107 of file Array.cc.

## Friends And Related Symbol Documentation

## ArrayTest

friend class ArrayTest

friend

Definition at line 209 of file Array.h.

## D4Group

friend class D4Group

friend

Definition at line 210 of file Array.h.

The documentation for this class was generated from the following files:

- Array.h
- Array.cc