Safir SDK Core
Loading...
Searching...
No Matches
SecondaryConnection.h
Go to the documentation of this file.
1/******************************************************************************
2*
3* Copyright Saab AB, 2006-2013 (http://safirsdkcore.com)
4*
5* Created by: Lars Hagström / stlrha
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_SECONDARY_CONNECTION_H
26#define _SAFIR_DOB_SECONDARY_CONNECTION_H
27
31
32namespace Safir
33{
34namespace Dob
35{
45 {
46 public:
50
54
66 void Attach();
67
87 void Attach(const std::wstring& connectionNameCommonPart,
88 const std::wstring& connectionNameInstancePart);
89
95 void Detach();
96
102 bool IsAttached() const;
103
109 bool IsOpen() const override;
110
111 private:
112
113 //implementation of pure virtual
114 DotsC_Int32 GetControllerId() const override;
115
116 DotsC_Int32 m_ctrl;
117
118 //Disable copying and assignment
120 SecondaryConnection& operator=(const SecondaryConnection& rhs);
121 };
122
123}
124}
125
126#endif
#define DOSE_CPP_API
Definition DoseCppExportDefs.h:33
This namespace contains all the functionality and definitions of the SAFIR SDK.
Definition Backdoor.h:31
Common base class for connections to the DOB.
Definition ConnectionBase.h:59
A secondary connection attached to a "real" connection.
Definition SecondaryConnection.h:45
bool IsOpen() const override
For a secondary connection this is the same as the IsAttached check.
void Attach()
Attach to a connection in this thread.
virtual ~SecondaryConnection()
Destructor.
void Detach()
Detach a SecondaryConnection.
void Attach(const std::wstring &connectionNameCommonPart, const std::wstring &connectionNameInstancePart)
Attach to a named connection in this thread.
bool IsAttached() const
Check if a SecondaryConnection is attached to an open connection.