Skip to content
Permalink
c3619f3db3
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
24 lines (18 sloc) 592 Bytes
#ifndef ALGORITHM_HPP
#define ALGORITHM_HPP
#include "AlgorithmServer.hpp"
class Algorithm
{
public:
explicit Algorithm(size_t numProcs);
~Algorithm();
virtual void loop() = 0;
virtual bool loopCondition() { return false; };
vector<Attribute> pollForAttributes() { return server->getAllIncomingAttributes(); };
map<string, Attribute> pollForAttributesMap() { return server->getAllIncomingAttributesMap(); };
void sendAttribute(Attribute attrib) { server->sendAttributeToAll(attrib); };
private:
size_t numIoProcs = 0;
AlgorithmServer* server;
};
#endif