diff options
author | gokhale <asgokhale@users.noreply.github.com> | 1998-05-02 15:04:21 +0000 |
---|---|---|
committer | gokhale <asgokhale@users.noreply.github.com> | 1998-05-02 15:04:21 +0000 |
commit | 097966faa796b4c197b61f002269ab52ce201433 (patch) | |
tree | 244768297dfce30a592ac21a61beb7f99588f5d3 | |
parent | 47060bcc933e3a91b90ee61ee67ef0a3c6404e59 (diff) | |
download | ATCD-097966faa796b4c197b61f002269ab52ce201433.tar.gz |
*** empty log message ***
-rw-r--r-- | TAO/ChangeLog-98c | 15 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_exception.cpp | 25 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_operation.cpp | 2 |
3 files changed, 31 insertions, 11 deletions
diff --git a/TAO/ChangeLog-98c b/TAO/ChangeLog-98c index 0d247076c33..47e878fd4c7 100644 --- a/TAO/ChangeLog-98c +++ b/TAO/ChangeLog-98c @@ -1,3 +1,18 @@ +Sat May 2 09:58:41 1998 Aniruddha Gokhale <gokhale@mambo.cs.wustl.edu> + + * TAO_IDL/be/be_visitor_exception.cpp: We now make the *_alloc + method as a static method of the generated Exception class. The + reason for doing this was that some exceptions get borrowed from + included files. Now if we make the _alloc method as a static + method in the generated *C.cpp file, we don't see it in other + files where it is needed. The best way to do this was to make a + _alloc method as a static method on the generated exception class. + + * TAO_IDL/be/be_visitor_operation.cpp: Changes made above required + some trivial modifications. However, it remains to be see if + MSVC++ accepts the generated code or not OR whether it needs the + ACE_NESTED_CLASS macro. I am waiting for reports on this. + Fri May 01 17:56:07 1998 Nanbor Wang <nanbor@cs.wustl.edu> * tao/orbsvcs/orbsvcs/Naming/Naming_Utils.cpp: Moved #include of diff --git a/TAO/TAO_IDL/be/be_visitor_exception.cpp b/TAO/TAO_IDL/be/be_visitor_exception.cpp index 63bf273dca6..81d83deaba4 100644 --- a/TAO/TAO_IDL/be/be_visitor_exception.cpp +++ b/TAO/TAO_IDL/be/be_visitor_exception.cpp @@ -180,8 +180,12 @@ int be_visitor_exception_ch::visit_exception (be_exception *node) "codegen for scope failed\n"), -1); } - os->decr_indent (); - *os << "};" << be_nl; + // generate the static *_alloc method + os->indent (); + // this is TAO extension + *os << "// the alloc method. This is TAO extension" << be_nl; + *os << "static CORBA::Exception *_alloc (void);" << be_uidt_nl; + *os << "}; // exception " << node->name () << be_nl; // generate the Any <<= and >>= operators os->indent (); @@ -410,6 +414,15 @@ int be_visitor_exception_cs::visit_exception (be_exception *node) os->decr_indent (); *os << "}\n\n"; + // generate the _alloc method + os->indent (); + *os << "// TAO extension - the _alloc method" << be_nl; + *os << "CORBA::Exception *" << node->name () + << "::_alloc (void)" << be_nl; + *os << "{" << be_idt_nl; + *os << "return new " << node->name () << ";" << be_uidt_nl; + *os << "}\n\n"; + // Any <<= and >>= operators os->indent (); *os << "void operator<<= (CORBA::Any &_tao_any, const " @@ -488,14 +501,6 @@ int be_visitor_exception_cs::visit_exception (be_exception *node) *os << "CORBA::TypeCode_ptr " << node->tc_name () << " = &_tc__tc_" << node->flatname () << ";\n\n"; - // generate the _alloc method - os->indent (); - *os << "static CORBA::Exception *" << node->flatname () - << "_alloc (void)" << be_nl; - *os << "{" << be_idt_nl; - *os << "return new " << node->name () << ";" << be_uidt_nl; - *os << "}\n\n"; - node->cli_stub_gen (I_TRUE); } diff --git a/TAO/TAO_IDL/be/be_visitor_operation.cpp b/TAO/TAO_IDL/be/be_visitor_operation.cpp index 0c75e993f6a..3f0d5b556af 100644 --- a/TAO/TAO_IDL/be/be_visitor_operation.cpp +++ b/TAO/TAO_IDL/be/be_visitor_operation.cpp @@ -3236,7 +3236,7 @@ be_visitor_operation_exceptlist_cs::visit_operation (be_operation *node) *os << "{"; *os << excp->tc_name (); *os << ", "; - *os << excp->flatname () << "_alloc}"; + *os << excp->name () << "::_alloc}"; ei->next (); if (!ei->is_done ()) { |