![]() |
LIMA
Libre Multilingual Analyzer — C++ API
|
Provide function to read write and check a property. More...
#include <linguisticProcessing/common/PropertyCode/PropertyAccessor.h>
Public Member Functions | |
| PropertyAccessor (const std::string &name, const LinguisticCode &mask, const LinguisticCode &emptyNessMask) | |
| Constructor. | |
| ~PropertyAccessor () | |
| PropertyAccessor (const PropertyAccessor &) | |
| PropertyAccessor & | operator= (const PropertyAccessor &) |
| const std::string & | getPropertyName () const |
| Get the property name. | |
| LinguisticCode | readValue (const LinguisticCode &code) const |
| read a property in a coded int. | |
| void | writeValue (const LinguisticCode &value, LinguisticCode &code) const |
| write a property value in a coded int. | |
| bool | equal (const LinguisticCode &l1, const LinguisticCode &l2) const |
| check property equality for two linguisticCode | |
| bool | empty (const LinguisticCode &l) const |
| Test if the given code has property data. | |
Friends | |
| class | PropertyAccessorPrivate |
Provide function to read write and check a property.
Class that provide read/write methods for a property
Definition at line 30 of file PropertyAccessor.h.
| Lima::Common::PropertyCode::PropertyAccessor::PropertyAccessor | ( | const std::string & | name, |
| const LinguisticCode & | mask, | ||
| const LinguisticCode & | emptyNessMask | ||
| ) |
Constructor.
| name | property name |
| mask | property mask |
| mask | mask use to test emptyNess of property. Different from mask \ only for subproperties. |
Definition at line 73 of file PropertyAccessor.cpp.
| Lima::Common::PropertyCode::PropertyAccessor::~PropertyAccessor | ( | ) |
Definition at line 80 of file PropertyAccessor.cpp.
| Lima::Common::PropertyCode::PropertyAccessor::PropertyAccessor | ( | const PropertyAccessor & | pa | ) |
Definition at line 86 of file PropertyAccessor.cpp.
| bool Lima::Common::PropertyCode::PropertyAccessor::empty | ( | const LinguisticCode & | l | ) | const |
Test if the given code has property data.
In the case of a simple property, property is empty if equal to 0. In the case of a subproperty, the subproperty can be empty and have a non null value, if the parent property is non null.
return true if the given code has an empty property
| l |
Definition at line 130 of file PropertyAccessor.cpp.
| bool Lima::Common::PropertyCode::PropertyAccessor::equal | ( | const LinguisticCode & | l1, |
| const LinguisticCode & | l2 | ||
| ) | const |
check property equality for two linguisticCode
| l1 | |
| l2 |
Definition at line 123 of file PropertyAccessor.cpp.
| const std::string & Lima::Common::PropertyCode::PropertyAccessor::getPropertyName | ( | ) | const |
| PropertyAccessor & Lima::Common::PropertyCode::PropertyAccessor::operator= | ( | const PropertyAccessor & | pa | ) |
Definition at line 91 of file PropertyAccessor.cpp.
| LinguisticCode Lima::Common::PropertyCode::PropertyAccessor::readValue | ( | const LinguisticCode & | code | ) | const |
read a property in a coded int.
This function extract the coded value of a property, which allows to perform comparison.
| code | coded int from which to read the property |
Definition at line 105 of file PropertyAccessor.cpp.
| void Lima::Common::PropertyCode::PropertyAccessor::writeValue | ( | const LinguisticCode & | value, |
| LinguisticCode & | code | ||
| ) | const |
write a property value in a coded int.
This function writes the given coded property value in the given coded int, overriding previous value of the property.
| value | coded property value to write. This value can hold several property data. |
| code | coded int to write to. |
Definition at line 115 of file PropertyAccessor.cpp.
|
friend |
Definition at line 32 of file PropertyAccessor.h.