This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
Re: eCos C++ API
- From: Sergei Organov <osv at javad dot com>
- To: "Paul D. DeRocco" <pderocco at ix dot netcom dot com>
- Cc: "eCos Discuss" <ecos-discuss at ecos dot sourceware dot org>
- Date: Wed, 21 Mar 2007 12:28:05 +0300
- Subject: [ECOS] Re: eCos C++ API
- References: <01cf01c76b52$367b77a0$8d7ba8c0@PAULD>
"Paul D. DeRocco" <pderocco@ix.netcom.com> writes:
> Are the C++ objects on which eCos is based supposed to be invisible to the
> programmer, so that the designers of eCos can change them at will? Or is it
> reasonable for a programmer writing an application in C++ to directly use
> the underlying eCos C++ objects? Since everything else in my application is
> in C++, I'd much rather do the latter, for instance creating a thread
> directly as a Cyg_Thread instead of declaring a cyg_thread and having to
> call cyg_thread_create.
>
>From practical point of view, the C++ objects didn't change incompatibly
from the time I started to use them back in around 2001/2002. Yes, my
application is in C++ and it seems to be plain overhead to use
C-wrappers over C++ eCos kernel in C++ applications. Though I do use my
own C++ wrappers over eCos C++ kernel, so even if eCos classes change,
the changes to the application will be localized.
> I assume kernel.hxx is the appropriate header to include, instead of kapi.h,
> right? Is there any documentation on what might be part of the "official"
> C++ API, or am I on my own in judging which things in the headers are likely
> to be stable and which might disappear in a later version? Massa's book says
> there isn't any standard, but that's four years old.
There is still no "official" standard eCos C++ API. You will need to
include headers that contain required declarations. For example, my
mutex wrapper contains:
#include <cyg/kernel/kapi.h>
#include <cyg/kernel/mutex.hxx>
--
Sergei.
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss