Rtems and C++ -- code examples?
Erwin Rol
Erwin.Rol at q-soft-engineering.com
Thu Mar 22 10:29:51 UTC 2001
Rosimildo da Silva wrote:
>
> Tom Knox wrote:
> >
> > Hi there,
> >
> > Does anyone have a good example of a C++ project that uses RTEMS/RTEMS++?
> > Something a little more involved than the "test" project for RTEMS++ would
> > be greatly appreciated.
>
> I did not understnad what you ask, but this is huge C++ framework that
> works with RTEMS:
>
> http://www.uk.research.att.com/omniORB/omniORB.html
>
> If you meant the librtems++ wrappers, I would not recommend it.
> Not to offend anyone, but that code is one of the worst peace
> of C++ code that I have seen. :-)
from the MFC sources:
The inheritance tree
CObject <- CCmdTarget <- CWnd <- CView <- CCtrlView <- CListView
CWmd <- CListCtrl
_AFXCVIEW_INLINE CListView::CListView() : CCtrlView(WC_LISTVIEW,
AFX_WS_DEFAULT_VIEW)
{ }
_AFXCVIEW_INLINE CListCtrl& CListView::GetListCtrl() const
{ return *(CListCtrl*)this; }
no wonder they need pointer casts to be posible in C# :-)
- Erwin
>
> When I've looked at it, and noticed that everything inherits from
> RtemsStatusCode or something like that, I decided in one minute that
> was totally useless.
>
> Inheritance is when you have an *is an* relationship, and that
> code make anyone to puke.
>
> A semaphore is NOT a status. A semaphore may contain one status.
>
> I usually, use the omnithread library for threads, semaphores, mutex,
> etc. It has a nice interface and provides multi-paltform capabilities.
> It allows you to test your code under Windows/Linux/Solaris etc.
>
> I am sorry for whoever wrote that code.
> I am not trying to affend you.
>
> --
> Rosimildo da Silva rdasilva at connectel.com
> ConnectTel, Inc. Austin, TX -- USA
> Phone : 512-338-1111 Fax : 512-918-0449
> Company Page: http://www.connecttel.com
> Home Page: http://members.nbci.com/rosimildo/
More information about the users
mailing list