44 #include "AsciiOutput.h"
45 #include "get_ascii.h"
47 using namespace dap_asciival;
51 BaseType *this_btp =
dynamic_cast < BaseType *
>(
this);
53 throw InternalErr(__FILE__, __LINE__,
54 "Instance of AsciiOuput must also be a BaseType.");
55 BaseType *btp = _redirect;
59 BaseType *btp2 = this_btp->get_parent();
63 return dynamic_cast < AsciiOutput *
>(btp2)->get_full_name()
74 bool print_name)
throw(InternalErr)
76 BaseType *BTptr = _redirect;
78 BTptr =
dynamic_cast < BaseType *
>(
this);
82 throw InternalErr(__FILE__, __LINE__,
83 "An instance of AsciiOutput failed to cast to BaseType.");
86 strm << get_full_name() <<
", " ;
88 BTptr->print_val(strm,
"",
false);
98 const vector < int >&shape)
100 DBG(cerr <<
"Entering increment_state" << endl);
102 vector < int >::reverse_iterator state_riter;
103 vector < int >::const_reverse_iterator shape_riter;
104 for (state_riter = state->rbegin(), shape_riter = shape.rbegin();
105 state_riter < state->rend(); state_riter++, shape_riter++) {
106 if (*state_riter == *shape_riter - 1) {
109 *state_riter = *state_riter + 1;
111 DBG(cerr <<
"Returning state:";
112 for_each(state->begin(), state->end(), print < int >);
119 DBG(cerr <<
"Returning state without change:";
120 for_each(state->begin(), state->end(), print < int >);