summaryrefslogtreecommitdiff
path: root/TAO/TAO_IDL/include/utl_scope.h
diff options
context:
space:
mode:
authorparsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2002-07-01 13:49:23 +0000
committerparsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2002-07-01 13:49:23 +0000
commit0155b2254e16d6c9e5d0b6c0c101de84e4fe432f (patch)
tree3b973276984c17f2240b1724fe1c92026081e981 /TAO/TAO_IDL/include/utl_scope.h
parent23696f26059dd5f33b655db7be60db00400ba408 (diff)
downloadATCD-0155b2254e16d6c9e5d0b6c0c101de84e4fe432f.tar.gz
ChangeLogTag: Mon Jul 1 08:31:04 2002 Jeff Parsons <parsons@cs.wustl.edu>
Diffstat (limited to 'TAO/TAO_IDL/include/utl_scope.h')
-rw-r--r--TAO/TAO_IDL/include/utl_scope.h112
1 files changed, 89 insertions, 23 deletions
diff --git a/TAO/TAO_IDL/include/utl_scope.h b/TAO/TAO_IDL/include/utl_scope.h
index 835342e9715..a40cc055387 100644
--- a/TAO/TAO_IDL/include/utl_scope.h
+++ b/TAO/TAO_IDL/include/utl_scope.h
@@ -81,15 +81,44 @@ trademarks or registered trademarks of Sun Microsystems, Inc.
// the responsibility of those functions then to call the add()
// function defined in the parent "AST_" class.
-#include "idl_fwd.h"
-#include "idl_narrow.h"
#include "ast_decl.h"
#include "ast_expression.h"
+#include "ast_typedef.h"
#include "utl_scoped_name.h"
// This is for AIX w/IBM C++.
class Identifier;
+class AST_PredefinedType;
+class AST_Module;
+class AST_Interface;
+class AST_InterfaceFwd;
+class AST_ValueType;
+class AST_ValueTypeFwd;
+class AST_Component;
+class AST_ComponentFwd;
+class AST_Home;
+class AST_Constant;
+class AST_Exception;
+class AST_Attribute;
+class AST_Operation;
+class AST_Argument;
+class AST_Union;
+class AST_UnionFwd;
+class AST_UnionBranch;
+class AST_Structure;
+class AST_StructureFwd;
+class AST_Field;
+class AST_Enum;
+class AST_EnumVal;
+class AST_Sequence;
+class AST_String;
+class AST_Array;
+class AST_Native;
+class AST_Factory;
+class UTL_StrList;
+class UTL_NameList;
+
// Forward declaration of active iterator for UTL_Scope.
class UTL_ScopeActiveIterator;
@@ -121,6 +150,16 @@ public:
virtual AST_InterfaceFwd *add_interface_fwd (AST_InterfaceFwd *i);
+ virtual AST_ValueType *add_valuetype (AST_ValueType *i);
+
+ virtual AST_ValueTypeFwd *add_valuetype_fwd (AST_ValueTypeFwd *i);
+
+ virtual AST_Component *add_component (AST_Component *i);
+
+ virtual AST_ComponentFwd *add_component_fwd (AST_ComponentFwd *i);
+
+ virtual AST_Home *add_home (AST_Home *i);
+
virtual AST_Constant *add_constant (AST_Constant *c);
virtual AST_Exception *add_exception (AST_Exception *e);
@@ -133,10 +172,14 @@ public:
virtual AST_Union *add_union (AST_Union *u);
+ virtual AST_UnionFwd *add_union_fwd (AST_UnionFwd *u);
+
virtual AST_UnionBranch *add_union_branch (AST_UnionBranch *b);
virtual AST_Structure *add_structure (AST_Structure *s);
+ virtual AST_StructureFwd *add_structure_fwd (AST_StructureFwd *s);
+
virtual AST_Field *add_field (AST_Field *f);
virtual AST_Enum *add_enum (AST_Enum *e);
@@ -178,22 +221,22 @@ public:
// Other Operations.
// Name Lookup Mechanism
- virtual AST_Decl *lookup_by_name (UTL_ScopedName *,
- idl_bool treat_as_ref,
- idl_bool in_parent = 1);
+ AST_Decl *lookup_by_name (UTL_ScopedName *,
+ idl_bool treat_as_ref,
+ idl_bool in_parent = 1);
// Look up the Identifier * specified only in the local scope.
- virtual AST_Decl *lookup_by_name_local (Identifier *,
- long index);
+ AST_Decl *lookup_by_name_local (Identifier *,
+ long index);
// Look up a predefined type by its ExprType.
- virtual AST_Decl *lookup_primitive_type (AST_Expression::ExprType);
+ AST_Decl *lookup_primitive_type (AST_Expression::ExprType);
// Look up one of the pseudo-object types.
AST_Decl *lookup_pseudo (Identifier *);
// How many entries are used?
- virtual unsigned long nmembers (void);
+ unsigned long nmembers (void);
// Add to decls. Node represents a local declaration
// The new decl e is inserted after ex if ex is not 0.
@@ -248,13 +291,17 @@ protected:
virtual AST_Decl *look_in_inherited (UTL_ScopedName *,
idl_bool treat_as_ref);
// Lookup based on the local name.
- virtual AST_Decl *lookup_for_add (AST_Decl *d,
- idl_bool treat_as_ref);
+ AST_Decl *lookup_for_add (AST_Decl *d,
+ idl_bool treat_as_ref);
// Is there a (case-insensitive) clash between a local name
// and an IDL keyword?
int idl_keyword_clash (Identifier *e);
+ // Checks for modules, or defns of forward declared struct or unions.
+ idl_bool redef_clash (AST_Decl::NodeType new_nt,
+ AST_Decl::NodeType scope_elem_nt);
+
private:
// Data.
@@ -302,9 +349,19 @@ private:
virtual AST_Interface *fe_add_interface (AST_Interface *i);
- virtual AST_InterfaceFwd *fe_add_interface_fwd (AST_InterfaceFwd *i);
+ virtual AST_InterfaceFwd *fe_add_interface_fwd (AST_InterfaceFwd *i);
+
+ virtual AST_ValueType *fe_add_valuetype (AST_ValueType *i);
- virtual AST_Constant *fe_add_constant (AST_Constant *c);
+ virtual AST_ValueTypeFwd *fe_add_valuetype_fwd (AST_ValueTypeFwd *i);
+
+ virtual AST_Component *fe_add_component (AST_Component *i);
+
+ virtual AST_ComponentFwd *fe_add_component_fwd (AST_ComponentFwd *i);
+
+ virtual AST_Home *fe_add_home (AST_Home *i);
+
+ virtual AST_Constant *fe_add_constant (AST_Constant *i);
virtual AST_Exception *fe_add_exception (AST_Exception *e);
@@ -316,10 +373,14 @@ private:
virtual AST_Union *fe_add_union (AST_Union *u);
+ virtual AST_UnionFwd *fe_add_union_fwd (AST_UnionFwd *u);
+
virtual AST_UnionBranch *fe_add_union_branch (AST_UnionBranch *b);
virtual AST_Structure *fe_add_structure (AST_Structure *s);
+ virtual AST_StructureFwd *fe_add_structure_fwd (AST_StructureFwd *s);
+
virtual AST_Field *fe_add_field (AST_Field *f);
virtual AST_Enum *fe_add_enum (AST_Enum *e);
@@ -354,27 +415,32 @@ public:
UTL_Scope::ScopeIterationKind ik);
// Advance to next item.
- virtual void next (void);
+ void next (void);
// Get current item.
- virtual AST_Decl *item (void);
+ AST_Decl *item (void);
// Have we iterated over entire scope?
- virtual idl_bool is_done (void);
+ idl_bool is_done (void);
// What kind of iterator is this?
- virtual UTL_Scope::ScopeIterationKind iteration_kind (void);
+ UTL_Scope::ScopeIterationKind iteration_kind (void);
// What stage are we in with this iterator?
- virtual UTL_Scope::ScopeIterationKind iteration_stage (void);
+ UTL_Scope::ScopeIterationKind iteration_stage (void);
private:
- // Data.
+ // Scope to iterate over.
+ UTL_Scope *iter_source;
+
+ // What kind of iteration?
+ UTL_Scope::ScopeIterationKind ik;
+
+ // What stage?
+ UTL_Scope::ScopeIterationKind stage;
- UTL_Scope *iter_source; // Scope to iterate over
- UTL_Scope::ScopeIterationKind ik; // What kind of iteration
- UTL_Scope::ScopeIterationKind stage; // What stage
- long il; // What location in stage
+ // What location in stage?
+ long il;
};
#endif // _UTL_SCOPE_UTL_SCOPE_HH