Skip to content

Commit a471bf5

Browse files
committed
Allow IDL maps to be arguments in operations of (local) interfaces
1 parent 2c2a752 commit a471bf5

2 files changed

Lines changed: 18 additions & 0 deletions

File tree

TAO/TAO_IDL/be/be_visitor_argument/arglist.cpp

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111

1212
#include "argument.h"
1313

14+
#include "be_map.h"
15+
1416
// ************************************************************
1517
// be_visitor_args_arglist for parameter list in method declarations and
1618
// definitions
@@ -309,6 +311,20 @@ int be_visitor_args_arglist::visit_sequence (be_sequence *node)
309311
return 0;
310312
}
311313

314+
int be_visitor_args_arglist::visit_map (be_map *node)
315+
{
316+
if (node->imported () && node->anonymous ())
317+
{
318+
(void) node->create_name (nullptr);
319+
}
320+
321+
TAO_OutStream *const os = this->ctx_->stream ();
322+
323+
*os << this->type_name (node) << (this->direction () == AST_Argument::dir_IN ? " const" : "") << " &";
324+
325+
return 0;
326+
}
327+
312328
int be_visitor_args_arglist::visit_string (be_string *node)
313329
{
314330
TAO_OutStream *os = this->ctx_->stream ();

TAO/TAO_IDL/be_include/be_visitor_argument/arglist.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,8 @@ class be_visitor_args_arglist : public be_visitor_args
9999
/// visit valuebox
100100
virtual int visit_valuebox (be_valuebox *node);
101101

102+
virtual int visit_map (be_map *node);
103+
102104
/// Set the member.
103105
void unused (bool val);
104106

0 commit comments

Comments
 (0)