summaryrefslogtreecommitdiff
path: root/src/include/broker.h
diff options
context:
space:
mode:
authorJannis M. Hoffmann <jannis@fehcom.de>2023-10-11 19:28:50 +0200
committerJannis M. Hoffmann <jannis@fehcom.de>2023-10-11 19:28:50 +0200
commit3ea7edf8c9bf7583c426178d4aaff4fb5b736bd2 (patch)
treeae78ebf9e9d1f70da8a6fdad1504063644ee8f1e /src/include/broker.h
parent1a7c572099edf744d6bb67318cff215de3fcd897 (diff)
use some enum classes
move ParseResult to recursivedescent.h
Diffstat (limited to 'src/include/broker.h')
-rw-r--r--src/include/broker.h23
1 files changed, 9 insertions, 14 deletions
diff --git a/src/include/broker.h b/src/include/broker.h
index 7cca0aa..0ead7a0 100644
--- a/src/include/broker.h
+++ b/src/include/broker.h
@@ -10,6 +10,7 @@
#include "depot.h"
#include "operators.h"
+#include "session.h"
#include <map>
#include <string>
@@ -21,17 +22,17 @@ namespace Binc {
class BrokerFactory {
private:
- std::map<int, Broker *> brokers;
+ std::map<Session::State, Broker *> brokers;
BrokerFactory();
mutable std::string lastError;
public:
- Broker *getBroker(int state);
+ Broker *getBroker(Session::State state);
void assign(const std::string &fname, Operator *o);
void addCapability(const std::string &c);
- Operator *getOperator(int state, const std::string &name) const;
+ Operator *getOperator(Session::State state, const std::string &name) const;
inline const std::string &getLastError() const;
inline void setLastError(const std::string &error) const;
@@ -40,12 +41,12 @@ namespace Binc {
~BrokerFactory();
};
- inline const std::string &BrokerFactory::getLastError() const
+ const std::string &BrokerFactory::getLastError() const
{
return lastError;
}
- inline void BrokerFactory::setLastError(const std::string &error) const
+ void BrokerFactory::setLastError(const std::string &error) const
{
lastError = error;
}
@@ -58,18 +59,12 @@ namespace Binc {
public:
Operator *get(const std::string &name) const;
void assign(const std::string &fname, Operator *o, bool deletable = false);
- Operator::ParseResult parseStub(Request &cmd);
+ Parser::ParseResult parseStub(Request &cmd);
- inline Broker(Broker &);
- inline Broker(const Broker &);
- Broker();
- ~Broker();
+ Broker() = default;
+ Broker(Broker &&) = default;
};
- inline Broker::Broker(Broker &) {}
-
- inline Broker::Broker(const Broker &) {}
-
}
#endif