summaryrefslogtreecommitdiff
path: root/CIAO/tools/IDL3_to_IDL2
diff options
context:
space:
mode:
Diffstat (limited to 'CIAO/tools/IDL3_to_IDL2')
-rw-r--r--CIAO/tools/IDL3_to_IDL2/checking_visitor.cpp28
-rw-r--r--CIAO/tools/IDL3_to_IDL2/checking_visitor.h1
-rw-r--r--CIAO/tools/IDL3_to_IDL2/idl3_to_idl2_visitor.cpp32
-rw-r--r--CIAO/tools/IDL3_to_IDL2/idl3_to_idl2_visitor.h3
4 files changed, 39 insertions, 25 deletions
diff --git a/CIAO/tools/IDL3_to_IDL2/checking_visitor.cpp b/CIAO/tools/IDL3_to_IDL2/checking_visitor.cpp
index 068ef7f9535..a97cb03204e 100644
--- a/CIAO/tools/IDL3_to_IDL2/checking_visitor.cpp
+++ b/CIAO/tools/IDL3_to_IDL2/checking_visitor.cpp
@@ -157,6 +157,12 @@ checking_visitor::visit_template_module_ref (AST_Template_Module_Ref *)
}
int
+checking_visitor::visit_param_holder (AST_Param_Holder *)
+{
+ return 0;
+}
+
+int
checking_visitor::visit_porttype (AST_PortType *)
{
return 0;
@@ -308,10 +314,10 @@ checking_visitor::visit_root (AST_Root *node)
{
this->idl2_only_files_ += " ";
}
-
+
this->idl2_only_files_ += idl_global->included_idl_files ()[i];
}
-
+
if (this->visit_scope (node) != 0)
{
ACE_ERROR_RETURN ((LM_ERROR,
@@ -319,12 +325,12 @@ checking_visitor::visit_root (AST_Root *node)
"codegen for scope failed\n"),
-1);
}
-
+
// Append the remaining names in this list to the excluded
// filenames list. If a filename ends up appearing twice, it
- // shouldn't matter.
+ // shouldn't matter.
be_global->set_excluded_filenames (this->idl2_only_files_.c_str ());
-
+
return 0;
}
@@ -407,27 +413,27 @@ checking_visitor::remove_idl2_only_filename (ACE_CString filename)
{
return;
}
-
+
ACE_CString::size_type p = 0;
ACE_CString raw_local_fname (filename);
-
+
ACE_CString::size_type pos = raw_local_fname.rfind ('/');
-
+
if (pos != ACE_CString::npos)
{
raw_local_fname =
raw_local_fname.substr (pos + 1);
}
-
+
while (p != ACE_CString::npos)
{
ACE_CString::size_type cursor = p;
-
+
if (cursor >= this->idl2_only_files_.length ())
{
break;
}
-
+
p = this->idl2_only_files_.find (' ', cursor);
ACE_CString one_filename =
diff --git a/CIAO/tools/IDL3_to_IDL2/checking_visitor.h b/CIAO/tools/IDL3_to_IDL2/checking_visitor.h
index e01b96464cc..b55499cac7f 100644
--- a/CIAO/tools/IDL3_to_IDL2/checking_visitor.h
+++ b/CIAO/tools/IDL3_to_IDL2/checking_visitor.h
@@ -62,6 +62,7 @@ public:
virtual int visit_template_module (AST_Template_Module *node);
virtual int visit_template_module_inst (AST_Template_Module_Inst *node);
virtual int visit_template_module_ref (AST_Template_Module_Ref *node);
+ virtual int visit_param_holder (AST_Param_Holder *node);
virtual int visit_porttype (AST_PortType *node);
virtual int visit_provides (AST_Provides *node);
virtual int visit_uses (AST_Uses *node);
diff --git a/CIAO/tools/IDL3_to_IDL2/idl3_to_idl2_visitor.cpp b/CIAO/tools/IDL3_to_IDL2/idl3_to_idl2_visitor.cpp
index 69aa084c186..843cee92f42 100644
--- a/CIAO/tools/IDL3_to_IDL2/idl3_to_idl2_visitor.cpp
+++ b/CIAO/tools/IDL3_to_IDL2/idl3_to_idl2_visitor.cpp
@@ -43,7 +43,7 @@ idl3_to_idl2_visitor::visit_module (AST_Module *node)
ACE_CString name =
IdentifierHelper::try_escape (node->original_local_name ());
-
+
*os << "module " << name.c_str () << be_nl
<< "{" << be_idt;
@@ -139,7 +139,7 @@ idl3_to_idl2_visitor::visit_component (AST_Component *node)
long nsupports = node->n_supports ();
*os << " : "
- << (base != 0
+ << (base != 0
? IdentifierHelper::orig_sn (base->name ()).c_str ()
: "Components::CCMObject");
@@ -189,14 +189,14 @@ idl3_to_idl2_visitor::visit_provides (AST_Provides *node)
{
Identifier *orig_id =
IdentifierHelper::original_local_name (node->local_name ());
-
+
UTL_ScopedName *n = node->provides_type ()->name ();
ACE_CString impl_name =
IdentifierHelper::orig_sn (n);
*os << be_nl << be_nl
<< impl_name.c_str () << " provide_" << orig_id << " ();";
-
+
orig_id->destroy ();
delete orig_id;
orig_id = 0;
@@ -208,7 +208,7 @@ int
idl3_to_idl2_visitor::visit_uses (AST_Uses *node)
{
*os << be_nl << be_nl;
-
+
Identifier *orig_id =
IdentifierHelper::original_local_name (node->local_name ());
@@ -249,7 +249,7 @@ idl3_to_idl2_visitor::visit_uses (AST_Uses *node)
<< impl_name.c_str () << " get_connection_" << orig_id
<< " ();";
}
-
+
orig_id->destroy ();
delete orig_id;
orig_id = 0;
@@ -259,7 +259,7 @@ idl3_to_idl2_visitor::visit_uses (AST_Uses *node)
int
idl3_to_idl2_visitor::visit_publishes (AST_Publishes *node)
-{
+{
Identifier *orig_id =
IdentifierHelper::original_local_name (node->local_name ());
@@ -277,7 +277,7 @@ idl3_to_idl2_visitor::visit_publishes (AST_Publishes *node)
<< impl_name.c_str () << "Consumer unsubscribe_" << orig_id
<< " (in Components::Cookie ck)" << be_idt_nl
<< "raises (Components::InvalidConnection);" << be_uidt;
-
+
orig_id->destroy ();
delete orig_id;
orig_id = 0;
@@ -304,7 +304,7 @@ idl3_to_idl2_visitor::visit_emits (AST_Emits *node)
<< impl_name.c_str () << "Consumer disconnect_" << orig_id
<< " ()" << be_idt_nl
<< "raises (Components::NoConnection);" << be_uidt;
-
+
orig_id->destroy ();
delete orig_id;
orig_id = 0;
@@ -325,7 +325,7 @@ idl3_to_idl2_visitor::visit_consumes (AST_Consumes *node)
*os << be_nl << be_nl
<< impl_name.c_str () << "Consumer get_consumer_" << orig_id
<< " ();";
-
+
orig_id->destroy ();
delete orig_id;
orig_id = 0;
@@ -352,6 +352,12 @@ idl3_to_idl2_visitor::visit_connector (AST_Connector *)
}
int
+idl3_to_idl2_visitor::visit_param_holder (AST_Param_Holder *)
+{
+ return 0;
+}
+
+int
idl3_to_idl2_visitor::visit_eventtype (AST_EventType *node)
{
if (node->imported ())
@@ -500,7 +506,7 @@ idl3_to_idl2_visitor::visit_home (AST_Home *node)
{
key_name =
IdentifierHelper::orig_sn (key->name ());
-
+
*os << "in " << key_name.c_str () << " key";
}
@@ -557,7 +563,7 @@ idl3_to_idl2_visitor::visit_root (AST_Root *node)
"_IDL2.idl",
"_TAO_IDL_",
"_IDL_");
-
+
if (status == -1)
{
ACE_ERROR_RETURN ((LM_ERROR,
@@ -575,7 +581,7 @@ idl3_to_idl2_visitor::visit_root (AST_Root *node)
*os << be_nl;
}
- ACE_CString raw_filename = idl_global->included_idl_files ()[i];
+ ACE_CString raw_filename = idl_global->included_idl_files ()[i];
bool excluded_file_found =
this->match_excluded_file (raw_filename.c_str ());
diff --git a/CIAO/tools/IDL3_to_IDL2/idl3_to_idl2_visitor.h b/CIAO/tools/IDL3_to_IDL2/idl3_to_idl2_visitor.h
index 17e8abcb38e..caad8c7b20b 100644
--- a/CIAO/tools/IDL3_to_IDL2/idl3_to_idl2_visitor.h
+++ b/CIAO/tools/IDL3_to_IDL2/idl3_to_idl2_visitor.h
@@ -60,7 +60,8 @@ public:
virtual int visit_eventtype_fwd (AST_EventTypeFwd *node);
virtual int visit_home (AST_Home *node);
virtual int visit_root (AST_Root *node);
-
+ virtual int visit_param_holder(AST_Param_Holder *node);
+
private:
UTL_ScopedName *create_scoped_name (const char *prefix,
const char *local_name,