diff options
author | parsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2009-07-16 22:05:21 +0000 |
---|---|---|
committer | parsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2009-07-16 22:05:21 +0000 |
commit | c978246d9ca8915d94daa94c497e9d51ebd39015 (patch) | |
tree | d59f15fa1c828986ccb62015555726a90ccdc616 | |
parent | 8662b910b7e050691ba3929d28bd7c318a63a421 (diff) | |
download | ATCD-c978246d9ca8915d94daa94c497e9d51ebd39015.tar.gz |
ChangeLogTag: Thu Jul 16 22:03:56 UTC 2009 Jeff Parsons <j.parsons@vanderbilt.edu>
-rw-r--r-- | modules/TAO/ChangeLog | 21 | ||||
-rw-r--r-- | modules/TAO/TAO_IDL/ast/ast_generator.cpp | 17 | ||||
-rw-r--r-- | modules/TAO/TAO_IDL/ast/ast_module.cpp | 41 | ||||
-rw-r--r-- | modules/TAO/TAO_IDL/ast/ast_redef.cpp | 1 | ||||
-rw-r--r-- | modules/TAO/TAO_IDL/be/be_generator.cpp | 17 | ||||
-rw-r--r-- | modules/TAO/TAO_IDL/be_include/be_generator.h | 7 | ||||
-rw-r--r-- | modules/TAO/TAO_IDL/fe/idl.yy | 26 | ||||
-rw-r--r-- | modules/TAO/TAO_IDL/fe/y.tab.cpp | 131 | ||||
-rw-r--r-- | modules/TAO/TAO_IDL/include/ast_generator.h | 8 | ||||
-rw-r--r-- | modules/TAO/TAO_IDL/include/ast_module.h | 2 | ||||
-rw-r--r-- | modules/TAO/TAO_IDL/include/ast_root.h | 4 | ||||
-rw-r--r-- | modules/TAO/TAO_IDL/include/fe_porttype_header.h | 2 | ||||
-rw-r--r-- | modules/TAO/TAO_IDL/include/utl_scope.h | 5 | ||||
-rw-r--r-- | modules/TAO/TAO_IDL/util/utl_scope.cpp | 21 |
14 files changed, 240 insertions, 63 deletions
diff --git a/modules/TAO/ChangeLog b/modules/TAO/ChangeLog index f20721cac7c..2e83e054ad1 100644 --- a/modules/TAO/ChangeLog +++ b/modules/TAO/ChangeLog @@ -1,3 +1,22 @@ +Thu Jul 16 22:03:56 UTC 2009 Jeff Parsons <j.parsons@vanderbilt.edu> + + * TAO_IDL/ast/ast_generator.cpp: + * TAO_IDL/ast/ast_module.cpp: + * TAO_IDL/ast/ast_redef.cpp: + * TAO_IDL/be/be_generator.cpp: + * TAO_IDL/be_include/be_generator.h: + * TAO_IDL/fe/idl.yy: + * TAO_IDL/fe/y.tab.cpp: + * TAO_IDL/include/ast_generator.h: + * TAO_IDL/include/ast_module.h: + * TAO_IDL/include/ast_root.h: + * TAO_IDL/include/fe_porttype_header.h: + * TAO_IDL/include/utl_scope.h: + * TAO_IDL/util/utl_scope.cpp: + + Added semantic actions for creating a porttype node in + the AST. + Wed Jul 15 21:41:00 UTC 2009 Jeff Parsons <j.parsons@vanderbilt.edu> * TAO_IDL/ast/ast_porttype.cpp @@ -13,7 +32,7 @@ Wed Jul 15 21:41:00 UTC 2009 Jeff Parsons <j.parsons@vanderbilt.edu> * TAO_IDL/include/fe_template_header_common.h: * TAO_IDL/include/fe_template_interface_header.h: * TAO_IDL/include/fe_utils.h: - + Modified and refactored the IDL3+ info datatypes and FE header classes. diff --git a/modules/TAO/TAO_IDL/ast/ast_generator.cpp b/modules/TAO/TAO_IDL/ast/ast_generator.cpp index 6e7eb0aba6c..22012b39c04 100644 --- a/modules/TAO/TAO_IDL/ast/ast_generator.cpp +++ b/modules/TAO/TAO_IDL/ast/ast_generator.cpp @@ -80,6 +80,7 @@ trademarks or registered trademarks of Sun Microsystems, Inc. #include "ast_component_fwd.h" #include "ast_home.h" #include "ast_template_interface.h" +#include "ast_porttype.h" #include "ast_exception.h" #include "ast_enum.h" #include "ast_attribute.h" @@ -940,6 +941,20 @@ AST_Generator::create_template_interface ( nih_flat, template_params), 0); - + + return retval; +} + +AST_PortType * +AST_Generator::create_porttype ( + UTL_ScopedName *n, + const FE_Utils::T_PARAMLIST_INFO *template_params) +{ + AST_PortType *retval = 0; + ACE_NEW_RETURN (retval, + AST_PortType (n, + template_params), + 0); + return retval; } diff --git a/modules/TAO/TAO_IDL/ast/ast_module.cpp b/modules/TAO/TAO_IDL/ast/ast_module.cpp index 316c40a5736..73bd9c1af10 100644 --- a/modules/TAO/TAO_IDL/ast/ast_module.cpp +++ b/modules/TAO/TAO_IDL/ast/ast_module.cpp @@ -77,6 +77,7 @@ trademarks or registered trademarks of Sun Microsystems, Inc. #include "ast_eventtype_fwd.h" #include "ast_component.h" #include "ast_component_fwd.h" +#include "ast_porttype.h" #include "ast_home.h" #include "ast_constant.h" #include "ast_exception.h" @@ -351,7 +352,7 @@ AST_Module::fe_add_interface (AST_Interface *t) // since fwd declared structs and unions must be defined in // the same translation unit. AST_InterfaceFwd *fd = t->fwd_decl (); - + if (0 != fd) { fd->set_as_defined (); @@ -1683,6 +1684,44 @@ AST_Module::fe_add_native (AST_Native *t) return t; } +AST_PortType * +AST_Module::fe_add_porttype (AST_PortType *pt) +{ + AST_Decl *d = 0; + + // Already defined? Or already used? + if ((d = this->lookup_for_add (pt, false)) != 0) + { + if (!can_be_redefined (d)) + { + idl_global->err ()->error3 (UTL_Error::EIDL_REDEF, + pt, + this, + d); + return 0; + } + + if (this->referenced (d, pt->local_name ())) + { + idl_global->err ()->error3 (UTL_Error::EIDL_DEF_USE, + pt, + this, + d); + return 0; + } + } + + // Add it to scope. + this->add_to_scope (pt); + + // Add it to set of locally referenced symbols. + this->add_to_referenced (pt, + false, + pt->local_name ()); + + return pt; +} + // Dump this AST_Module node to the ostream o. void AST_Module::dump (ACE_OSTREAM_TYPE &o) diff --git a/modules/TAO/TAO_IDL/ast/ast_redef.cpp b/modules/TAO/TAO_IDL/ast/ast_redef.cpp index 92043ccba80..962206ff98d 100644 --- a/modules/TAO/TAO_IDL/ast/ast_redef.cpp +++ b/modules/TAO/TAO_IDL/ast/ast_redef.cpp @@ -86,6 +86,7 @@ can_be_redefined (AST_Decl *d) case AST_Decl::NT_component_fwd: case AST_Decl::NT_eventtype: case AST_Decl::NT_eventtype_fwd: + case AST_Decl::NT_porttype: case AST_Decl::NT_home: case AST_Decl::NT_const: case AST_Decl::NT_except: diff --git a/modules/TAO/TAO_IDL/be/be_generator.cpp b/modules/TAO/TAO_IDL/be/be_generator.cpp index 2c036df7323..235a0177abf 100644 --- a/modules/TAO/TAO_IDL/be/be_generator.cpp +++ b/modules/TAO/TAO_IDL/be/be_generator.cpp @@ -82,6 +82,7 @@ trademarks or registered trademarks of Sun Microsystems, Inc. #include "be_component_fwd.h" #include "be_home.h" #include "be_template_interface.h" +#include "be_porttype.h" #include "be_union.h" #include "be_union_fwd.h" #include "be_structure.h" @@ -931,6 +932,20 @@ be_generator::create_template_interface ( nih_flat, template_params), 0); - + + return retval; +} + +AST_PortType * +be_generator::create_porttype ( + UTL_ScopedName *n, + const FE_Utils::T_PARAMLIST_INFO *template_params) +{ + be_porttype *retval = 0; + ACE_NEW_RETURN (retval, + be_porttype (n, + template_params), + 0); + return retval; } diff --git a/modules/TAO/TAO_IDL/be_include/be_generator.h b/modules/TAO/TAO_IDL/be_include/be_generator.h index e050ca6a45e..c2b9bd40585 100644 --- a/modules/TAO/TAO_IDL/be_include/be_generator.h +++ b/modules/TAO/TAO_IDL/be_include/be_generator.h @@ -263,7 +263,7 @@ public: // Create a node representing a OBV factory construct virtual AST_Factory *create_factory (UTL_ScopedName *n); - + virtual AST_Template_Interface *create_template_interface ( UTL_ScopedName *n, @@ -272,6 +272,11 @@ public: AST_Interface **ih_flat, long nih_flat, const FE_Utils::T_PARAMLIST_INFO *template_params); + + virtual + AST_PortType *create_porttype ( + UTL_ScopedName *n, + const FE_Utils::T_PARAMLIST_INFO *template_params); }; #endif // _BE_GENERATOR_BE_GENERATOR_HH diff --git a/modules/TAO/TAO_IDL/fe/idl.yy b/modules/TAO/TAO_IDL/fe/idl.yy index 835aac4688c..9cd8637af02 100644 --- a/modules/TAO/TAO_IDL/fe/idl.yy +++ b/modules/TAO/TAO_IDL/fe/idl.yy @@ -88,6 +88,7 @@ trademarks or registered trademarks of Sun Microsystems, Inc. #include "ast_component_fwd.h" #include "ast_home.h" #include "ast_template_interface.h" +#include "ast_porttype.h" #include "ast_constant.h" #include "ast_union.h" #include "ast_union_fwd.h" @@ -340,6 +341,7 @@ AST_Decl *tao_enum_constant_decl = 0; %type <pival> template_param %type <plval> template_params at_least_one_template_param +%type <plval> opt_template_params %type <sval> template_param_ref @@ -6155,6 +6157,25 @@ porttype_decl opt_template_params { // opt_template_params + UTL_Scope *s = idl_global->scopes ().top_non_null (); + + Identifier id ($3); + ACE::strdelete ($3); + $3 = 0; + + UTL_ScopedName sn (&id, + 0); + + AST_PortType *p = + idl_global->gen ()->create_porttype (&sn, + $5); + + (void) s->fe_add_porttype (p); + + // Push it on the scopes stack. + idl_global->scopes ().push (p); + + sn.destroy (); } '{' { @@ -6170,6 +6191,9 @@ porttype_decl { // '}' idl_global->set_parse_state (IDL_GlobalData::PS_PorttypeQsSeen); + + // Done with this port type - pop it off the scopes stack. + idl_global->scopes ().pop (); } ; @@ -6177,10 +6201,12 @@ opt_template_params : at_least_one_template_param { // opt_template_params : at_least_one_template_param + $$ = $1; } | /* EMPTY */ { // | /* EMPTY */ + $$ = 0; } ; diff --git a/modules/TAO/TAO_IDL/fe/y.tab.cpp b/modules/TAO/TAO_IDL/fe/y.tab.cpp index 6dba802f70b..cc09add4f4a 100644 --- a/modules/TAO/TAO_IDL/fe/y.tab.cpp +++ b/modules/TAO/TAO_IDL/fe/y.tab.cpp @@ -260,6 +260,7 @@ #include "ast_component_fwd.h" #include "ast_home.h" #include "ast_template_interface.h" +#include "ast_porttype.h" #include "ast_constant.h" #include "ast_union.h" #include "ast_union_fwd.h" @@ -855,59 +856,59 @@ static const tao_yytype_int16 tao_yyrhs[] = /* TAO_YYRLINE[TAO_YYN] -- source line where rule number TAO_YYN was defined. */ static const tao_yytype_uint16 tao_yyrline[] = { - 0, 357, 357, 360, 361, 366, 365, 376, 375, 386, - 385, 396, 395, 406, 405, 416, 415, 426, 425, 436, - 435, 446, 445, 456, 455, 466, 465, 476, 475, 486, - 485, 496, 495, 509, 514, 540, 545, 508, 561, 562, - 567, 606, 611, 566, 629, 628, 642, 680, 711, 745, - 744, 756, 763, 764, 765, 766, 770, 781, 786, 830, - 835, 785, 864, 903, 908, 862, 927, 925, 965, 964, - 978, 984, 991, 998, 1005, 1031, 1058, 1123, 1124, 1128, - 1129, 1130, 1135, 1141, 1150, 1151, 1156, 1155, 1166, 1165, - 1176, 1175, 1186, 1185, 1196, 1195, 1206, 1205, 1216, 1215, - 1226, 1225, 1239, 1252, 1250, 1280, 1287, 1298, 1297, 1325, - 1323, 1350, 1362, 1408, 1436, 1467, 1472, 1477, 1482, 1466, - 1535, 1536, 1537, 1538, 1539, 1540, 1541, 1553, 1558, 1633, - 1635, 1637, 1638, 1652, 1653, 1667, 1668, 1681, 1682, 1692, - 1705, 1706, 1716, 1729, 1730, 1740, 1750, 1763, 1764, 1774, - 1784, 1797, 1832, 1833, 1842, 1847, 1854, 1862, 1867, 1872, - 1878, 1883, 1888, 1896, 1968, 1967, 1977, 1982, 1987, 1992, - 2019, 2028, 2027, 2098, 2099, 2103, 2111, 2112, 2140, 2141, - 2142, 2143, 2144, 2145, 2146, 2147, 2151, 2152, 2153, 2157, - 2158, 2159, 2163, 2164, 2168, 2181, 2179, 2209, 2216, 2217, - 2221, 2234, 2232, 2262, 2269, 2286, 2305, 2306, 2310, 2315, - 2320, 2328, 2333, 2338, 2346, 2351, 2356, 2364, 2378, 2383, - 2391, 2399, 2407, 2415, 2424, 2423, 2439, 2473, 2478, 2438, - 2497, 2500, 2501, 2505, 2505, 2515, 2520, 2514, 2583, 2582, - 2597, 2596, 2611, 2616, 2621, 2626, 2673, 2678, 2610, 2702, - 2710, 2724, 2734, 2742, 2743, 2851, 2854, 2855, 2860, 2865, - 2859, 2901, 2900, 2914, 2925, 2947, 2955, 2954, 2970, 2975, - 2969, 2992, 2991, 3044, 3068, 3093, 3098, 3131, 3136, 3092, - 3162, 3167, 3165, 3172, 3176, 3213, 3218, 3211, 3285, 3340, - 3350, 3339, 3365, 3370, 3363, 3411, 3437, 3447, 3452, 3445, - 3482, 3507, 3516, 3515, 3551, 3562, 3584, 3592, 3597, 3591, - 3634, 3635, 3640, 3645, 3650, 3655, 3639, 3724, 3729, 3734, - 3739, 3723, 3817, 3822, 3852, 3857, 3816, 3875, 3880, 3933, - 3938, 3873, 3975, 3981, 3988, 3995, 3996, 4008, 4014, 4056, - 4007, 4078, 4077, 4088, 4087, 4100, 4105, 4103, 4110, 4115, - 4120, 4114, 4161, 4160, 4171, 4170, 4183, 4188, 4186, 4193, - 4198, 4203, 4197, 4250, 4258, 4259, 4260, 4348, 4353, 4358, - 4367, 4372, 4366, 4384, 4392, 4397, 4391, 4409, 4417, 4422, - 4416, 4434, 4442, 4447, 4441, 4459, 4466, 4479, 4477, 4505, - 4512, 4541, 4579, 4580, 4584, 4614, 4654, 4659, 4613, 4678, - 4683, 4676, 4725, 4724, 4735, 4742, 4743, 4748, 4747, 4758, - 4757, 4768, 4767, 4778, 4777, 4788, 4787, 4798, 4797, 4809, - 4876, 4883, 4907, 4982, 4992, 4998, 5005, 5068, 5131, 5195, - 5194, 5244, 5249, 5254, 5259, 5264, 5269, 5243, 5323, 5322, - 5333, 5340, 5347, 5355, 5360, 5354, 5372, 5373, 5377, 5379, - 5378, 5389, 5388, 5403, 5439, 5401, 5473, 5509, 5471, 5541, - 5542, 5543, 5547, 5548, 5552, 5580, 5611, 5656, 5661, 5609, - 5678, 5688, 5707, 5719, 5718, 5758, 5808, 5813, 5756, 5830, - 5835, 5843, 5848, 5853, 5858, 5863, 5876, 5881, 5886, 5895, - 5917, 5922, 5894, 5939, 5957, 5962, 5956, 5985, 5984, 6006, - 6013, 6027, 6033, 6040, 6059, 6076, 6083, 6093, 6104, 6128, - 6135, 6146, 6151, 6156, 6160, 6165, 6145, 6177, 6182, 6188, - 6195, 6200, 6207, 6206, 6215, 6214, 6225, 6230, 6243, 6248 + 0, 359, 359, 362, 363, 368, 367, 378, 377, 388, + 387, 398, 397, 408, 407, 418, 417, 428, 427, 438, + 437, 448, 447, 458, 457, 468, 467, 478, 477, 488, + 487, 498, 497, 511, 516, 542, 547, 510, 563, 564, + 569, 608, 613, 568, 631, 630, 644, 682, 713, 747, + 746, 758, 765, 766, 767, 768, 772, 783, 788, 832, + 837, 787, 866, 905, 910, 864, 929, 927, 967, 966, + 980, 986, 993, 1000, 1007, 1033, 1060, 1125, 1126, 1130, + 1131, 1132, 1137, 1143, 1152, 1153, 1158, 1157, 1168, 1167, + 1178, 1177, 1188, 1187, 1198, 1197, 1208, 1207, 1218, 1217, + 1228, 1227, 1241, 1254, 1252, 1282, 1289, 1300, 1299, 1327, + 1325, 1352, 1364, 1410, 1438, 1469, 1474, 1479, 1484, 1468, + 1537, 1538, 1539, 1540, 1541, 1542, 1543, 1555, 1560, 1635, + 1637, 1639, 1640, 1654, 1655, 1669, 1670, 1683, 1684, 1694, + 1707, 1708, 1718, 1731, 1732, 1742, 1752, 1765, 1766, 1776, + 1786, 1799, 1834, 1835, 1844, 1849, 1856, 1864, 1869, 1874, + 1880, 1885, 1890, 1898, 1970, 1969, 1979, 1984, 1989, 1994, + 2021, 2030, 2029, 2100, 2101, 2105, 2113, 2114, 2142, 2143, + 2144, 2145, 2146, 2147, 2148, 2149, 2153, 2154, 2155, 2159, + 2160, 2161, 2165, 2166, 2170, 2183, 2181, 2211, 2218, 2219, + 2223, 2236, 2234, 2264, 2271, 2288, 2307, 2308, 2312, 2317, + 2322, 2330, 2335, 2340, 2348, 2353, 2358, 2366, 2380, 2385, + 2393, 2401, 2409, 2417, 2426, 2425, 2441, 2475, 2480, 2440, + 2499, 2502, 2503, 2507, 2507, 2517, 2522, 2516, 2585, 2584, + 2599, 2598, 2613, 2618, 2623, 2628, 2675, 2680, 2612, 2704, + 2712, 2726, 2736, 2744, 2745, 2853, 2856, 2857, 2862, 2867, + 2861, 2903, 2902, 2916, 2927, 2949, 2957, 2956, 2972, 2977, + 2971, 2994, 2993, 3046, 3070, 3095, 3100, 3133, 3138, 3094, + 3164, 3169, 3167, 3174, 3178, 3215, 3220, 3213, 3287, 3342, + 3352, 3341, 3367, 3372, 3365, 3413, 3439, 3449, 3454, 3447, + 3484, 3509, 3518, 3517, 3553, 3564, 3586, 3594, 3599, 3593, + 3636, 3637, 3642, 3647, 3652, 3657, 3641, 3726, 3731, 3736, + 3741, 3725, 3819, 3824, 3854, 3859, 3818, 3877, 3882, 3935, + 3940, 3875, 3977, 3983, 3990, 3997, 3998, 4010, 4016, 4058, + 4009, 4080, 4079, 4090, 4089, 4102, 4107, 4105, 4112, 4117, + 4122, 4116, 4163, 4162, 4173, 4172, 4185, 4190, 4188, 4195, + 4200, 4205, 4199, 4252, 4260, 4261, 4262, 4350, 4355, 4360, + 4369, 4374, 4368, 4386, 4394, 4399, 4393, 4411, 4419, 4424, + 4418, 4436, 4444, 4449, 4443, 4461, 4468, 4481, 4479, 4507, + 4514, 4543, 4581, 4582, 4586, 4616, 4656, 4661, 4615, 4680, + 4685, 4678, 4727, 4726, 4737, 4744, 4745, 4750, 4749, 4760, + 4759, 4770, 4769, 4780, 4779, 4790, 4789, 4800, 4799, 4811, + 4878, 4885, 4909, 4984, 4994, 5000, 5007, 5070, 5133, 5197, + 5196, 5246, 5251, 5256, 5261, 5266, 5271, 5245, 5325, 5324, + 5335, 5342, 5349, 5357, 5362, 5356, 5374, 5375, 5379, 5381, + 5380, 5391, 5390, 5405, 5441, 5403, 5475, 5511, 5473, 5543, + 5544, 5545, 5549, 5550, 5554, 5582, 5613, 5658, 5663, 5611, + 5680, 5690, 5709, 5721, 5720, 5760, 5810, 5815, 5758, 5832, + 5837, 5845, 5850, 5855, 5860, 5865, 5878, 5883, 5888, 5897, + 5919, 5924, 5896, 5941, 5959, 5964, 5958, 5987, 5986, 6008, + 6015, 6029, 6035, 6042, 6061, 6078, 6085, 6095, 6106, 6130, + 6137, 6148, 6153, 6158, 6181, 6186, 6147, 6201, 6207, 6214, + 6221, 6226, 6233, 6232, 6241, 6240, 6251, 6256, 6269, 6274 }; #endif @@ -8972,6 +8973,25 @@ tao_yyreduce: { // opt_template_params + UTL_Scope *s = idl_global->scopes ().top_non_null (); + + Identifier id ((tao_yyvsp[(3) - (5)].strval)); + ACE::strdelete ((tao_yyvsp[(3) - (5)].strval)); + (tao_yyvsp[(3) - (5)].strval) = 0; + + UTL_ScopedName sn (&id, + 0); + + AST_PortType *p = + idl_global->gen ()->create_porttype (&sn, + (tao_yyvsp[(5) - (5)].plval)); + + (void) s->fe_add_porttype (p); + + // Push it on the scopes stack. + idl_global->scopes ().push (p); + + sn.destroy (); } break; @@ -8996,6 +9016,9 @@ tao_yyreduce: { // '}' idl_global->set_parse_state (IDL_GlobalData::PS_PorttypeQsSeen); + + // Done with this port type - pop it off the scopes stack. + idl_global->scopes ().pop (); } break; @@ -9003,6 +9026,7 @@ tao_yyreduce: { // opt_template_params : at_least_one_template_param + (tao_yyval.plval) = (tao_yyvsp[(1) - (1)].plval); } break; @@ -9010,6 +9034,7 @@ tao_yyreduce: { // | /* EMPTY */ + (tao_yyval.plval) = 0; } break; diff --git a/modules/TAO/TAO_IDL/include/ast_generator.h b/modules/TAO/TAO_IDL/include/ast_generator.h index 65f7eb57b94..f68140c4708 100644 --- a/modules/TAO/TAO_IDL/include/ast_generator.h +++ b/modules/TAO/TAO_IDL/include/ast_generator.h @@ -80,6 +80,7 @@ class AST_Root; class AST_EventType; class AST_EventTypeFwd; class AST_Template_Interface; +class AST_PortType; // Defines base class for node generators. @@ -340,7 +341,7 @@ public: // Create a node representing a valuebox. virtual AST_ValueBox *create_valuebox (UTL_ScopedName *n, AST_Type *boxed_type); - + virtual AST_Template_Interface *create_template_interface ( UTL_ScopedName *n, @@ -349,6 +350,11 @@ public: AST_Interface **ih_flat, long nih_flat, const FE_Utils::T_PARAMLIST_INFO *template_params); + + virtual + AST_PortType *create_porttype ( + UTL_ScopedName *n, + const FE_Utils::T_PARAMLIST_INFO *template_params); }; #endif // _AST_GENERATOR_AST_GENERATOR_HH diff --git a/modules/TAO/TAO_IDL/include/ast_module.h b/modules/TAO/TAO_IDL/include/ast_module.h index ab31053f824..98ba73090cb 100644 --- a/modules/TAO/TAO_IDL/include/ast_module.h +++ b/modules/TAO/TAO_IDL/include/ast_module.h @@ -181,6 +181,8 @@ private: virtual AST_ValueBox *fe_add_valuebox (AST_ValueBox *vb); + virtual AST_PortType *fe_add_porttype (AST_PortType *pt); + bool pd_has_nested_valuetype; ACE_Unbounded_Set<AST_Decl *> previous_; diff --git a/modules/TAO/TAO_IDL/include/ast_root.h b/modules/TAO/TAO_IDL/include/ast_root.h index a9e577f7e0f..133c5c2c642 100644 --- a/modules/TAO/TAO_IDL/include/ast_root.h +++ b/modules/TAO/TAO_IDL/include/ast_root.h @@ -79,7 +79,7 @@ public: AST_Root (UTL_ScopedName *n); virtual ~AST_Root (void); - + virtual unsigned long nmembers (void); // Narrowing. @@ -95,7 +95,7 @@ public: // Cleanup. virtual void destroy (); - + // Final cleanup. void fini (void); diff --git a/modules/TAO/TAO_IDL/include/fe_porttype_header.h b/modules/TAO/TAO_IDL/include/fe_porttype_header.h index b66c79b3cda..622a401853b 100644 --- a/modules/TAO/TAO_IDL/include/fe_porttype_header.h +++ b/modules/TAO/TAO_IDL/include/fe_porttype_header.h @@ -16,7 +16,7 @@ public: UTL_ScopedName *name (void) const; virtual void destroy (void); - + private: UTL_ScopedName *name_; }; diff --git a/modules/TAO/TAO_IDL/include/utl_scope.h b/modules/TAO/TAO_IDL/include/utl_scope.h index 92599013f46..98306afe6d4 100644 --- a/modules/TAO/TAO_IDL/include/utl_scope.h +++ b/modules/TAO/TAO_IDL/include/utl_scope.h @@ -119,6 +119,7 @@ class AST_String; class AST_Array; class AST_Native; class AST_Factory; +class AST_PortType; class UTL_StrList; class UTL_NameList; @@ -209,6 +210,8 @@ public: virtual AST_Factory *add_factory (AST_Factory *f); + virtual AST_PortType *add_porttype (AST_PortType *p); + // Call back end add_XXX functions for this scope. virtual AST_Decl *call_add (void); @@ -433,6 +436,8 @@ private: virtual AST_Factory *fe_add_factory (AST_Factory *f); virtual AST_ValueBox *fe_add_valuebox (AST_ValueBox *vb); + + virtual AST_PortType *fe_add_porttype (AST_PortType *pt); }; // Active iterator for a UTL_Scope node diff --git a/modules/TAO/TAO_IDL/util/utl_scope.cpp b/modules/TAO/TAO_IDL/util/utl_scope.cpp index 4373cea7356..d9f3e79f576 100644 --- a/modules/TAO/TAO_IDL/util/utl_scope.cpp +++ b/modules/TAO/TAO_IDL/util/utl_scope.cpp @@ -77,6 +77,7 @@ trademarks or registered trademarks of Sun Microsystems, Inc. #include "ast_component.h" #include "ast_component_fwd.h" #include "ast_home.h" +#include "ast_porttype.h" #include "ast_typedef.h" #include "ast_type.h" #include "ast_root.h" @@ -1005,7 +1006,7 @@ UTL_Scope::add_native (AST_Native *n) AST_Factory * UTL_Scope::add_factory (AST_Factory *f) { - //We don't invite any new types so there is nothing actually to add + // We don't invite any new types so there is nothing actually to add if (f == 0) { return 0; @@ -1015,6 +1016,18 @@ UTL_Scope::add_factory (AST_Factory *f) return f; } +AST_PortType * +UTL_Scope::add_porttype (AST_PortType *p) +{ + if (p == 0) + { + return 0; + } + + p->set_added (true); + return p; +} + // Protected Front End Scope Management Protocol. // // All members of the protocol defined in UTL_Scope simply return NULL @@ -1220,6 +1233,12 @@ UTL_Scope::fe_add_factory (AST_Factory *) return 0; } +AST_PortType * +UTL_Scope::fe_add_porttype (AST_PortType *) +{ + return 0; +} + // This is the second pass of the front end // It calls the public add protocol on everything in scope. // It calls the add_xx functions of the most derived AST_Node. |