LIMA
Libre Multilingual Analyzer — C++ API
Loading...
Searching...
No Matches
LingInfoEntry.h
Go to the documentation of this file.
1// Copyright 2002-2013 CEA LIST
2// SPDX-FileCopyrightText: 2022 CEA LIST <gael.de-chalendar@cea.fr>
3//
4// SPDX-License-Identifier: MIT
5
6// NAUTITIA
7//
8// jys 1-OCT-2002
9//
10// LingInfoEntry is the way to access dictionary linguistic infos datas.
11// LingInfoEntry manages recurent calls to lists of linguistic properties..
12// Dictionaries in memory are specified in NA2002.r2128 JYS
13// Dictionaries iterators are specified in NA2002.r2129 JYS
14
15#ifndef LingInfoEntry_H
16#define LingInfoEntry_H
17
18#include "DictionaryExport.h"
22
23namespace Lima {
24namespace LinguisticProcessing {
25namespace Dictionary {
26
28{
29
30public:
34 const Lima::LimaString& key,
35 unsigned char *stringStartAddr,
36 unsigned char *lingPropertiesStartAddr,
37 unsigned char *startAddr);
38
39 // Destroys LingInfoEntry
40 virtual ~LingInfoEntry();
41
42 // Assignment operator. Copies the specified LingInfoEntry
43 // into self. Returns a reference to self.
44 // After assignment, internal iteration pointers of self are reset
45 LingInfoEntry& operator=(const LingInfoEntry&);
46
47 // Reset iteration pointer
48 LingInfoEntry& reset();
49
50 // Returns true if self is empty
51 bool isEmpty() const;
52
53 // Returns lemma string
54 // If self is empty, EmptyEntryException is raised
55 Lima::LimaString lemma() const;
56
57 // Returns normalized string
58 // If self is empty, EmptyEntryException is raised
59 Lima::LimaString normalized() const;
60
61 // Gets the next LingPropertyEntry if exists
62 // This call "increments" the internal LingPropertyEntry pointer.
63 // If there is no LingPropertyEntry anymore, an empty LingPropertyEntry is returned
64 // If self is empty, EmptyEntryException is raised
65 LingPropertyEntry nextLingProperty();
66
67protected:
68
69private:
70 Lima::LimaString m_key;
71 unsigned char *m_stringStartAddr;
72 unsigned char *m_lingPropertiesStartAddr;
73 unsigned char *m_startAddr;
74 unsigned char *m_endAddr;
75 unsigned char *m_lingProperty;
76 unsigned char *m_endLingProperty;
77
78};
79
80} // closing namespace Dictionary
81} // closing namespace LinguisticProcessing
82} // closing namespace Lima
83
84#endif
#define LIMA_DICTIONARY_EXPORT
LingInfoEntry(const Lima::LimaString &key, unsigned char *stringStartAddr, unsigned char *lingPropertiesStartAddr, unsigned char *startAddr)
NAUTITIA.
QString LimaString
Definition LimaString.h:33