Merge pull request #2303 from jwillemsen/jwi-803
[ACE_TAO.git] / TAO / TAO_IDL / be_include / be_visitor_scope.h
blob2d6bce2400120e2a72476d68c31c4fab825bb726
1 /* -*- c++ -*- */
2 //=============================================================================
3 /**
4 * @file be_visitor_scope.h
6 * Concrete visitor for the base "BE_Scope" node
8 * @author Aniruddha Gokhale and Carlos O'Ryan
9 */
10 //=============================================================================
13 #ifndef TAO_BE_VISITOR_SCOPE_H
14 #define TAO_BE_VISITOR_SCOPE_H
16 #include "be_visitor_decl.h"
19 /**
20 * @class be_visitor_scope
22 * @brief be_visitor_scope
24 * This is a concrete visitor for the be_scope node. Its only purpose is to
25 * iterate over the elements of the scope
27 class be_visitor_scope : public be_visitor_decl
29 public:
30 /// constructor
31 be_visitor_scope (be_visitor_context *ctx);
33 /// destructor
34 ~be_visitor_scope ();
36 /// visit scope
37 int visit_scope (be_scope *node);
39 /// do any processing after every element except the last one of the scope is
40 /// processed
41 virtual int post_process (be_decl *);
43 /// do any processing prior to processing the element in the scope
44 virtual int pre_process (be_decl *);
46 /// return the element number that is being processed
47 virtual int elem_number ();
49 /// get the successor to elem
50 virtual int next_elem (be_decl *elem, be_decl *&);
52 /// Is bd the last node in the scope
53 virtual bool last_node (be_decl *bd);
55 /// Is bd the last inout or out in the scope
56 bool last_inout_or_out_node (be_decl *bd);
58 protected:
59 int elem_number_;
63 #endif // TAO_BE_VISITOR_SCOPE_H