Scanframe Modular Application 0.1.0
Loading...
Searching...
No Matches
StorageServer.h
Go to the documentation of this file.
1#pragma once
3#include <sto/iface/global.h>
4
5namespace sf
6{
7
8class StorageInterface;
9
14{
15 public:
19 explicit StorageServer(id_type deviceNumber, const std::string& serverName = {});
20
25
29 [[nodiscard]] std::string getServerName() const;
30
34 bool createImplementation(const std::string& name);
35
39 [[nodiscard]] std::string getImplementationName() const;
40
45 {
46 createImplementation(-1);
47 }
48
52 StorageInterface* getImplementation();
53
54 protected:
59 bool createImplementation(int index);
60
65
70
74 StorageInterface* _implementation{nullptr};
78 id_type _deviceNumber{0};
82 std::string _serverName;
83};
84
89
90}// namespace sf
Base class for all generic information objects to be able to put them in a typed list together.
Definition InformationBase.h:25
unsigned long long id_type
Type used for the identifying integer (64-bits).
Definition InformationBase.h:30
Base class for the interface.
Definition StorageInterface.h:18
Storage server.
Definition StorageServer.h:14
std::string _serverName
Holds the device name for creating the variable names.
Definition StorageServer.h:82
std::string getImplementationName() const
Gets the name of the current implementation.
StorageInterface * getImplementation()
Gets a pointer to the current acquisition implementation.
Definition StorageServer.h:85
bool createImplementation(const std::string &name)
Creates an attached implementation by name.
StorageServer(id_type deviceNumber, const std::string &serverName={})
Constructor.
~StorageServer()
Destructor.
void destroyImplementation()
Destroys the created implementation.
Definition StorageServer.h:44
StorageInterface * _implementation
Holds the implementation.
Definition StorageServer.h:74
std::string getServerName() const
Gets the name given at the constructor.
void createInterface()
Create interface parameters at construction once.
void destroyInterface()
Remove all parameters and results.
bool createImplementation(int index)
Creates the implementation of index on the registered implementations.
Definition Application.h:10
#define _STO_CLASS
Definition sto/iface/global.h:35