Permalink
Cannot retrieve contributors at this time
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?
bfs/breadcrumbs/include/Algorithm.hpp
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
28 lines (21 sloc)
638 Bytes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef ALGORITHM_HPP | |
#define ALGORITHM_HPP | |
#include "IOProcessor.hpp" | |
class Algorithm | |
{ | |
public: | |
explicit Algorithm(IOProcessor* ins, SIZE_T num_inputs, IOProcessor* outs, SIZE_T num_outputs); | |
virtual VOID loop() = 0; | |
virtual BOOLEAN loopCondition() { return FALSE; }; | |
VOID startIOProcessors(); | |
VOID waitForIOProcessors(); | |
VOID stopIOProcessors(); | |
// Updates Algorithm key/value store with IO key/value stores | |
VOID pollInputs(); | |
// Updates IO key/value stores with Algorithm key/value store | |
VOID pollOutputs(); | |
private: | |
SIZE_T numInputs, numOutputs; | |
IOProcessor* inputs, *outputs; | |
}; | |
#endif |