![]() |
LIMA
Libre Multilingual Analyzer — C++ API
|
Holds all data that pass through the ProcessUnits Analysis data are shared pointers, simplifying memory management. More...
#include <common/ProcessUnitFramework/AnalysisContent.h>
Public Member Functions | |
| AnalysisContent () | |
| AnalysisContent (const AnalysisContent &)=delete | |
| AnalysisContent & | operator= (const AnalysisContent &)=delete |
| virtual | ~AnalysisContent () |
| Reduce the reference count of all AnalysisData in AnalysisContent causing them to be deleted if needed. | |
| std::shared_ptr< AnalysisData > | getData (const QString &id) |
| return AnalysisData by id | |
| const std::shared_ptr< AnalysisData > | getData (const QString &id) const |
| return constant AnalysisData by id | |
| void | setData (const QString &id, std::shared_ptr< AnalysisData > data) |
| set an analysisData with the given id. | |
| void | setData (const QString &id, AnalysisData *data) |
| set an analysisData with the given id. | |
| void | removeData (const QString &id) |
| remove the analysisData with the given id | |
| std::shared_ptr< AnalysisData > | getData (const std::string &id) |
| return AnalysisData by id | |
| std::shared_ptr< AnalysisData > | getData (const char *id) |
| return AnalysisData by id | |
| const std::shared_ptr< AnalysisData > | getData (const std::string &id) const |
| return constant AnalysisData by id | |
| const std::shared_ptr< AnalysisData > | getData (const char *id) const |
| return constant AnalysisData by id | |
| void | setData (const std::string &id, std::shared_ptr< AnalysisData > data) |
| set an analysisData with the given id. | |
| void | setData (const char *id, std::shared_ptr< AnalysisData > data) |
| set an analysisData with the given id. | |
| void | setData (const std::string &id, AnalysisData *data) |
| set an analysisData with the given id. | |
| void | setData (const char *id, AnalysisData *data) |
| set an analysisData with the given id. | |
| void | removeData (const char *id) |
| remove the analysisData with the given id | |
| void | removeData (const std::string &id) |
| remove the analysisData with the given id | |
| void | clear () |
| remove all the analysisData | |
| void | releaseData (const std::string &id) |
| remove the analysisData with the given id without destructing it | |
Holds all data that pass through the ProcessUnits Analysis data are shared pointers, simplifying memory management.
Definition at line 36 of file AnalysisContent.h.
| Lima::AnalysisContent::AnalysisContent | ( | ) |
Definition at line 30 of file AnalysisContent.cpp.
|
delete |
|
virtual |
Reduce the reference count of all AnalysisData in AnalysisContent causing them to be deleted if needed.
Definition at line 34 of file AnalysisContent.cpp.
| void Lima::AnalysisContent::clear | ( | ) |
remove all the analysisData
| std::shared_ptr< AnalysisData > Lima::AnalysisContent::getData | ( | const char * | id | ) |
return AnalysisData by id
| id | Id of analysis to return |
| shared | pointer to valid AnalysisData if exists |
| empty | shared pointer if specified AnalysisData doesn't exists |
Definition at line 109 of file AnalysisContent.cpp.
| const std::shared_ptr< AnalysisData > Lima::AnalysisContent::getData | ( | const char * | id | ) | const |
return constant AnalysisData by id
| id | Id of analysis to return |
| shared | pointer to valid AnalysisData if exists |
| empty | shared pointer if specified AnalysisData doesn't exists |
Definition at line 114 of file AnalysisContent.cpp.
| std::shared_ptr< AnalysisData > Lima::AnalysisContent::getData | ( | const QString & | id | ) |
return AnalysisData by id
| id | Id of analysis to return |
| shared | pointer to valid AnalysisData if exists |
| empty | shared pointer if specified AnalysisData doesn't exists |
Definition at line 39 of file AnalysisContent.cpp.
| const std::shared_ptr< AnalysisData > Lima::AnalysisContent::getData | ( | const QString & | id | ) | const |
return constant AnalysisData by id
| id | Id of analysis to return |
| shared | pointer to valid AnalysisData if exists |
| empty | shared pointer if specified AnalysisData doesn't exists |
Definition at line 53 of file AnalysisContent.cpp.
| std::shared_ptr< AnalysisData > Lima::AnalysisContent::getData | ( | const std::string & | id | ) |
return AnalysisData by id
| id | Id of analysis to return |
| shared | pointer to valid AnalysisData if exists |
| empty | shared pointer if specified AnalysisData doesn't exists |
Definition at line 104 of file AnalysisContent.cpp.
| const std::shared_ptr< AnalysisData > Lima::AnalysisContent::getData | ( | const std::string & | id | ) | const |
return constant AnalysisData by id
| id | Id of analysis to return |
| shared | pointer to valid AnalysisData if exists |
| empty | shared pointer if specified AnalysisData doesn't exists |
Definition at line 119 of file AnalysisContent.cpp.
|
delete |
| void Lima::AnalysisContent::releaseData | ( | const std::string & | id | ) |
remove the analysisData with the given id without destructing it
| id | the identifier of the AnalysisData to release |
Definition at line 154 of file AnalysisContent.cpp.
| void Lima::AnalysisContent::removeData | ( | const char * | id | ) |
remove the analysisData with the given id
| id | the identifier of the AnalysisData to remove |
Definition at line 149 of file AnalysisContent.cpp.
| void Lima::AnalysisContent::removeData | ( | const QString & | id | ) |
remove the analysisData with the given id
| id | the identifier of the AnalysisData to remove |
Definition at line 91 of file AnalysisContent.cpp.
| void Lima::AnalysisContent::removeData | ( | const std::string & | id | ) |
remove the analysisData with the given id
| id | the identifier of the AnalysisData to remove |
Definition at line 144 of file AnalysisContent.cpp.
| void Lima::AnalysisContent::setData | ( | const char * | id, |
| AnalysisData * | data | ||
| ) |
set an analysisData with the given id.
Take ownership of the pointer.
| id | Id to design the given analysisData |
| data | AnalysisData to store. Take ownership of the pointer. |
Definition at line 139 of file AnalysisContent.cpp.
| void Lima::AnalysisContent::setData | ( | const char * | id, |
| std::shared_ptr< AnalysisData > | data | ||
| ) |
set an analysisData with the given id.
| id | Id to design the given analysisData |
| data | AnalysisData to store. |
Definition at line 134 of file AnalysisContent.cpp.
| void Lima::AnalysisContent::setData | ( | const QString & | id, |
| AnalysisData * | data | ||
| ) |
set an analysisData with the given id.
Take ownership of the pointer.
| id | Id to design the given analysisData |
| data | AnalysisData to store. Take ownership of the pointer. |
Definition at line 82 of file AnalysisContent.cpp.
| void Lima::AnalysisContent::setData | ( | const QString & | id, |
| std::shared_ptr< AnalysisData > | data | ||
| ) |
set an analysisData with the given id.
| id | Id to design the given analysisData |
| data | AnalysisData to store. |
Definition at line 67 of file AnalysisContent.cpp.
| void Lima::AnalysisContent::setData | ( | const std::string & | id, |
| AnalysisData * | data | ||
| ) |
set an analysisData with the given id.
Take ownership of the pointer.
Use the QString-based API instead
Use the shared_ptr-based API instead
| id | Id to design the given analysisData |
| data | AnalysisData to store. Take ownership of the pointer. |
Definition at line 129 of file AnalysisContent.cpp.
| void Lima::AnalysisContent::setData | ( | const std::string & | id, |
| std::shared_ptr< AnalysisData > | data | ||
| ) |
set an analysisData with the given id.
| id | Id to design the given analysisData |
| data | AnalysisData to store. |
Definition at line 124 of file AnalysisContent.cpp.