summaryrefslogtreecommitdiff
path: root/TAO/TAO_IDL/be_include/be_visitor_scope.h
blob: 095dee0ae32ba717f5a7ec058bf79d252e1009ad (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
//
// $Id$
//
/* -*- c++ -*- */
// ============================================================================
//
// = LIBRARY
//    TAO IDL
//
// = FILENAME
//    be_visitor_scope.h
//
// = DESCRIPTION
//    Concrete visitor for the base "BE_Scope" node
//
// = AUTHOR
//    Aniruddha Gokhale and Carlos O'Ryan
//
// ============================================================================

#ifndef TAO_BE_VISITOR_SCOPE_H
#define TAO_BE_VISITOR_SCOPE_H

#include "be_visitor.h"
#include "be_visitor_decl.h"

class be_visitor_scope : public be_visitor_decl
{
  //
  // = TITLE
  //    be_visitor_scope
  //
  // = DESCRIPTION
  //   This is a concrete visitor for the be_scope node. Its only purpose is to
  //   iterate over the elements of the scope
  //
public:
  be_visitor_scope (be_visitor_context *ctx);
  // constructor

  ~be_visitor_scope (void);
  // destructor

  int visit_scope (be_scope *node);
  // visit scope

  virtual int post_process (be_decl *);
  // do any processing after every element except the last one of the scope is
  // processed

  virtual int pre_process (be_decl *);
  // do any processing prior to processing the element in the scope

  virtual int elem_number (void);
  // return the element number that is being processed

  virtual int next_elem (be_decl *elem, be_decl *&);
  // get the successor to elem

  virtual idl_bool last_node (be_decl *bd);
  // Is bd the last node in the scope

protected:
  int elem_number_;
};


#endif // TAO_BE_VISITOR_SCOPE_H