Main Page
Namespaces
Classes
Files
File List
File Members
include
asr_recognizer_prediction_ism
shared_recognition_results_manager.h
Go to the documentation of this file.
1
18
#ifndef RECOGNIZER_PREDICTION_ISM_SHARED_MEMORY_MANAGER_H
19
#define RECOGNIZER_PREDICTION_ISM_SHARED_MEMORY_MANAGER_H
20
21
/* ----------------- ISM ------------------ */
22
#include <ISM/common_type/RecognitionResult.hpp>
23
24
/* ----------------- boost shared_memory ------------------ */
25
#include <mutex>
26
27
namespace
recognizer_prediction_ism
28
{
29
class
SharedRecognitionResultsManager
30
{
31
public
:
32
SharedRecognitionResultsManager
()
33
{ }
34
35
bool
addResults
(std::vector<ISM::RecognitionResultPtr> &result_ptrs);
36
bool
popLastResult
();
37
void
clearResults
();
38
bool
recognitionResultsAvailable
();
39
unsigned
int
getResultsNumber
();
40
ISM::RecognitionResult
getLastResult
();
41
std::vector<ISM::RecognitionResultPtr>
getResults
();
42
private
:
43
std::mutex
mutex_
;
44
45
std::vector<ISM::RecognitionResultPtr>
shared_memory_vector_
;
46
};
47
48
typedef
boost::shared_ptr<SharedRecognitionResultsManager>
SharedRecognitionResultsManagerPtr
;
49
std::ostream&
operator<<
(std::ostream &strm,
SharedRecognitionResultsManager
&p);
50
std::ostream&
operator<<
(std::ostream &strm,
const
SharedRecognitionResultsManagerPtr &pPtr);
51
}
52
#endif
recognizer_prediction_ism::operator<<
std::ostream & operator<<(std::ostream &strm, SharedRecognitionResultsManager &p)
Definition:
shared_recognition_results_manager.cpp:93
recognizer_prediction_ism::SharedRecognitionResultsManager
Definition:
shared_recognition_results_manager.h:29
recognizer_prediction_ism::SharedRecognitionResultsManager::getResults
std::vector< ISM::RecognitionResultPtr > getResults()
Definition:
shared_recognition_results_manager.cpp:43
boost::shared_ptr< SharedRecognitionResultsManager >
recognizer_prediction_ism::SharedRecognitionResultsManager::mutex_
std::mutex mutex_
Definition:
shared_recognition_results_manager.h:43
recognizer_prediction_ism::SharedRecognitionResultsManager::SharedRecognitionResultsManager
SharedRecognitionResultsManager()
Definition:
shared_recognition_results_manager.h:32
recognizer_prediction_ism
Definition:
param_helper.h:20
recognizer_prediction_ism::SharedRecognitionResultsManager::getLastResult
ISM::RecognitionResult getLastResult()
Definition:
shared_recognition_results_manager.cpp:37
recognizer_prediction_ism::SharedRecognitionResultsManager::addResults
bool addResults(std::vector< ISM::RecognitionResultPtr > &result_ptrs)
Definition:
shared_recognition_results_manager.cpp:28
recognizer_prediction_ism::SharedRecognitionResultsManager::popLastResult
bool popLastResult()
Definition:
shared_recognition_results_manager.cpp:80
recognizer_prediction_ism::SharedRecognitionResultsManager::shared_memory_vector_
std::vector< ISM::RecognitionResultPtr > shared_memory_vector_
Definition:
shared_recognition_results_manager.h:45
recognizer_prediction_ism::SharedRecognitionResultsManagerPtr
boost::shared_ptr< SharedRecognitionResultsManager > SharedRecognitionResultsManagerPtr
Definition:
shared_recognition_results_manager.h:48
recognizer_prediction_ism::SharedRecognitionResultsManager::clearResults
void clearResults()
Definition:
shared_recognition_results_manager.cpp:67
recognizer_prediction_ism::SharedRecognitionResultsManager::getResultsNumber
unsigned int getResultsNumber()
Definition:
shared_recognition_results_manager.cpp:61
recognizer_prediction_ism::SharedRecognitionResultsManager::recognitionResultsAvailable
bool recognitionResultsAvailable()
Definition:
shared_recognition_results_manager.cpp:75
asr_recognizer_prediction_ism
Author(s): Aumann Florian, Heller Florian, Hutmacher Robin, Meißner Pascal, Stöckle Patrick, Stroh Daniel
autogenerated on Wed Jan 8 2020 03:18:32