14 #ifndef AP_SEQUENCE_HXX
17 #ifndef ARB_FORWARD_LIST_H
40 template <
typename ELEM>
42 typedef arb_forward_list<ELEM*>
BASE;
48 BASE::push_front(element);
58 iterator i = BASE::begin();
61 if (++n == BASE::end()) {
62 BASE::insert_after(i, element);
70 BASE::push_back(element);
74 if (BASE::empty())
return NULp;
85 const ELEM *
top()
const {
93 for (const_iterator i = BASE::begin(); i != BASE::end(); ++i) ++s;
95 #else // !defined(Cxx11)
100 bool empty()
const {
return BASE::empty(); }
107 #define PROVIDE_PRINT
110 #if defined(PROVIDE_PRINT)
128 typedef unsigned long Level;
155 #if defined(PROVIDE_PRINT)
156 void print(std::ostream& out,
int indentLevel = 0)
const;
164 #if defined(PROVIDE_PRINT)
165 void print(std::ostream& out,
int indentLevel = 0)
const;
172 #if defined(ASSERTION_USED)
173 #define CHECK_ROOT_POPS
199 AP_tree_nlen *
put(AP_tree_nlen *
node) { nodes.insert(node);
return node; }
208 bool has_node(AP_tree_nlen *
node)
const {
return nodes.find(node) != nodes.end(); }
227 inline AP_tree_nlen *
makeNode(AP_pars_root *proot);
233 #if defined(ASSERTION_USED)
234 #define CHECK_STACK_RESOURCE_HANDLING
239 #if defined(CHECK_STACK_RESOURCE_HANDLING)
240 enum ResHandled { NO, ACCEPTED, REVERTED } resources_handled;
247 , resources_handled(NO)
254 #if defined(CHECK_STACK_RESOURCE_HANDLING)
266 #if defined(CHECK_STACK_RESOURCE_HANDLING)
268 resources_handled = REVERTED;
273 #if defined(CHECK_STACK_RESOURCE_HANDLING)
275 resources_handled = ACCEPTED;
280 #if defined(CHECK_ROOT_POPS)
283 #if defined(PROVIDE_PRINT)
284 void print(std::ostream& out,
int indentLevel,
Level frameNr)
const;
289 #if defined(PROVIDE_PRINT)
290 void print(std::ostream& out,
int indentLevel = 0)
const;
295 #error AP_buffer.hxx included twice
296 #endif // AP_BUFFER_HXX
void extract_common(ResourceStack &stack1, ResourceStack &stack2)
NodeState(Level frame_nr)
void accept_resources(StackFrameData *current, ResourceStack *common)
void destroyEdge(AP_tree_edge *edge)
AP_tree_edge * makeEdge(AP_tree_nlen *n1, AP_tree_nlen *n2)
AP_tree_nlen * root_at_create
size_t count_elements() const
#define CHECK_STACK_RESOURCE_HANDLING
std::set< AP_tree_nlen * > NodeSet
std::set< AP_tree_edge * > EdgeSet
void accept_resources(StackFrameData *previous, ResourceStack *common)
BASE::const_iterator const_iterator
StackFrameData * take_previous_frame_data()
arb_forward_list< ELEM * > BASE
void extract_common_to(ResourceStack &common)
void move_nodes(ResourceStack &target)
GB_write_int const char GB_write_autoconv_string WRITE_SKELETON(write_pointer, GBDATA *,"%p", GB_write_pointer) char *AW_awa if)(!gb_var) return strdup("")
AP_tree_edge * put(AP_tree_edge *edge)
void revert_resources(StackFrameData *previous)
void move_edges(ResourceStack &target)
bool has_node(AP_tree_nlen *node) const
void destroyNode(AP_tree_nlen *node)
void revert_resources(StackFrameData *current)
void shift(ELEM *element)
AP_tree_nlen * makeNode(AP_pars_root *proot)
AP_tree_nlen * put(AP_tree_nlen *node)
NodeStack(StackFrameData *&data)
void move_info_to(NodeState &target, AP_STACK_MODE what)
GB_write_int const char s