2 * CDE - Common Desktop Environment
4 * Copyright (c) 1993-2012, The Open Group. All rights reserved.
6 * These libraries and programs are free software; you can
7 * redistribute them and/or modify them under the terms of the GNU
8 * Lesser General Public License as published by the Free Software
9 * Foundation; either version 2 of the License, or (at your option)
12 * These libraries and programs are distributed in the hope that
13 * they will be useful, but WITHOUT ANY WARRANTY; without even the
14 * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 * PURPOSE. See the GNU Lesser General Public License for more
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with these librararies and programs; if not, write
20 * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
21 * Floor, Boston, MA 02110-1301 USA
23 /* $XConsortium: Element.h /main/5 1996/08/21 15:50:08 drk $ */
29 #include "dti_cc/CC_Slist.h"
34 /* **************************************************************
37 this is the structure passed from the node parser to the Resolver.
38 It contains the Element GI, and the attribute list for the element
39 ************************************************************** */
47 Element(const Element&);
48 Element(const Symbol &gi,
49 unsigned int sibling_number = 0,
50 AttributeList *attrs = 0,
51 AttributeList *olias_attrs = 0,
52 unsigned int relative_sibling_number = 0
56 const Symbol &gi() const { return f_gi ; }
58 const Attribute *get_attribute(const Symbol &name) const ;
59 const Attribute *get_olias_attribute(const Symbol &name) const;
61 unsigned int sibling_number() const { return f_sibling_number ; }
62 unsigned int relative_sibling_number() const
63 { return f_relative_sibling_number; }
65 int last_child() const { return f_last_child; }
66 int relatively_last_child() const
67 { return f_relatively_last_child; }
69 ostream &print(ostream &) const ;
73 unsigned int f_sibling_number ; // counting all children of a parent
74 AttributeList *f_attributes;
75 AttributeList *f_olias_attributes;
76 unsigned int f_freeAttrLists;
77 unsigned int f_relative_sibling_number ; // counting all
78 // consecutive children
82 int f_relatively_last_child;
86 ostream &operator<<(ostream &o, const Element &e)
92 #endif /* _Element_h */
93 /* DO NOT ADD ANY LINES AFTER THIS #endif */