Safir SDK Core
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Dob/Connection.h
Go to the documentation of this file.
1 /******************************************************************************
2 *
3 * Copyright Saab AB, 2007-2013 (http://safir.sourceforge.net)
4 *
5 * Created by: Joel Ottosson / stjoot
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_CONNECTION_H
26 #define _SAFIR_DOB_CONNECTION_H
27 
31 
32 // Somewhat dirty but convenient for the Dob-user
34 
35 namespace Safir
36 {
37 namespace Dob
38 {
45  class DOSE_CPP_API Connection : public ConnectionBase
46  {
47  public:
48 
51  Connection();
52 
55  virtual ~Connection();
56 
88  void Open(const std::wstring& connectionNameCommonPart,
89  const std::wstring& connectionNameInstancePart,
90  const Dob::Typesystem::Int32 context,
91  StopHandler * const stopHandler,
92  Dispatcher * const dispatcher);
93 
103  void Close();
104 
110  virtual bool IsOpen() const;
111 
119  void Dispatch() const;
120 
121  private:
122 
123  //implementation of pure virtual
124  virtual long GetControllerId() const {return m_ctrl;}
125 
126  void Close(const bool checkThread);
127 
128  long m_ctrl;
129 
130  //Disable copying and assignment
131  Connection(const Connection&);
132  Connection& operator=(const Connection&);
133  };
134 }
135 }
136 
137 #endif
Interface for reception of a dispatch order.
Definition: Consumer.h:72
A connection to the DOB.
Definition: Dob/Connection.h:45
Common base class for connections to the DOB.
Definition: ConnectionBase.h:52
DotsC_Int32 Int32
32 bit integer type.
Definition: Dob/Typesystem/Defs.h:69
Interface for reception of a stop order.
Definition: Consumer.h:53