Specialization of Sequence for cached responses.
More...
#include <CachedSequence.h>
Specialization of Sequence for cached responses.
Assumes that the data are loaded into the Sequence using set_value()
Definition at line 42 of file CachedSequence.h.
◆ CachedSequence() [1/3]
CachedSequence::CachedSequence |
( |
const string & |
n | ) |
|
|
inline |
The Sequence constructor.
The Sequence constructor requires only the name of the variable to be created. The name may be omitted, which will create a nameless variable. This may be adequate for some applications.
- Parameters
-
n | A string containing the name of the variable to be created. |
Definition at line 59 of file CachedSequence.h.
◆ CachedSequence() [2/3]
CachedSequence::CachedSequence |
( |
const string & |
n, |
|
|
const string & |
d |
|
) |
| |
|
inline |
The Sequence server-side constructor.
The Sequence server-side constructor requires the name of the variable to be created and the dataset name from which this variable is being created.
- 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. |
Definition at line 71 of file CachedSequence.h.
◆ CachedSequence() [3/3]
◆ ~CachedSequence()
virtual CachedSequence::~CachedSequence |
( |
| ) |
|
|
inlinevirtual |
◆ dump()
void CachedSequence::dump |
( |
ostream & |
strm | ) |
const |
|
virtual |
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 232 of file CachedSequence.cc.
◆ intern_data()
void CachedSequence::intern_data |
( |
libdap::ConstraintEvaluator & |
eval, |
|
|
libdap::DDS & |
dds |
|
) |
| |
|
virtual |
Specialization that resets CachedSequence's 'value index' state variable.
This specialization resets the index into the 'value' field and calls the parent class' method.
- Parameters
-
Definition at line 216 of file CachedSequence.cc.
◆ load_prototypes_with_values()
void CachedSequence::load_prototypes_with_values |
( |
libdap::BaseTypeRow & |
btr, |
|
|
bool |
safe = true |
|
) |
| |
|
protected |
◆ operator=()
◆ ptr_duplicate()
virtual BaseType * CachedSequence::ptr_duplicate |
( |
| ) |
|
|
inlinevirtual |
◆ read_row()
bool CachedSequence::read_row |
( |
int |
row, |
|
|
libdap::DDS & |
dds, |
|
|
libdap::ConstraintEvaluator & |
eval, |
|
|
bool |
ce_eval |
|
) |
| |
|
virtual |
Read row number row of the Sequence.
This version of read_row() gets the next row of data from the internal 'values' of the Sequence (d_values field) and loads them into the prototype variables so that the stock serialize() code can be used to write them out.
- Note
- This code can likely replace the class TabularSequence in bes/functions. It is a more general version of that because it should work for nested sequences too.
-
The first row is row number zero. A Sequence with 100 rows will have row numbers 0 to 99. This method makes use of the get_row_number() method (added in libdap 3.17.1) that wraps the d_row_number field. The field uses -1 as a sentinel meaning 'before the start' so the value must be incremented to '0' before it can be used to read a row.
- Returns
- A boolean value, with TRUE indicating that read_row should be called again because there's more data to be read. FALSE indicates the end of the Sequence.
- Parameters
-
row | The row number to read. |
dds | A reference to the DDS for this dataset. |
eval | Use this as the constraint expression evaluator. |
ce_eval | If True, evaluate any CE, otherwise do not. |
Definition at line 142 of file CachedSequence.cc.
◆ serialize()
bool CachedSequence::serialize |
( |
libdap::ConstraintEvaluator & |
eval, |
|
|
libdap::DDS & |
dds, |
|
|
libdap::Marshaller & |
m, |
|
|
bool |
ce_eval = true |
|
) |
| |
|
virtual |
Specialization that resets CachedSequence's 'value index' state variable.
This specialization resets the index into the 'value' field and calls the parent class' method.
- Parameters
-
- Returns
- The value of the parent class' serialize() method.
Definition at line 199 of file CachedSequence.cc.
◆ d_value_index
unsigned int CachedSequence::d_value_index |
|
protected |
The documentation for this class was generated from the following files: