boost, COM and .NET [maybe OT]

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

boost, COM and .NET [maybe OT]

QbProg
Hello there,
I'd like to thank Alan for the reply to my previous post. I'm sorry if
this message is OT. What I ask is not a technical detail, but an
opinion from you, c++ gurus :)

Finally I've setup a simply class hierarchy that derives from a common
object. Each class has:
1) Smart Pointer (boost::intrusiveptr),typedef intrusiveptr<ClassName>
ClassName_Ptr;
2) Array of smart pointers ( typedef array <ClassName_Ptr> ClassName_Array)

Everything works fine , and I'm happy :) the framework has no depends
, it's self-contained and performant :) It is composed by a bunch of
classes, but with MANY members.

Now, I've got to make this small framework usable from:
1) .COM for compatibility
2) .NET for future applications
and of course
3) c++ and boost :)

All the three ways use the "allocate and forget about it" paradigm for
memory allocation. I only use c++ types and I don't have ANY pointer
used directly in the code.
Changing to .NET is not hard and doesn't require wrapper classes
(since the lib is self-contained), just some preprocessor programming
and recompiling. Option 3) require no change :)

What I worry about is .COM interop. Since classes are not derived from
interfaces, I would require a lot of wrappers to native classes
(because i don't want to use directly COM rules and types).
So I see two solutions:
1) ok, write these wrappers as "external" code (I have lot's of
properties and methods to wrap), maybe by using GCCXML and an
automatic generator.
2) write base Interfaces and derive my framework classes from these,
eventually adapting intrusive_ptr to use COM AddRef's
3) use .NET to COM interop and resolve problem 1 and 2 together, but
distribuite 200MB of dll's

Anyone has experience with intrusive_ptr (or shared_ptr) and COM pointers?

Any idea about the general problem?

Thanks & Sorry for my English!

Thomas
_______________________________________________
Boost-users mailing list
[hidden email]
http://lists.boost.org/mailman/listinfo.cgi/boost-users
Reply | Threaded
Open this post in threaded view
|

Re: boost, COM and .NET [maybe OT]

Simon Carter-2
Thomas Laguzzi <tholag <at> gmail.com> writes:

> What I worry about is .COM interop. Since classes are not derived from
> interfaces, I would require a lot of wrappers to native classes
> (because i don't want to use directly COM rules and types).

You could take a look at the comet library,
http://www.lambdasoft.dk/comet/index.htm,

though its development seems to have gone a little quiet

_______________________________________________
Boost-users mailing list
[hidden email]
http://lists.boost.org/mailman/listinfo.cgi/boost-users