1 // This may look like C, but it's really -*- C++ -*-
2 #ifndef _AST_COMPONENT_AST_COMPONENT_HH
3 #define _AST_COMPONENT_AST_COMPONENT_HH
5 #include "ast_interface.h"
6 #include "ace/Unbounded_Queue.h"
13 class AST_Extended_Port
;
14 class AST_Mirror_Port
;
16 class TAO_IDL_FE_Export AST_Component
17 : public virtual AST_Interface
20 AST_Component (UTL_ScopedName
*n
,
21 AST_Component
*base_component
,
24 AST_Interface
**supports_flat
,
25 long n_supports_flat
);
27 virtual ~AST_Component (void);
29 // This also calls the base class version.
30 virtual void redefine (AST_Interface
*from
);
32 // Extend lookup to the base component.
33 virtual AST_Decl
*look_in_inherited (UTL_ScopedName
*e
,
36 // Extend lookup to the supported interfaces.
37 virtual AST_Decl
*look_in_supported (UTL_ScopedName
*e
,
42 AST_Component
*base_component (void) const;
44 AST_Type
**supports (void) const;
46 long n_supports (void) const;
48 // Override for component of UTL_Scope method.
49 virtual AST_Decl
*special_lookup (UTL_ScopedName
*e
,
51 AST_Decl
*&final_parent_decl
);
54 virtual void destroy (void);
56 // Allows adding an uses to a later point
57 // The port i is inserted after port ix, if
59 int be_add_uses (AST_Uses
*i
,
64 DEF_NARROW_FROM_DECL (AST_Component
);
65 DEF_NARROW_FROM_SCOPE (AST_Component
);
68 virtual void dump (ACE_OSTREAM_TYPE
&);
71 virtual int ast_accept (ast_visitor
*visitor
);
73 static AST_Decl::NodeType
const NT
;
74 typedef AST_ComponentFwd FWD_TYPE
;
77 virtual AST_Provides
*fe_add_provides (AST_Provides
*p
);
79 virtual AST_Uses
*fe_add_uses (AST_Uses
*p
);
81 virtual AST_Publishes
*fe_add_publishes (AST_Publishes
*p
);
83 virtual AST_Emits
*fe_add_emits (AST_Emits
*p
);
85 virtual AST_Consumes
*fe_add_consumes (AST_Consumes
*p
);
87 virtual AST_Extended_Port
*fe_add_extended_port (AST_Extended_Port
*p
);
89 virtual AST_Mirror_Port
*fe_add_mirror_port (AST_Mirror_Port
*p
);
92 AST_Component
*pd_base_component
;
95 #endif // _AST_COMPONENT_AST_COMPONENT_HH