LIMA
Libre Multilingual Analyzer — C++ API
Loading...
Searching...
No Matches
PropertyCodeManager.h
Go to the documentation of this file.
1// Copyright 2002-2020 CEA LIST
2// SPDX-FileCopyrightText: 2022 CEA LIST <gael.de-chalendar@cea.fr>
3//
4// SPDX-License-Identifier: MIT
5
6/***************************************************************************
7 * Copyright (C) 2004 by CEA LIST *
8 * *
9 ***************************************************************************/
10
11#ifndef LIMA_COMMON_PROPERTYCODE_PROPERTYCODEMANAGER_H
12#define LIMA_COMMON_PROPERTYCODE_PROPERTYCODEMANAGER_H
13
15#include "PropertyManager.h"
16
17#include <memory>
18#include <set>
19
20namespace Lima
21{
22namespace Common
23{
24namespace PropertyCode
25{
26
34{
36
37public:
38
44
46
49
56 void readFromXmlFile(const std::string& filename);
57
64 const std::string& propertyName) const;
65
72 const std::string& propertyName) const;
73
79 const std::shared_ptr<PropertyAccessor> getPropertySetAccessor(
80 const std::set<std::string>& propertyNames) const;
81
86 const std::map<std::string,PropertyManager>& getPropertyManagers() const;
87
96 LinguisticCode encode(const std::map<std::string,std::string>& propValues) const;
97
115 void convertSymbolicCodes(const std::string& symbolicCodeFile,
116 std::map<std::string,LinguisticCode>& conversionTable) const;
117
118private:
119 std::unique_ptr<PropertyCodeManagerPrivate> m_d;
120};
121
122} // PropertyCode
123} // Common
124} // Lima
125
126
127#endif
#define LIMA_PROPERTYCODE_EXPORT
Provide function to read write and check a property.
const std::shared_ptr< PropertyAccessor > getPropertySetAccessor(const std::set< std::string > &propertyNames) const
Get a PropertyAccessor associated to several properties.
void convertSymbolicCodes(const std::string &symbolicCodeFile, std::map< std::string, LinguisticCode > &conversionTable) const
Compute conversion of symbolic codes into linguisticCode and append them into the given map.
const std::map< std::string, PropertyManager > & getPropertyManagers() const
Get the map of all PropertyManagers.
const PropertyManager & getPropertyManager(const std::string &propertyName) const
Get the PropertyManager associated to a property.
void readFromXmlFile(const std::string &filename)
This functions should be called once, just after creation.
PropertyCodeManager & operator=(const PropertyCodeManager &)
const PropertyAccessor & getPropertyAccessor(const std::string &propertyName) const
Get the PropertyAccessor associated to a property.
LinguisticCode encode(const std::map< std::string, std::string > &propValues) const
Compute the code corresponding to given the properties/values.
Provide tools to manage a specific property.
NAUTITIA.