1 /******************************************************************************
2 * Copyright (c) 2000-2016 Ericsson Telecom AB
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Eclipse Public License v1.0
5 * which accompanies this distribution, and is available at
6 * http://www.eclipse.org/legal/epl-v10.html
12 ******************************************************************************/
13 #ifndef _langviz_Node_HH
14 #define _langviz_Node_HH
17 * Base class for AST-classes.
21 /** To detect missing/duplicated invoking of destructor. */
24 /** Linked list for tracking undeleted nodes. */
25 Node *prev_node, *next_node;
28 /** Default constructor. */
30 /** The copy constructor. */
34 * "Virtual constructor".
36 virtual Node* clone() const =0;
37 /** The destructor. */
39 /** Gives an error message if counter is not zero. It can be
40 * invoked before the program exits (like check_mem_leak()) to
41 * verify that all Nodes are destructed. */
42 static void chk_counter();
45 #endif // _langviz_Node_HH