|
OPeNDAP Hyrax Back End Server (BES)
Updated for version 3.8.3
|
#include <AsciiArray.h>


Public Member Functions | |
| AsciiArray (const string &n, BaseType *v) | |
| AsciiArray (Array *bt) | |
| string | get_full_name () |
| Get the fully qualified name of this object. More... | |
| int | get_index (vector< int > indices) throw (InternalErr) |
| int | get_nth_dim_size (size_t n) throw (InternalErr) |
| Get the size of dimension #n#. More... | |
| vector< int > | get_shape_vector (size_t n) throw (InternalErr) |
| Get the sizes of the first N dimensions of this array. More... | |
| bool | increment_state (vector< int > *state, const vector< int > &shape) |
| Increment #state# to the next value given #shape#. More... | |
| virtual void | print_ascii (ostream &strm, bool print_name=true) throw (InternalErr) |
| Print an ASCII representation for an instance of BaseType's children. More... | |
| int | print_row (ostream &strm, int index, int number) |
| Print a single row of values for a N-dimensional array. More... | |
| virtual BaseType * | ptr_duplicate () |
| virtual | ~AsciiArray () |
Protected Attributes | |
| BaseType * | _redirect |
Definition at line 44 of file AsciiArray.h.
| AsciiArray::AsciiArray | ( | const string & | n, |
| BaseType * | v | ||
| ) |
Definition at line 61 of file AsciiArray.cc.
| AsciiArray::AsciiArray | ( | Array * | bt | ) |
Definition at line 65 of file AsciiArray.cc.
References dap_asciival::basetype_to_asciitype().

|
virtual |
Definition at line 90 of file AsciiArray.cc.
|
inherited |
Get the fully qualified name of this object.
Names of nested constructor types are separated by dots (.).
Definition at line 49 of file AsciiOutput.cc.
| int AsciiArray::get_index | ( | vector< int > | indices | ) | |
| throw | ( | InternalErr | |||
| ) | |||||
Definition at line 185 of file AsciiArray.cc.
| int AsciiArray::get_nth_dim_size | ( | size_t | n | ) | |
| throw | ( | InternalErr | |||
| ) | |||||
Get the size of dimension #n#.
Get the size of the Nth dimension.
| n | Return the size of the n^{th} dimension. |
| InternalErr. |
The first dimension is N == 0.
| n | The index. Uses sero-based indexing. |
Definition at line 241 of file AsciiArray.cc.
| vector< int > AsciiArray::get_shape_vector | ( | size_t | n | ) | |
| throw | ( | InternalErr | |||
| ) | |||||
Get the sizes of the first N dimensions of this array.
This `shape vector' may be used in all sorts of output formatters.
Definition at line 218 of file AsciiArray.cc.
|
inherited |
Increment #state# to the next value given #shape#.
This method uses simple modulo arithmetic to provide a way to iterate over all combinations of dimensions of an Array or Grid. The vector #shape# holds the maximum sizes of each of N dimensions. The vector #state# holds the current index values of those N dimensions. Calling this method increments #state# to the next dimension, varying the rightmost fastest.
To print DODS Array and Grid objects according to the DAP 2.0 specification, #state# and #shape# should be vectors of length N-1 for an object of dimension N.
Definition at line 98 of file AsciiOutput.cc.
|
virtual | ||||||||||||||||||||
Print an ASCII representation for an instance of BaseType's children.
Print values as ASCII Prints the values of this in ASCII suitable for import into a spreadsheet.
This version prints the suggested output only for simple types. Complex types should overload this with their own definition.
The caller of this method is responsible for adding a trialing comma where appropriate.
| strm | Write to this stream. |
| print_name | If True, write the name of the variable, a comma and then the value. If False, simply write the value. |
This version prints only the values of simple types; other types such as Array specialize this method (see AsciiArray::print_ascii()).
| strm | Output stream for values Name of this variable to include in the ASCII output. |
Reimplemented from AsciiOutput.
Definition at line 94 of file AsciiArray.cc.
Referenced by AsciiGrid::print_ascii(), and print_row().
| int AsciiArray::print_row | ( | ostream & | strm, |
| int | index, | ||
| int | number | ||
| ) |
Print a single row of values for a N-dimensional array.
Since we store N-dim arrays in vectors, #index# gives the starting point in that vector for this row and #number# is the number of values to print. The counter #index# is returned.
| os | Write to stream os. |
| index | Print values starting from this point. |
| number | Print this many values. |
Definition at line 150 of file AsciiArray.cc.
References AsciiOutput::_redirect, dap_asciival::basetype_to_asciitype(), print_ascii(), and AsciiOutput::print_ascii().

|
virtual |
Definition at line 56 of file AsciiArray.cc.
|
protectedinherited |
Definition at line 52 of file AsciiOutput.h.
Referenced by AsciiSequence::print_ascii_row(), AsciiSequence::print_ascii_rows(), and print_row().