|
BusBoy
2
|
Provides algorithms with access to various services provided by the framework. More...
#include <AlgorithmContext.h>
Public Member Functions | |
| AlgorithmContext (const std::string &name) | |
| void | log (Logger::LogLevel level, const char *format,...) |
| Printf style logging method for algorithms. More... | |
| void | log (const std::string &file, int line, Logger::LogLevel level, const char *format,...) |
| Printf style logging method for algorithms with code location. More... | |
| void | log (Logger::LogLevel level, const std::string &msg) |
| Logging method for algorithms. More... | |
| void | log (const std::string &file, int line, Logger::LogLevel level, const std::string &msg) |
| Logging method for algorithms with code location. More... | |
| void | progress (float percentDone, const char *format,...) |
| Printf style progress reporting method for algorithms. More... | |
| void | progress (float percentDone, const std::string &msg) |
| Progress reporting method for algorithms. More... | |
| void | registerLogger (Logger *logger) |
| Register an object to receive all logging messages. More... | |
| void | registerProgressReporter (ProgressReporter *prog) |
| Register an object to receive all progress messages. More... | |
| std::string | createTempDirectory () |
| Create a temporary directory for use by the algorithm. More... | |
| void | sendMessage (const Message &msg) |
| Send message to a topic. More... | |
| void | registerMessageConsumer (MessageConsumer *consumer) |
| Register an object to receive all messages sent to topics. More... | |
| ~AlgorithmContext () | |
Provides algorithms with access to various services provided by the framework.
A context instance is valid for the duration of a single algorithm execution.
| BUSBOY::AlgorithmContext::AlgorithmContext | ( | const std::string & | name | ) |
| BUSBOY::AlgorithmContext::~AlgorithmContext | ( | ) |
| std::string BUSBOY::AlgorithmContext::createTempDirectory | ( | ) |
Create a temporary directory for use by the algorithm.
Busboy is responsible for cleaning up the directory after the algorithm exits.
| void BUSBOY::AlgorithmContext::log | ( | Logger::LogLevel | level, |
| const char * | format, | ||
| ... | |||
| ) |
Printf style logging method for algorithms.
| void BUSBOY::AlgorithmContext::log | ( | const std::string & | file, |
| int | line, | ||
| Logger::LogLevel | level, | ||
| const char * | format, | ||
| ... | |||
| ) |
Printf style logging method for algorithms with code location.
| void BUSBOY::AlgorithmContext::log | ( | Logger::LogLevel | level, |
| const std::string & | msg | ||
| ) |
Logging method for algorithms.
| void BUSBOY::AlgorithmContext::log | ( | const std::string & | file, |
| int | line, | ||
| Logger::LogLevel | level, | ||
| const std::string & | msg | ||
| ) |
Logging method for algorithms with code location.
| void BUSBOY::AlgorithmContext::progress | ( | float | percentDone, |
| const char * | format, | ||
| ... | |||
| ) |
Printf style progress reporting method for algorithms.
| void BUSBOY::AlgorithmContext::progress | ( | float | percentDone, |
| const std::string & | msg | ||
| ) |
Progress reporting method for algorithms.
| void BUSBOY::AlgorithmContext::registerLogger | ( | Logger * | logger | ) |
Register an object to receive all logging messages.
| void BUSBOY::AlgorithmContext::registerMessageConsumer | ( | MessageConsumer * | consumer | ) |
Register an object to receive all messages sent to topics.
| void BUSBOY::AlgorithmContext::registerProgressReporter | ( | ProgressReporter * | prog | ) |
Register an object to receive all progress messages.
| void BUSBOY::AlgorithmContext::sendMessage | ( | const Message & | msg | ) |
Send message to a topic.
If a handler has not been configured for the topic, the message will just be logged
1.8.3.1
Copyright 2014 Google Inc. All rights reserved.