summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorparsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2009-07-14 20:40:43 +0000
committerparsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2009-07-14 20:40:43 +0000
commit37254ac92d2b51b820565486fb54288501f2c0ca (patch)
tree2a26b6ce126547d1b455adbde56edba546c3a7d2
parent8ad5165daf832633f09d6c9cde645d3a60a9e369 (diff)
downloadATCD-37254ac92d2b51b820565486fb54288501f2c0ca.tar.gz
ChangeLogTag: Tue Jul 14 20:36:44 UTC 2009 Jeff Parsons <j.parsons@vanderbilt.edu>
-rw-r--r--modules/TAO/ChangeLog15
-rw-r--r--modules/TAO/TAO_IDL/ast/ast_template_interface.cpp6
-rw-r--r--modules/TAO/TAO_IDL/fe/fe_template_interface_header.cpp10
-rw-r--r--modules/TAO/TAO_IDL/fe/fe_utils.cpp63
-rw-r--r--modules/TAO/TAO_IDL/fe/idl.yy4
-rw-r--r--modules/TAO/TAO_IDL/fe/y.tab.cpp4
-rw-r--r--modules/TAO/TAO_IDL/include/fe_utils.h36
7 files changed, 110 insertions, 28 deletions
diff --git a/modules/TAO/ChangeLog b/modules/TAO/ChangeLog
index 7ad631e9d7d..7c477f4ca1e 100644
--- a/modules/TAO/ChangeLog
+++ b/modules/TAO/ChangeLog
@@ -1,3 +1,18 @@
+Tue Jul 14 20:36:44 UTC 2009 Jeff Parsons <j.parsons@vanderbilt.edu>
+
+ * TAO_IDL/ast/ast_template_interface.cpp:
+ * TAO_IDL/fe/fe_template_interface_header.cpp:
+ * TAO_IDL/fe/fe_utils.cpp:
+ * TAO_IDL/fe/idl.yy:
+ * TAO_IDL/fe/y.tab.cpp:
+ * TAO_IDL/include/fe_utils.h:
+
+ - Added data types to FE_Utils for storage of descriptions
+ of porttype contents.
+
+ - Changed all member names in FE_Utils data types to
+ have a trailing underscore.
+
Tue Jul 14 18:26:09 UTC 2009 Jeff Parsons <j.parsons@vanderbilt.edu>
* TAO_IDL/fe/idl.yy:
diff --git a/modules/TAO/TAO_IDL/ast/ast_template_interface.cpp b/modules/TAO/TAO_IDL/ast/ast_template_interface.cpp
index deb681f9f6d..5190be95c9d 100644
--- a/modules/TAO/TAO_IDL/ast/ast_template_interface.cpp
+++ b/modules/TAO/TAO_IDL/ast/ast_template_interface.cpp
@@ -73,9 +73,9 @@ AST_Template_Interface::dump (ACE_OSTREAM_TYPE &o)
iter.next (item);
- this->dump_i (o, this->node_type_to_string (item->type));
+ this->dump_i (o, this->node_type_to_string (item->type_));
this->dump_i (o, " ");
- this->dump_i (o, item->name.c_str ());
+ this->dump_i (o, item->name_.c_str ());
}
this->dump_i (o, "> ");
@@ -104,7 +104,7 @@ AST_Template_Interface::dump (ACE_OSTREAM_TYPE &o)
}
iter.next (item);
- this->dump_i (o, item->name.c_str ());
+ this->dump_i (o, item->name_.c_str ());
}
this->dump_i (o, ">");
diff --git a/modules/TAO/TAO_IDL/fe/fe_template_interface_header.cpp b/modules/TAO/TAO_IDL/fe/fe_template_interface_header.cpp
index 0337f33a9f5..e2df8b209e9 100644
--- a/modules/TAO/TAO_IDL/fe/fe_template_interface_header.cpp
+++ b/modules/TAO/TAO_IDL/fe/fe_template_interface_header.cpp
@@ -81,14 +81,14 @@ FE_Template_InterfaceHeader::compile_template_inheritance (void)
iter.next (item);
UTL_Scope *s = idl_global->scopes ().top_non_null ();
- AST_Decl *d = s->lookup_by_name (item->name,
+ AST_Decl *d = s->lookup_by_name (item->name_,
true,
true,
true);
if (d == 0)
{
- idl_global->err ()->lookup_error (item->name);
+ idl_global->err ()->lookup_error (item->name_);
// Bad IDL, best to avoid a possible crash.
throw Bailout ();
@@ -145,8 +145,8 @@ FE_Template_InterfaceHeader::match_params (AST_Template_Interface *ti)
FE_Utils::T_Param_Info *my_item = 0;
j.next (my_item);
- if (item->type == my_item->type
- && item->name == my_item->name)
+ if (item->type_ == my_item->type_
+ && item->name_ == my_item->name_)
{
one_matched = true;
break;
@@ -183,7 +183,7 @@ FE_Template_InterfaceHeader::duplicate_param_id (void)
{
this->param_info_->get (that_one, j);
- if (this_one->name == that_one->name)
+ if (this_one->name_ == that_one->name_)
{
return true;
}
diff --git a/modules/TAO/TAO_IDL/fe/fe_utils.cpp b/modules/TAO/TAO_IDL/fe/fe_utils.cpp
index 063674580f5..c86330d2dc5 100644
--- a/modules/TAO/TAO_IDL/fe/fe_utils.cpp
+++ b/modules/TAO/TAO_IDL/fe/fe_utils.cpp
@@ -4,34 +4,73 @@
#include "utl_scoped_name.h"
#include "utl_strlist.h"
+#include "utl_identifier.h"
FE_Utils::T_Ref_Info::T_Ref_Info (void)
- : name (0),
- params (0)
+ : name_ (0),
+ params_ (0)
{
}
FE_Utils::T_Ref_Info::T_Ref_Info (UTL_ScopedName *n,
UTL_StrList *strs)
- : name (n),
- params (strs)
+ : name_ (n),
+ params_ (strs)
{
}
void
FE_Utils::T_Ref_Info::destroy (void)
{
- if (this->name != 0)
+ if (name_ != 0)
{
- this->name->destroy ();
- delete this->name;
- this->name = 0;
+ name_->destroy ();
+ delete name_;
+ name_ = 0;
}
- if (this->params != 0)
+ if (params_ != 0)
{
- this->params->destroy ();
- delete this->params;
- this->params = 0;
+ params_->destroy ();
+ delete params_;
+ params_ = 0;
+ }
+}
+
+FE_Utils::Ext_Port_Description::Ext_Port_Description (void)
+ : port_kind_ (NUM_PORT_KINDS),
+ port_name_ (0),
+ obj_ref_ (0),
+ is_multiple_ (false)
+{
+}
+
+FE_Utils::Ext_Port_Description::Ext_Port_Description (
+ Port_Kind port_kind,
+ Identifier *port_name,
+ T_Ref_Info *obj_ref,
+ bool is_multiple)
+ : port_kind_ (port_kind),
+ port_name_ (port_name),
+ obj_ref_ (obj_ref),
+ is_multiple_ (is_multiple)
+{
+}
+
+void
+FE_Utils::Ext_Port_Description::destroy (void)
+{
+ if (port_name_ != 0)
+ {
+ port_name_->destroy ();
+ delete port_name_;
+ port_name_ = 0;
+ }
+
+ if (obj_ref_ != 0)
+ {
+ obj_ref_->destroy ();
+ delete obj_ref_;
+ obj_ref_ = 0;
}
}
diff --git a/modules/TAO/TAO_IDL/fe/idl.yy b/modules/TAO/TAO_IDL/fe/idl.yy
index 2a7cda173c8..0a06c7fe34c 100644
--- a/modules/TAO/TAO_IDL/fe/idl.yy
+++ b/modules/TAO/TAO_IDL/fe/idl.yy
@@ -6023,8 +6023,8 @@ template_param
FE_Utils::T_Param_Info,
1);
- $<pival>$->type = $1;
- $<pival>$->name = $2;
+ $<pival>$->type_ = $1;
+ $<pival>$->name_ = $2;
}
;
diff --git a/modules/TAO/TAO_IDL/fe/y.tab.cpp b/modules/TAO/TAO_IDL/fe/y.tab.cpp
index 6266fdfd0ca..f6bae76e46b 100644
--- a/modules/TAO/TAO_IDL/fe/y.tab.cpp
+++ b/modules/TAO/TAO_IDL/fe/y.tab.cpp
@@ -8810,8 +8810,8 @@ tao_yyreduce:
FE_Utils::T_Param_Info,
1);
- (tao_yyval.pival)->type = (tao_yyvsp[(1) - (2)].ntval);
- (tao_yyval.pival)->name = (tao_yyvsp[(2) - (2)].strval);
+ (tao_yyval.pival)->type_ = (tao_yyvsp[(1) - (2)].ntval);
+ (tao_yyval.pival)->name_ = (tao_yyvsp[(2) - (2)].strval);
}
break;
diff --git a/modules/TAO/TAO_IDL/include/fe_utils.h b/modules/TAO/TAO_IDL/include/fe_utils.h
index 36aa47a9dad..4a4e16b8f97 100644
--- a/modules/TAO/TAO_IDL/include/fe_utils.h
+++ b/modules/TAO/TAO_IDL/include/fe_utils.h
@@ -15,16 +15,16 @@ struct TAO_IDL_FE_Export FE_Utils
{
struct T_Param_Info
{
- AST_Decl::NodeType type;
- ACE_CString name;
+ AST_Decl::NodeType type_;
+ ACE_CString name_;
};
typedef ACE_Unbounded_Queue<T_Param_Info> T_PARAMLIST_INFO;
struct T_Ref_Info
{
- UTL_ScopedName *name;
- UTL_StrList *params;
+ UTL_ScopedName *name_;
+ UTL_StrList *params_;
T_Ref_Info (void);
T_Ref_Info (UTL_ScopedName *n, UTL_StrList *strs);
@@ -33,6 +33,34 @@ struct TAO_IDL_FE_Export FE_Utils
};
typedef ACE_Unbounded_Queue<T_Ref_Info> T_REFLIST_INFO;
+
+ enum Port_Kind
+ {
+ PROVIDES,
+ USES,
+ PUBLISHES,
+ CONSUMES,
+ EMITS,
+ NUM_PORT_KINDS
+ };
+
+ struct Ext_Port_Description
+ {
+ Port_Kind port_kind_;
+ Identifier *port_name_;
+ T_Ref_Info *obj_ref_;
+ bool is_multiple_;
+
+ Ext_Port_Description (void);
+ Ext_Port_Description (Port_Kind port_kind,
+ Identifier *port_name,
+ T_Ref_Info *obj_ref,
+ bool is_multiple = false);
+
+ void destroy (void);
+ };
+
+ typedef ACE_Unbounded_Queue<Ext_Port_Description> EXT_PORTLIST_INFO;
};
#endif /* FE_UTILS_H */ \ No newline at end of file