LIMA
Libre Multilingual Analyzer — C++ API
Loading...
Searching...
No Matches
Lima::Common::PropertyCode::PropertyManager Class Reference

Provide tools to manage a specific property. More...

#include <linguisticProcessing/common/PropertyCode/PropertyManager.h>

Public Member Functions

 PropertyManager (const std::string &name, const LinguisticCode &mask, const LinguisticCode &emptyNessMask, const std::map< std::string, LinguisticCode > symbol2code)
 constructor
 
 ~PropertyManager ()
 
 PropertyManager (const PropertyManager &)
 
PropertyManager & operator= (const PropertyManager &)
 
const PropertyAccessor & getPropertyAccessor () const
 give the corresponding PropertyAccessor
 
LinguisticCode getMask () const
 Get the property mask.
 
LinguisticCode getEmptyNessMask () const
 The emptyNessMask is the mask use to check if property is empty.
 
LinguisticCode getPropertyValue (const std::string &symbolicValue) const
 Get the coded property value from the symbolic value.
 
const std::string & getPropertySymbolicValue (const LinguisticCode &value) const
 The coded property value can hold several property data.
 
const std::map< LinguisticCode, std::string > & getCode2Symbol () const
 Get the Code -> Symbol mapping.
 
const std::map< std::string, LinguisticCode > & getSymbol2Code () const
 Get the Symbol -> Code mapping.
 
size_t getNbValues () const
 give the number of values for this property
 

Friends

class PropertyManagerPrivate
 

Detailed Description

Provide tools to manage a specific property.

The PropertyManager provide the PropertyAccessor for read/write operation. It also offers convertion function from symbolic values to numeric values.

Holds data about coding of a specific Property

Author
Benoit Mathieu

Definition at line 33 of file PropertyManager.h.

Constructor & Destructor Documentation

◆ PropertyManager() [1/2]

Lima::Common::PropertyCode::PropertyManager::PropertyManager ( const std::string &  name,
const LinguisticCode &  mask,
const LinguisticCode &  emptyNessMask,
const std::map< std::string, LinguisticCode >  symbol2code 
)

constructor

Parameters
nameName of the property
maskMask of the property
emptyMaskMask for emptyness of the property
symbol2codeMapping from symbolicValues to values for this properties

Definition at line 96 of file PropertyManager.cpp.

◆ ~PropertyManager()

Lima::Common::PropertyCode::PropertyManager::~PropertyManager ( )

Definition at line 104 of file PropertyManager.cpp.

◆ PropertyManager() [2/2]

Lima::Common::PropertyCode::PropertyManager::PropertyManager ( const PropertyManager &  pm)

Definition at line 108 of file PropertyManager.cpp.

Member Function Documentation

◆ getCode2Symbol()

const std::map< LinguisticCode, std::string > & Lima::Common::PropertyCode::PropertyManager::getCode2Symbol ( ) const

Get the Code -> Symbol mapping.

Returns
code2symbol map

Definition at line 163 of file PropertyManager.cpp.

◆ getEmptyNessMask()

LinguisticCode Lima::Common::PropertyCode::PropertyManager::getEmptyNessMask ( ) const

The emptyNessMask is the mask use to check if property is empty.

In the case of a 'property', emptyNessMask and mask are the same. But in the case of a 'subproperty', emptyNessMask is the part of the mask used to code the subproperty itself, so the mask is the union of emptyNessMask and parent property mask.

Get the property emptyness mask

Returns
uint64_t

Definition at line 158 of file PropertyManager.cpp.

◆ getMask()

LinguisticCode Lima::Common::PropertyCode::PropertyManager::getMask ( ) const

Get the property mask.

Returns
uint64_t

Definition at line 153 of file PropertyManager.cpp.

◆ getNbValues()

size_t Lima::Common::PropertyCode::PropertyManager::getNbValues ( ) const

give the number of values for this property

Returns
the number of values

Definition at line 173 of file PropertyManager.cpp.

◆ getPropertyAccessor()

const PropertyAccessor & Lima::Common::PropertyCode::PropertyManager::getPropertyAccessor ( ) const

give the corresponding PropertyAccessor

Returns
PropertyAccessor

Definition at line 120 of file PropertyManager.cpp.

◆ getPropertySymbolicValue()

const std::string & Lima::Common::PropertyCode::PropertyManager::getPropertySymbolicValue ( const LinguisticCode &  value) const

The coded property value can hold several property data.

Get the symbolic value for a coded property value

Parameters
valuecoded property value. This coded value can code several properties.
Returns
symbolic value for this property

Definition at line 138 of file PropertyManager.cpp.

◆ getPropertyValue()

LinguisticCode Lima::Common::PropertyCode::PropertyManager::getPropertyValue ( const std::string &  symbolicValue) const

Get the coded property value from the symbolic value.

Parameters
symbolicValuesymbolic value
Returns
coded value

Definition at line 125 of file PropertyManager.cpp.

◆ getSymbol2Code()

const std::map< std::string, LinguisticCode > & Lima::Common::PropertyCode::PropertyManager::getSymbol2Code ( ) const

Get the Symbol -> Code mapping.

Returns
symbol2code map

Definition at line 168 of file PropertyManager.cpp.

◆ operator=()

PropertyManager & Lima::Common::PropertyCode::PropertyManager::operator= ( const PropertyManager &  pm)

Definition at line 113 of file PropertyManager.cpp.

Friends And Related Symbol Documentation

◆ PropertyManagerPrivate

friend class PropertyManagerPrivate
friend

Definition at line 35 of file PropertyManager.h.


The documentation for this class was generated from the following files: