26 #ifndef GEN_CUR1_INCLUDED
27 #define GEN_CUR1_INCLUDED
34 #include "../base/ver.h"
38 #include "../base/str.h"
41 #ifndef CHECK_INCLUDED
42 #include "../base/check.h"
45 #ifndef STACK_INCLUDED
46 #include "../bds/stack.h"
57 static const long GEN_CUR1_MAGIC = 0x4743310AL;
94 "gen_cur1_c::fetch: cursor not open");
95 CHECK(TupleNo <= Size,
96 "gen_cur1_c::fetch: fetch beyond end");
119 int state = TupleNo % 6;
124 if(BottomUp <= MaxValue) {
139 if(MiddleUp <= MaxValue) {
155 if(BottomUp <= MaxValue) {
165 if(MiddleUp <= MaxValue) {
190 "gen_cur1_c::c1: cursor not open");
192 "gen_cur1_c::c1: fetch must be called first");
193 CHECK(TupleNo <= Size,
194 "gen_cur1_c::c1: fetch beyond end");
208 "gen_cur1_c::close: cursor not open");
222 if(!stack->push(TupleNo))
226 if(!stack->push(BottomUp))
228 if(!stack->push(TopDown))
230 if(!stack->push(MiddleUp))
232 if(!stack->push(MiddleDown))
246 MiddleDown = stack->pop();
247 MiddleUp = stack->pop();
248 TopDown = stack->pop();
249 BottomUp = stack->pop();
251 TupleNo = stack->pop();
345 #define GEN_CUR1_NULL (static_cast<gen_cur1_t>(0))
#define CHECK_IMPOSSIBLE(MSG)
Definition: check.h:151
#define CHECK_VALID(EX)
Definition: check.h:85
const char * str_t
Definition: str.h:41
Definition: gen_cur1.h:63
#define STR_NULL
Definition: str.h:52
#define CHECK(EX, MSG)
Definition: check.h:69