Boost logo

Boost Users :

From: Mike Marchywka (marchywka_at_[hidden])
Date: 2008-08-21 13:57:24


> Date: Thu, 21 Aug 2008 06:10:41 -0700
> From: alanbaljeu_at_[hidden]
> To: boost-users_at_[hidden]
> Subject: [Boost-users] Wrapping a library
>
> I have this library (one class with 700 methods) I want to wrap all the calls, so I can log the calls and do other stuff. Using emacs macros and stuff, I can create a proxy class which has the same signature, but each method calls a C macro which calls the original class method, and does other stuff.

A class or a namespace?

>

>
> I'm thinking there must be a better way. I'm thinking BOOST_PP library could abstract the above macros into something concise. However, the library is intimidating. There are lots of features, and I'm not clear on how I should get started.
>
>

For ad hoc code generation, I usually end up with awk and sed. I just did this wrapping
thing with a java class definition ( no actual source code) and could pretty much use lynx to render the javadoc html, extract
method signatures, and use awk to generate methods with sed and finally
vi to touch stuff up. The generated class contained an instance of the original class that
was simply called in each generated method after my custion code,if any, executed.
I wasn't just interested in wrapping as I also made a fake version for
unsupported operations.

I'm not really sure you need a c++ library for this but I imagine there are cases
where it would be worth the learning curve. Personally, I try to learn generic
tools with wider applicability unless I need something more specialized.

Mike Marchywka
586 Saint James Walk
Marietta GA 30067-7165
415-264-8477 (w)<- use this
404-788-1216 (C)<- leave message
989-348-4796 (P)<- emergency only
marchywka_at_[hidden]
Note: If I am asking for free stuff, I normally use for hobby/non-profit
information but may use in investment forums, public and private.
Please indicate any concerns if applicable.
Note: Hotmail is possibly blocking my mom's entire
ISP - try me on marchywka_at_[hidden] if no reply
here. Thanks.

_________________________________________________________________
Talk to your Yahoo! Friends via Windows Live Messenger. Find out how.
http://www.windowslive.com/explore/messenger?ocid=TXT_TAGLM_WL_messenger_yahoo_082008


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net