Boost logo

Boost Users :

From: Jeff F (TriumphSprint2000_at_[hidden])
Date: 2007-01-11 08:41:26


Andreas Huber wrote:
> Hi Eli
>
>> For the embedded software project I am working on, we are seeking a
>> library to run Statecharts.
>>
>> The run-time environment is :
>>
>> * ARM cpu
>>
>> * Linux 2.6
>>
>> * C (not C++)
>>
>> * Embedded / real-time application

...

>> 1. One of my greatest concern is the fact we are working in C. This
>> introduces several problems
>>
>> a. Mixing C and C++. This is my smallest concern, since the
>> compilers should have solved this long ago.
>> b. Connecting the C++ produced by the tool to our C code.
>
> Whether C code can easily interface with Boost.Statechart C++ code
> largely depends on what you want to do. I don't know much about the
> mixing of C with C++ code but it seems that you couldn't directly
> access any of the C++ classes/objects from C code. You'd need to
> write C++ accessor functions that only have C compatible types in
> their signatures for pretty much anything you want the library to do.
> If there are only a few such interaction points then the necessary
> effort would seem small.
>
>> c. We do not have personnel proficient in C++. This means
>> that the above problems, together with any deeper understanding of
>> the internals of the tool will be problematic. This will hurt mostly
>> during debug and integration.
>
> I guess so, although one C++ crack in your team would probably go a
> long way.

Agreed. In addition the OP might want to look at Appendix B from "Large
Scale C++ Software Design" by John Lakos. Which describes "Implementing an
ANSI C-Compatible C++ Interface".

Jeff Flinn


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