Orocos Real-Time Toolkit  2.9.0
corba.h
Go to the documentation of this file.
1 /***************************************************************************
2  tag: Peter Soetens Thu Oct 22 11:59:07 CEST 2009 corba.h
3 
4  corba.h - description
5  -------------------
6  begin : Thu October 22 2009
7  copyright : (C) 2009 Peter Soetens
8  email : peter@thesourcworks.com
9 
10  ***************************************************************************
11  * This library is free software; you can redistribute it and/or *
12  * modify it under the terms of the GNU General Public *
13  * License as published by the Free Software Foundation; *
14  * version 2 of the License. *
15  * *
16  * As a special exception, you may use this file as part of a free *
17  * software library without restriction. Specifically, if other files *
18  * instantiate templates or use macros or inline functions from this *
19  * file, or you compile this file and link it with other files to *
20  * produce an executable, this file does not by itself cause the *
21  * resulting executable to be covered by the GNU General Public *
22  * License. This exception does not however invalidate any other *
23  * reasons why the executable file might be covered by the GNU General *
24  * Public License. *
25  * *
26  * This library is distributed in the hope that it will be useful, *
27  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
28  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
29  * Lesser General Public License for more details. *
30  * *
31  * You should have received a copy of the GNU General Public *
32  * License along with this library; if not, write to the Free Software *
33  * Foundation, Inc., 59 Temple Place, *
34  * Suite 330, Boston, MA 02111-1307 USA *
35  * *
36  ***************************************************************************/
37 
38 
39 #ifndef ORO_CORBA_SUPPORT_HH
40 #define ORO_CORBA_SUPPORT_HH
41 
42 #include "rtt-corba-config.h"
43 
44 // This macro had to be introduced to make Omniorb compatible with Xenomai.
45 // Omniorb4 creates its own threads, which are not Xenomai threads.
46 // This check turns plain posix threads into Xenomai threads on the Xenomai target.
47 #define CORBA_CHECK_THREAD()
48 
49 #if CORBA_IS_TAO
50 # include <ace/SString.h>
51 # include <tao/corba.h>
52 # include <tao/PortableServer/PS_ForwardC.h>
53 # define CORBA_SERVANT(f) f ## "S.h"
54 # define CORBA_EXCEPTION_INFO(x) x._info().c_str()
55 # ifndef ACE_THROW_SPEC
56 # define ACE_THROW_SPEC(X) throw X
57 # endif
58 #else
59 # include <omniORB4/CORBA.h>
60 # include <omniORB4/poa.h>
61 namespace CORBA {
62  typedef Any* Any_ptr;
63 }
64 # undef ACE_THROW_SPEC
65 # define ACE_THROW_SPEC(x)
66 # undef ACE_THROW
67 # define ACE_THROW(x)
68 # define CORBA_EXCEPTION_INFO(x) x._name()
69 // This Xenomai specific work-around is required for omniorb.
70 # ifdef OROCOS_TARGET_XENOMAI
71 # undef CORBA_CHECK_THREAD
72 # define CORBA_CHECK_THREAD() if (rt_task_self() == 0) rt_task_shadow(0,0,0,0)
73 # endif
74 #endif
75 
76 #endif
Any * Any_ptr
Definition: corba.h:62
Definition: corba.h:61