|
1 // Copyright 2013 Google Inc. All Rights Reserved. |
|
2 // |
|
3 // Licensed under the Apache License, Version 2.0 (the "License"); |
|
4 // you may not use this file except in compliance with the License. |
|
5 // You may obtain a copy of the License at |
|
6 // |
|
7 // http://www.apache.org/licenses/LICENSE-2.0 |
|
8 // |
|
9 // Unless required by applicable law or agreed to in writing, software |
|
10 // distributed under the License is distributed on an "AS IS" BASIS, |
|
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
12 // See the License for the specific language governing permissions and |
|
13 // limitations under the License. |
|
14 |
|
15 // |
|
16 // Author: dsites@google.com (Dick Sites) |
|
17 // |
|
18 |
|
19 |
|
20 #ifndef I18N_ENCODINGS_CLD2_INTERNAL_LANGSPAN_H_ |
|
21 #define I18N_ENCODINGS_CLD2_INTERNAL_LANGSPAN_H_ |
|
22 |
|
23 #include "generated_language.h" |
|
24 #include "generated_ulscript.h" |
|
25 |
|
26 namespace CLD2 { |
|
27 |
|
28 typedef struct { |
|
29 char* text; // Pointer to the span, somewhere |
|
30 int text_bytes; // Number of bytes of text in the span |
|
31 int offset; // Offset of start of span in original input buffer |
|
32 ULScript ulscript; // Unicode Letters Script of this span |
|
33 Language lang; // Language identified for this span |
|
34 bool truncated; // true if buffer filled up before a |
|
35 // different script or EOF was found |
|
36 } LangSpan; |
|
37 |
|
38 } // namespace CLD2 |
|
39 #endif // I18N_ENCODINGS_CLD2_INTERNAL_LANGSPAN_H_ |
|
40 |