summaryrefslogtreecommitdiff
path: root/src/include/broker.h
diff options
context:
space:
mode:
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