Merge pull request #1844 from jrw972/monterey
[ACE_TAO.git] / TAO / TAO_IDL / include / ast_home.h
blobd12a3624009f7f4899047c620c88b2b8e6b8fedc
1 // This may look like C, but it's really -*- C++ -*-
2 #ifndef _AST_HOME_AST_HOME_HH
3 #define _AST_HOME_AST_HOME_HH
5 #include "ast_interface.h"
7 class AST_Home;
8 class AST_Component;
9 class AST_ValueType;
11 class TAO_IDL_FE_Export AST_Home : public virtual AST_Interface
13 public:
14 AST_Home (UTL_ScopedName *n,
15 AST_Home *base_home,
16 AST_Component *managed_component,
17 AST_Type *primary_key,
18 AST_Type **supports,
19 long n_supports,
20 AST_Interface **supports_flat,
21 long n_supports_flat);
23 virtual ~AST_Home (void);
25 // Extend lookup to the base home.
26 virtual AST_Decl *look_in_inherited (UTL_ScopedName *e,
27 bool full_def_only);
29 // Extend lookup to the supported interfaces.
30 virtual AST_Decl *look_in_supported (UTL_ScopedName *e,
31 bool full_def_only);
33 // Overridden for homes from the UTL_Scope method.
34 virtual AST_Decl *special_lookup (UTL_ScopedName *,
35 bool full_def_only,
36 AST_Decl *&final_parent_decl);
38 // Accessors.
40 AST_Home *base_home (void) const;
42 AST_Type **supports (void) const;
44 long n_supports (void) const;
46 AST_Component *managed_component (void) const;
48 AST_Type *primary_key (void) const;
50 void transfer_scope_elements (AST_Interface *dst);
52 // Cleanup function.
53 virtual void destroy (void);
55 // Narrowing.
57 DEF_NARROW_FROM_DECL(AST_Home);
58 DEF_NARROW_FROM_SCOPE(AST_Home);
60 // AST Dumping.
61 virtual void dump (ACE_OSTREAM_TYPE &o);
63 // Visiting.
64 virtual int ast_accept (ast_visitor *visitor);
66 static AST_Decl::NodeType const NT;
68 private:
69 // Scope Management Protocol.
71 friend int tao_yyparse (void);
72 friend class ast_visitor_tmpl_module_inst;
74 virtual AST_Factory *fe_add_factory (AST_Factory *f);
75 virtual AST_Finder *fe_add_finder (AST_Finder *f);
77 private:
78 AST_Home *pd_base_home;
79 AST_Component *pd_managed_component;
80 AST_Type *pd_primary_key;
81 bool owns_primary_key_;
84 #endif // _AST_HOME_AST_HOME_HH