summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorparsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2006-09-15 19:11:16 +0000
committerparsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2006-09-15 19:11:16 +0000
commit4a9b6cf5ea87b6d7e9baeefd011ef8d109b08aec (patch)
tree690959eb844ecf837f2e5dffa5d586449620f8a6
parent535d32f7e2dadfe9fa308bd98c00d96a4000d284 (diff)
downloadATCD-4a9b6cf5ea87b6d7e9baeefd011ef8d109b08aec.tar.gz
ChangeLogTag: Fri Sep 15 19:02:58 UTC 2006 Jeff Parsons <j.parsons@vanderbilt.edu>
-rw-r--r--TAO/TAO_IDL/ast/ast_predefined_type.cpp4
-rw-r--r--TAO/TAO_IDL/be/be_codegen.cpp9
-rw-r--r--TAO/TAO_IDL/fe/fe_init.cpp9
-rw-r--r--TAO/TAO_IDL/include/ast_predefined_type.h1
-rw-r--r--TAO/TAO_IDL/include/idl_global.h1
-rw-r--r--TAO/TAO_IDL/util/utl_global.cpp1
-rw-r--r--TAO/TAO_IDL/util/utl_scope.cpp13
7 files changed, 33 insertions, 5 deletions
diff --git a/TAO/TAO_IDL/ast/ast_predefined_type.cpp b/TAO/TAO_IDL/ast/ast_predefined_type.cpp
index e98a2486abf..a2980b3838b 100644
--- a/TAO/TAO_IDL/ast/ast_predefined_type.cpp
+++ b/TAO/TAO_IDL/ast/ast_predefined_type.cpp
@@ -194,6 +194,10 @@ AST_PredefinedType::AST_PredefinedType (PredefinedType t,
ACE_NEW (id,
Identifier ("ValueBase"));
break;
+ case AST_PredefinedType::PT_abstract:
+ ACE_NEW (id,
+ Identifier ("AbstractBase"));
+ break;
case AST_PredefinedType::PT_pseudo:
ACE_NEW (id,
Identifier (n->last_component ()->get_string ()));
diff --git a/TAO/TAO_IDL/be/be_codegen.cpp b/TAO/TAO_IDL/be/be_codegen.cpp
index 22a92d8fac8..b2c4e8ccf5c 100644
--- a/TAO/TAO_IDL/be/be_codegen.cpp
+++ b/TAO/TAO_IDL/be/be_codegen.cpp
@@ -1632,14 +1632,17 @@ TAO_CodeGen::gen_stub_hdr_includes (void)
"tao/AnyTypeCode/AnyTypeCode_methods.h",
this->client_header_);
- if (idl_global->abstract_iface_seen_)
+ if (idl_global->abstract_iface_seen_ || idl_global->abstractbase_seen_)
{
// Include the AbstractBase file from the Valuetype library.
this->gen_standard_include (this->client_header_,
"tao/Valuetype/AbstractBase.h");
- // Turn on generation of the rest of the Valuetype library includes.
- idl_global->valuetype_seen_ = true;
+ if (idl_global->abstract_iface_seen_)
+ {
+ // Turn on generation of the rest of the Valuetype library includes.
+ idl_global->valuetype_seen_ = true;
+ }
}
if (idl_global->valuebase_seen_)
diff --git a/TAO/TAO_IDL/fe/fe_init.cpp b/TAO/TAO_IDL/fe/fe_init.cpp
index 8c42f299187..c39e07bb489 100644
--- a/TAO/TAO_IDL/fe/fe_init.cpp
+++ b/TAO/TAO_IDL/fe/fe_init.cpp
@@ -504,6 +504,15 @@ fe_populate_global_scope (AST_Module *m)
&ValueBase_name
);
m->fe_add_predefined_type (pdt);
+
+ Identifier AbstractBase_id ("AbstractBase");
+ UTL_ScopedName AbstractBase_name (&AbstractBase_id, 0);
+ pdt =
+ idl_global->gen ()->create_predefined_type (
+ AST_PredefinedType::PT_abstract,
+ &AbstractBase_name
+ );
+ m->fe_add_predefined_type (pdt);
}
// Populate idl_global's hash map with upper case versions of
diff --git a/TAO/TAO_IDL/include/ast_predefined_type.h b/TAO/TAO_IDL/include/ast_predefined_type.h
index f4ae1f75d20..50b976a52af 100644
--- a/TAO/TAO_IDL/include/ast_predefined_type.h
+++ b/TAO/TAO_IDL/include/ast_predefined_type.h
@@ -93,6 +93,7 @@ public:
, PT_any // Predefined type "CORBA::Any"
, PT_object // Predefined type "CORBA::Object"
, PT_value // Predefined type "CORBA::ValueBase"
+ , PT_abstract // Predefined type "CORBA::AbstractBase"
, PT_void // Predefined type "void"
, PT_pseudo // Predefined type for pseudo objects
};
diff --git a/TAO/TAO_IDL/include/idl_global.h b/TAO/TAO_IDL/include/idl_global.h
index ce7da6087c1..c56231eb1c2 100644
--- a/TAO/TAO_IDL/include/idl_global.h
+++ b/TAO/TAO_IDL/include/idl_global.h
@@ -268,6 +268,7 @@ public:
// flags for types of declarations seen while parsing.
bool abstract_iface_seen_;
+ bool abstractbase_seen_;
bool aggregate_seen_;
bool ambiguous_type_seen_;
bool any_arg_seen_;
diff --git a/TAO/TAO_IDL/util/utl_global.cpp b/TAO/TAO_IDL/util/utl_global.cpp
index d49fce7d015..7fdb80ce9f0 100644
--- a/TAO/TAO_IDL/util/utl_global.cpp
+++ b/TAO/TAO_IDL/util/utl_global.cpp
@@ -210,6 +210,7 @@ void
IDL_GlobalData::reset_flag_seen (void)
{
abstract_iface_seen_ = false;
+ abstractbase_seen_ = false;
aggregate_seen_ = false;
//ambiguous_type_seen_
any_arg_seen_ = false;
diff --git a/TAO/TAO_IDL/util/utl_scope.cpp b/TAO/TAO_IDL/util/utl_scope.cpp
index 3ff9e4c4cad..1d99aec546e 100644
--- a/TAO/TAO_IDL/util/utl_scope.cpp
+++ b/TAO/TAO_IDL/util/utl_scope.cpp
@@ -1349,6 +1349,7 @@ UTL_Scope::lookup_pseudo (Identifier *e)
bool tc_lookup = false;
bool obj_lookup = false;
bool vb_lookup = false;
+ bool ab_lookup = false;
if (ACE_OS::strcasecmp (name_string, "Object") == 0)
{
@@ -1358,8 +1359,12 @@ UTL_Scope::lookup_pseudo (Identifier *e)
{
vb_lookup = true;
}
+ else if (ACE_OS::strcasecmp (name_string, "AbstractBase") == 0)
+ {
+ ab_lookup = true;
+ }
- if (obj_lookup || vb_lookup)
+ if (obj_lookup || vb_lookup || ab_lookup)
{
// Iterate over the global scope.
ACE_NEW_RETURN (i,
@@ -1414,6 +1419,10 @@ UTL_Scope::lookup_pseudo (Identifier *e)
{
idl_global->valuebase_seen_ = true;
}
+ else if (ab_lookup)
+ {
+ idl_global->abstractbase_seen_ = true;
+ }
}
return d;
@@ -1593,7 +1602,7 @@ UTL_Scope::lookup_by_name_local (Identifier *e,
AST_Type *t = 0;
- // Will return 0 unless looking up 'Object' or 'TypeCode'.
+ // Will catch Object, TypeCode, ValueBase and AbstractBase.
AST_Decl *d = this->lookup_pseudo (e);
if (d != 0)