summaryrefslogtreecommitdiff
path: root/TAO/TAO_IDL/include/fe_interface_header.h
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/TAO_IDL/include/fe_interface_header.h')
-rw-r--r--TAO/TAO_IDL/include/fe_interface_header.h112
1 files changed, 52 insertions, 60 deletions
diff --git a/TAO/TAO_IDL/include/fe_interface_header.h b/TAO/TAO_IDL/include/fe_interface_header.h
index 5b1b3e46ef1..550aa92f952 100644
--- a/TAO/TAO_IDL/include/fe_interface_header.h
+++ b/TAO/TAO_IDL/include/fe_interface_header.h
@@ -72,6 +72,7 @@ trademarks or registered trademarks of Sun Microsystems, Inc.
class UTL_NameList;
class AST_Interface;
+class AST_ValueType;
// Internal class for FE to describe interface headers
//
@@ -83,97 +84,88 @@ class TAO_IDL_FE_Export FE_InterfaceHeader
{
public:
FE_InterfaceHeader (UTL_ScopedName *n,
- UTL_NameList *l,
- UTL_NameList *supports = 0,
- idl_bool compile_now = 1);
+ UTL_NameList *inherits,
+ idl_bool is_local,
+ idl_bool is_abstract,
+ idl_bool compile_now);
virtual ~FE_InterfaceHeader (void);
// Data Accessors
- UTL_ScopedName *interface_name (void);
- AST_Interface **inherits (void);
- long n_inherits (void);
- AST_Interface **inherits_flat (void);
- long n_inherits_flat (void);
+ UTL_ScopedName *name (void) const;
+ AST_Interface **inherits (void) const;
+ long n_inherits (void) const;
+ AST_Interface **inherits_flat (void) const;
+ long n_inherits_flat (void) const;
- virtual idl_bool is_local (void);
+ idl_bool is_local (void) const;
// See if we are a local interface.
- virtual idl_bool is_abstract (void);
+ idl_bool is_abstract (void) const;
// See if we are an abstract interface.
// Data
protected:
- UTL_ScopedName *pd_interface_name; // Interface name
-private:
- // Used for eventual code generation
- AST_Interface **pd_inherits; // Inherited interfaces
- long pd_n_inherits; // How many
+ UTL_ScopedName *pd_interface_name;
+
+ // Inherited interfaces.
+ AST_Interface **pd_inherits;
+ long pd_n_inherits;
+
+ // Used for name clash checking.
+ AST_Interface **pd_inherits_flat;
+ long pd_n_inherits_flat;
- // Used for name clash checking
- AST_Interface **pd_inherits_flat; // All ancestors
- long pd_n_inherits_flat; // How many
+ idl_bool pd_is_local;
+ idl_bool pd_is_abstract;
// Operations
// Compile the flattened unique list of interfaces which this
- // interface inherits from
+ // interface inherits from.
protected:
- void compile_inheritance(UTL_NameList *l,
- UTL_NameList *supports);
-private:
- void compile_one_inheritance(AST_Interface *i);
+ void compile_inheritance (UTL_NameList *ifaces,
+ idl_bool for_valuetype);
- // called from compile_inheritance()
- virtual idl_bool check_first (AST_Interface *i);
- virtual idl_bool check_further (AST_Interface *i);
- virtual idl_bool check_supports (AST_Interface *i);
-};
-
-
-class FE_Local_InterfaceHeader : public FE_InterfaceHeader
-{
-public:
- FE_Local_InterfaceHeader (UTL_ScopedName *n,
- UTL_NameList *l,
- UTL_NameList *supports = 0);
+ void compile_one_inheritance (AST_Interface *i);
- virtual idl_bool is_local (void);
- // See if we are a local interface.
+ // Called from compile_inheritance().
+ idl_bool check_inherit (AST_Interface *i,
+ idl_bool for_valuetype);
};
-class FE_Abstract_InterfaceHeader : public FE_InterfaceHeader
-{
-public:
- FE_Abstract_InterfaceHeader (UTL_ScopedName *n,
- UTL_NameList *l,
- UTL_NameList *supports = 0);
-
- virtual idl_bool is_abstract (void);
- // See if we are an abstract interface.
-};
class FE_obv_header : public FE_InterfaceHeader
{
public:
- // Constructor(s)
- FE_obv_header(UTL_ScopedName *n, UTL_NameList *l, UTL_NameList *supports);
- virtual ~FE_obv_header() {}
+ FE_obv_header (UTL_ScopedName *n,
+ UTL_NameList *inherits,
+ UTL_NameList *supports,
+ idl_bool truncatable);
+ virtual ~FE_obv_header (void);
// Data Accessors
- void valuetype_name (UTL_ScopedName *n);
- long n_concrete ();
+ AST_Interface **supports (void) const;
+ long n_supports (void) const;
+ AST_ValueType *inherits_concrete (void) const;
+ AST_Interface *supports_concrete (void) const;
+ idl_bool truncatable (void) const;
+
+private:
+ // Supported interfaces.
+ AST_Interface **pd_supports;
+ long pd_n_supports;
- private:
+ AST_ValueType *pd_inherits_concrete;
+ AST_Interface *pd_supports_concrete;
- // called from compile_inheritance()
- virtual idl_bool check_first (AST_Interface *i);
- virtual idl_bool check_further (AST_Interface *i);
- virtual idl_bool check_supports (AST_Interface *i);
+ // Currently ignored.
+ idl_bool pd_truncatable;
- idl_bool truncatable_; /* currently 0, ignored */
- long n_concrete_;
+private:
+ void compile_supports (UTL_NameList *supports);
+ idl_bool check_concrete_supported_inheritance (AST_Interface *d);
};
#endif // _FE_INTERFACE_HEADER_FE_INTERFACE_HH