LIMA
Libre Multilingual Analyzer — C++ API
Loading...
Searching...
No Matches
S2ByteString.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 24-SEP-2002
9//
10// Byte String
11// This class uses was made to build exemples of dictionary written
12// in XML
13
14#ifndef S2ByteString_H
15#define S2ByteString_H
16
17
18#include <wchar.h>
19
20namespace Lima {
21namespace Common {
22namespace Misc {
23
25
26public:
27 S2ByteString();
28 virtual ~S2ByteString();
29
30 // clears self
32
33 // redefine an existing S2ByteString
35
36 // return byte string pointer
37 const unsigned char* data() const;
38
39 // return length of self
40 int length() const;
41
42 // Adds the specified byte at the head/tail of self.
43 // Returns a reference to self.
44 S2ByteString& append (const unsigned char c);
45 S2ByteString& prepend (const unsigned char c);
46
47 // Adds the specified byte string at the head/tail of self.
48 // Returns a reference to self.
50 const unsigned char *c,
51 const uint64_t length);
53 const unsigned char *c,
54 const uint64_t length);
55
56 // Adds the specified string at the head/tail of self
57 // Returns a reference to self,
58 S2ByteString& append (const wchar_t* s);
59 S2ByteString& prepend (const wchar_t* s);
60
61protected:
62
63private:
64 unsigned char *_s; // pointer to data
65 uint64_t _len;
66
67};
68
69} // Misc
70} // Common
71} // Lima
72
73#endif
S2ByteString & prepend(const unsigned char c)
S2ByteString & operator=(const S2ByteString &)
const unsigned char * data() const
S2ByteString & append(const unsigned char c)
NAUTITIA.