[orbitcpp-list] compiler fixes and Any support
Status: Beta
Brought to you by:
philipd
From: John L. <jk...@lu...> - 2000-11-12 05:04:58
|
I checked in Any support in both the ORB and compiler. I also fixed a couple nasty bugs in arrays, and sequences. Although most people might write: typedef sequence< string > mySeq; struct Test { mySeq test_seq; }; You can write: struct Test { sequence< string > test_seq; }; This is not a typedef, but since this causes an UnboundedSequenceTmpl instance we still need to write the operator new and allocbuf. I consider the operator new and allocbuf to be "Typespec implementation". Implementation that has to be present whenever the typespec exists for any reason, that is whenever getCPPMemberDeclarator is called for putting the typespec in the generated code. Well getCPPMemberDeclarator is used in structs, exceptions, and typedefs, and unions for members that may possibly need "implementation" to complement the simple declarator. So I added a function writeTypeImplCode to IDLType that takes care of this "implementation." This functions is simply called in the doTypedef, doException, and doStruct. I eschewed Unions because I knew Phil was working on that and I just thought I won't touch it for now. Also what about struct Test { long LongArr[5]; }; Well this just requires that the identifier be output correctly (it wasn't before), with dims attached, but no typedef things like smart pointers and Any functions have to be written. This problem is fixed. Also arrays in exceptions are supported. I think that about covers it. If there are any problems (it all compiles fine for me, I hope your mileage does not vary) please drop me an email and I will work on them immediately! John Luebs |