Merge pull request #1844 from jrw972/monterey
[ACE_TAO.git] / TAO / TAO_IDL / be_include / be_visitor_component_scope.h
blob476efb135825874bc099195185cf427e8afc2dc8
1 /* -*- c++ -*- */
2 //=============================================================================
3 /**
4 * @file be_visitor_component_scope.h
6 * Base class for visitors that need to visit the scope of a
7 * component and its ancestors, if any.
9 * @author Jeff Parsons
11 //=============================================================================
13 #ifndef _BE_COMPONENT_COMPONENT_SCOPE_H_
14 #define _BE_COMPONENT_COMPONENT_SCOPE_H_
16 #include "ace/SString.h"
18 #include "be_visitor_scope.h"
20 /**
21 * @class be_visitor_component_scope
23 * @brief be_visitor_component_scope
25 * This is an abstract visitor providing a scope visitation
26 * method that traverses the base component recursively.
28 class be_visitor_component_scope : public be_visitor_scope
30 protected:
31 be_visitor_component_scope (be_visitor_context *ctx);
33 virtual ~be_visitor_component_scope (void);
35 public:
36 virtual int visit_extended_port (be_extended_port *node);
37 virtual int visit_mirror_port (be_mirror_port *node);
39 /// Automatically iterates over ancestor scopes, if any.
40 int visit_component_scope (be_component *node);
42 /// These two methods are used instead of overriding
43 // visit_porttype so we can traverse a porttype only
44 /// when it is referenced.
46 int visit_porttype_scope (be_porttype *node);
48 /// Swaps uses for provides members and vice versa.S
49 int visit_porttype_scope_mirror (be_porttype *node);
51 /// Set the member.
52 void node (be_component *c);
54 protected:
55 void gen_svnt_entrypoint_decl (void);
56 void gen_svnt_entrypoint_defn (void);
57 void gen_exec_entrypoint_decl (void);
58 void gen_exec_entrypoint_defn (void);
60 protected:
61 be_component *node_;
62 TAO_OutStream &os_;
63 ACE_CString export_macro_;
64 bool in_ext_port_;
67 #endif /* _BE_COMPONENT_COMPONENT_SCOPE_H_ */