Safir SDK Core
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
MessageProxy.h
Go to the documentation of this file.
1 /******************************************************************************
2 *
3 * Copyright Saab AB, 2008-2013 (http://safir.sourceforge.net)
4 *
5 * Created by: Anders Widén / stawi
6 *
7 *******************************************************************************
8 *
9 * This file is part of Safir SDK Core.
10 *
11 * Safir SDK Core is free software: you can redistribute it and/or modify
12 * it under the terms of version 3 of the GNU General Public License as
13 * published by the Free Software Foundation.
14 *
15 * Safir SDK Core is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with Safir SDK Core. If not, see <http://www.gnu.org/licenses/>.
22 *
23 ******************************************************************************/
24 
25 #ifndef _SAFIR_DOB_MESSAGE_PROXY_H
26 #define _SAFIR_DOB_MESSAGE_PROXY_H
27 
28 #include <Safir/Dob/Internal/ProxyImplPtr.h>
33 #include <Safir/Dob/Message.h>
34 #include <Safir/Dob/Defs.h>
35 
36 #include <string>
37 
38 //Undefine stupid macro that windows.h defines. Just in case someone has included it
39 //before including us.
40 //TODO: Get rid of this, but when can we do it without potentially upsetting someone?
41 #ifdef GetMessage
42 #undef GetMessage
43 #endif
44 
45 namespace Safir
46 {
47 namespace Dob
48 {
49 
50  // Forward declaration
51  namespace Internal
52  {
53  class MessageProxyImpl;
54  }
55 
60  {
61  public:
69  const Dob::Typesystem::TypeId GetTypeId() const;
70 
78  const Dob::MessagePtr GetMessage() const;
79 
87  const Dob::ConnectionInfoPtr GetSenderConnectionInfo() const;
88 
97 
113  const char * GetBlob() const;
114 
128  const Dob::Typesystem::ChannelId GetChannelIdWithStringRepresentation() const;
129 
132  // The constructor is for internal usage only!
133  explicit MessageProxy(Internal::MessageProxyImpl* pImpl);
134 
135  private:
136 
137 #ifdef _MSC_VER
138 #pragma warning (push)
139 #pragma warning (disable: 4251) // To get rid of warning that says that the template needs to have a DLL-interface
140 #endif
141 
142  Internal::ProxyImplPtr<Internal::MessageProxyImpl> m_pImpl;
143 
144 #ifdef _MSC_VER
145 #pragma warning (pop)
146 #endif
147 
148  };
149 }
150 }
151 
152 #endif
Class containing the identity of a channel.
Definition: ChannelId.h:44
DOTS_CPP_API const Dob::Typesystem::ChannelId GetChannelId(const Dob::Typesystem::TypeId typeId, const Dob::Typesystem::ParameterIndex parameter, const Dob::Typesystem::ArrayIndex index)
Get a ChannelId parameter value.
DOTS_CPP_API Dob::Typesystem::TypeId GetTypeId(const Dob::Typesystem::TypeId typeId, const Dob::Typesystem::MemberIndex member)
Get type id of object or enumeration member.
boost::shared_ptr< Message > MessagePtr
Definition: Message.h:32
DotsC_TypeId TypeId
A unique type identifier.
Definition: Defs.h:219
boost::shared_ptr< ConnectionInfo > ConnectionInfoPtr
Definition: ConnectionInfo.h:34
#define DOSE_CPP_API
Definition: DoseCppExportDefs.h:33
Proxy class for a message.
Definition: MessageProxy.h:59