plptools
Loading...
Searching...
No Matches
rpcsfactory.h
Go to the documentation of this file.
1
/*
2
* This file is part of plptools.
3
*
4
* Copyright (C) 1999 Philip Proudman <philip.proudman@btinternet.com>
5
* Copyright (C) 1999-2001 Fritz Elfert <felfert@to.com>
6
* Copyright (C) 2026 Jason Morley <hello@jbmorley.co.uk>
7
*
8
* This program is free software; you can redistribute it and/or modify
9
* it under the terms of the GNU General Public License as published by
10
* the Free Software Foundation; either version 2 of the License, or
11
* (at your option) any later version.
12
*
13
* This program is distributed in the hope that it will be useful,
14
* but WITHOUT ANY WARRANTY; without even the implied warranty of
15
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
* GNU General Public License for more details.
17
*
18
* You should have received a copy of the GNU General Public License along
19
* along with this program; if not, see <https://www.gnu.org/licenses/>.
20
*
21
*/
22
#pragma once
23
24
#include "
connectionerror.h
"
25
#include "
rpcs.h
"
26
27
class
TCPSocket
;
28
33
class
RPCSFactory
final {
34
public
:
35
42
RPCSFactory
(
const
std::string &host,
int
port);
43
47
~RPCSFactory
();
48
57
RPCS
*
create
(
bool
,
Enum<ConnectionError>
*
error
=
nullptr
);
58
59
private
:
60
std::string
host_
;
61
int
port_
;
62
};
Enum
Wrapper class featuring range-checking and string representation of enumerated values.
Definition:
Enum.h:135
RPCSFactory
A factory for automatically instantiating the correct protocol variant depending on the connected Psi...
Definition:
rpcsfactory.h:33
RPCSFactory::host_
std::string host_
Definition:
rpcsfactory.h:60
RPCSFactory::port_
int port_
Definition:
rpcsfactory.h:61
RPCSFactory::create
RPCS * create(bool, Enum< ConnectionError > *error=nullptr)
Creates a new RPCS instance.
Definition:
rpcsfactory.cc:39
RPCSFactory::~RPCSFactory
~RPCSFactory()
Delete the RPCSFactory, cleaning up any resources.
Definition:
rpcsfactory.cc:37
RPCS
Remote procedure call services via PLP.
Definition:
rpcs.h:52
TCPSocket
A class for dealing with sockets.
Definition:
tcpsocket.h:37
connectionerror.h
rpcs.h
error
static void error(int line)
Definition:
sismain.cpp:44
lib
rpcsfactory.h
Generated by
1.9.5