[orbitcpp-list] announcing o2cpp
Status: Beta
Brought to you by:
philipd
From: Andreas K. <ak...@ix...> - 2000-01-31 18:30:37
|
Hi, I'd like to announce to you the initial release of "o2cpp", version 0.10. o2cpp is (to become) a c++ mapping for orbit. Accidentally, you're trying to achieve the very same thing. Some of you may remember me asking last summer whether you'd need people to do a c++ port, well, the answer was "no,thanks", so i started over from scratch, which taught me a lot about corba, took about two weeks to write 99% of the code, then uni started again, i got busy with other things, and so it took another six months to let things culminate in this release. "Now why does this guy redo all the stuff we did?" -------------------------------------------------- * Choice of language I believe Python is not quite the optimal choice of a language for a c++ mapping, yet, one can debate that. my implementation is 100% pure c++. * IDL compiler design At that time, you were using the visitor pattern as the main build scheme for your compiler. I don't know whether this is still true, but when I looked at it from a distance, it did not please me much out of one reason: Its use of inheritance and polymorphism in this setting is restricted. Thus, along with a new language, I am proposing to you a new compiler design: With my implementation, I have a class for every kind of IDL element, which in turn knows how to spit out its code if appropriate (e.g., cIDLType has a pure virtual method "writeCPPStubMarshalCode", which does so for any type given) Thus, any given type can be handled by the same code, and (e.g.) typedefs are straightforward and easy. Uh, this description isn't too good, but I'm sure you'll instantaneously get the point when looking at the code. * Implementation integrity and robustness Six months ago, some parts of the code seemed just not the way I'd liked them to be, mainly the "runtime" parts, i.e. ORB and POA stuff, as well as much of the generated code in the skeletons. Obviously, you will have made a bit of progress, so this may not be a point any more. "Why should the ORBit-C++ project care?" ---------------------------------------- Counting that two teams trying to do the same thing in basically the same manner do not cooperate makes both teams achieve less than they could. I have taken things so far as to not just be standing there, saying: "But wait, I want all this in C++!". I thought my request would be a bit more convincing if there was a base to start porting upon, so I decided to lay that base, and here it is. After all, this project was always intended to augment, not to void your efforts. "And how far have you come?" ---------------------------- Hope you don't mind if I paste this part from the README... 8<----------------------------------- What o2cpp already has: * a consistent compiler framework worked out as a backend to orbit-idl * a c++ representation of the idl tree with some name lookup bells and whistles * a consistent polymorphic type framework that should make adding new types a breeze: just add the appropriate translation code to pass1.cc (if it is a user-defined type), derive your new type from cIDLType/cIDLUserDefType/CIDLUserDefScopeType (types.hh, types.cc) and add it to the type parser in types.cc. That should do the trick. (For your reference: It took me hardly an hour to hack in the string type after all. All I had to change was types.cc! Structs shouldn't be hard either - the exception code already leads the way) * quite a bit of runtime code: - basic type definitions - sequence types - smart pointer types - full exception support - _var and _out templates - ORB (partly) - stub generation - POA (mostly) * correct type mapping of - basic types - typedefs - interfaces - operations - object reference types - exceptions - strings * rather complete headers / declarations of all the pseudo objects * stub generation and registration, including exception support and parameter/return (de)marshalling, based on the above type framework * skeleton generation, including exception support * source-code pretty-printing * support of non-static-initialization environments (such as dlopen'd libraries on some platforms) What o2cpp is still missing: * constants (easy) * types - enum, fixed - sequence (templates already done) - struct,union,array * attributes * Policies * TypeCodes (header already there) * DII * DSI * CORBAservices headers (easy: put in IDL, have it compiled by Makefile) 8<----------------------------------- The source has an introductory README, is well structured (at least I think so!), nicely indented and commented in places. If you ask me to, I can give you a head start on what is where. "I want to try it." ------------------- Fine! Thanks for giving it a try. Look for it at http://www.stud.uni-karlsruhe.de/~uj6g/o2cpp One thing I should mention: You should either be in possession of a _current_ cvs orbit (that is, after January 21), or apply the patch to be found on the homepage. Well, thanks for reading all this. If you feel like it, flame me! cu andreas |