summaryrefslogtreecommitdiff
path: root/ACEXML/parser/debug_validator/Element_Tree.i
blob: 4b408835403673ab4c5578003a533608f15b835a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
// $Id$

ACEXML_INLINE
ACEXML_Element_Tree_Node::ACEXML_Element_Tree_Node ()
  : next_ (0)
{
}

ACEXML_INLINE ACEXML_Element_Tree_Node *
ACEXML_Element_Tree_Node::next ()
{
  return this->next_;
}

ACEXML_INLINE void
ACEXML_Element_Tree_Node::next (ACEXML_Element_Tree_Node * n)
{
  this->next_ = n;
}

ACEXML_INLINE
ACEXML_Element_Tree_Name_Node::ACEXML_Element_Tree_Name_Node (const ACEXML_Char *name,
                                                              int release)
  : name_ (name, 0, release)
{
}

ACEXML_INLINE void
ACEXML_Element_Tree_Name_Node::set (const ACEXML_Char *name,
                                    int release)
{
  this->name_.set (name, release);
}

ACEXML_INLINE
ACEXML_Element_Tree_List_Node::ACEXML_Element_Tree_List_Node (void)
  : type_ (SEQUENCE),
    head_ (0),
    tail_ (0),
    pop_next_ (0)
{
}

ACEXML_INLINE ACEXML_Element_Tree_List_Node::LIST_TYPE
ACEXML_Element_Tree_List_Node::get (void)
{
  return this->type_;
}

ACEXML_INLINE int
ACEXML_Element_Tree_List_Node::set (ACEXML_Element_Tree_List_Node::LIST_TYPE type)
{
  this->type_ = type;
  return 0;
}

ACEXML_INLINE
ACEXML_Element_Tree_List_Stack::ACEXML_Element_Tree_List_Stack (void)
  : top_ (0)
{
}

ACEXML_INLINE ACEXML_Element_Tree_List_Node *
ACEXML_Element_Tree_List_Stack::top ()
{
  return this->top_;
}

ACEXML_INLINE  void
ACEXML_Element_Tree_List_Stack::push (ACEXML_Element_Tree_List_Node *n)
{
  n->pop_next_ = this->top_;
  this->top_ = n;
}

ACEXML_INLINE ACEXML_Element_Tree_List_Node *
ACEXML_Element_Tree_List_Stack::pop ()
{
  if (this->top_ != 0)
    {
      ACEXML_Element_Tree_List_Node *ptr = this->top_;
      this->top_ = this->top_->pop_next_;
      return ptr;
    }
  return 0;
}

ACEXML_INLINE int
ACEXML_Element_Tree_List_Stack::empty ()
{
  return this->top_ == 0;
}