LIMA
Libre Multilingual Analyzer — C++ API
Loading...
Searching...
No Matches
BinaryEntry.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 2-OCT-2002
9//
10// Binary memory explorer.
11// BinaryEntry is the base class of other dictionnary structure
12// management class (DictionaryEntry, LingInfoEntry, etc.)
13// BinaryEntry has methods to explore dictionary in memory.
14// Dictionary memory strcture is described in NAU2002.r2128 JYS
15
16#ifndef BinaryEntry_H
17#define BinaryEntry_H
18
19#include "DictionaryExport.h"
22
23namespace Lima {
24namespace LinguisticProcessing {
25namespace Dictionary {
26
28
29public:
32 virtual ~BinaryEntry();
33
34 BinaryEntry& operator=(const BinaryEntry& entry);
35
36 // gets the pointed encoded number (presented in big endian)
37 // advances pointer to point after the number
38 uint64_t getEncodedNumber(unsigned char*& ptr) const;
39
40 // gets the pointed encoded number (presented in big endian)
41 // pointer is not moved
42 uint64_t getEncodedNumberNoMove(unsigned char* ptr) const;
43
44 // gets the next number of specified number of bytes (presented in big endian)
45 // advances pointer to point after the number
46 uint64_t getNumber(unsigned char*& ptr, const uint64_t count) const;
47
48 // gets the next number of specified number of bytes (presented in big endian)
49 // pointer is not moved
50 uint64_t getNumberNoMove(unsigned char* ptr,const uint64_t count) const;
51
52 // gets the pointed dictionary string as a LimaString
53 // advances pointer to point after the string
54 Lima::LimaString getString(unsigned char*& ptr) const;
55
56 // gets the pointed dictionary string as a LimaString
57 // pointer is not moved
58 Lima::LimaString getStringNoMove(unsigned char* ptr) const;
59
60 // gets the pointed dictionary string as a LimaString
61 // advances pointer to point after the string
62 Lima::LimaString getUtf8String(unsigned char*& ptr) const;
63
64 // gets the pointed dictionary string as a LimaString
65 // pointer is not moved
66 Lima::LimaString getUtf8StringNoMove(unsigned char* ptr) const;
67
68 // advances pointer to the next dictionary field
69 unsigned char *nextField(unsigned char*& ptr) const;
70
71protected:
72
73private:
74 Lima::LimaString _dummyString;
75
76};
77
78} // closing namespace Dictionary
79} // closing namespace LinguisticProcessing
80} // closing namespace Lima
81
82#endif
#define LIMA_DICTIONARY_EXPORT
NAUTITIA.
QString LimaString
Definition LimaString.h:33