root / branches / v05 / libraries / libjni-ecwcompress / include / include-sdk / CNCSMultiSZ.h @ 38532
History | View | Annotate | Download (1.75 KB)
1 | 3538 | nacho | /********************************************************
|
---|---|---|---|
2 | ** Copyright 2000 Earth Resource Mapping Ltd.
|
||
3 | ** This document contains proprietary source code of
|
||
4 | ** Earth Resource Mapping Ltd, and can only be used under
|
||
5 | ** one of the three licenses as described in the
|
||
6 | ** license.txt file supplied with this distribution.
|
||
7 | ** See separate license.txt file for license details
|
||
8 | ** and conditions.
|
||
9 | **
|
||
10 | ** This software is covered by US patent #6,442,298,
|
||
11 | ** #6,102,897 and #6,633,688. Rights to use these patents
|
||
12 | ** is included in the license agreements.
|
||
13 | **
|
||
14 | ** FILE: NCSUtil\CNCSMultiSZ.h
|
||
15 | ** CREATED: 10Apr00
|
||
16 | ** AUTHOR: Nicholas Yue
|
||
17 | ** PURPOSE: MultiSZ string manipulation code
|
||
18 | ** EDITS:
|
||
19 | ** 01 ny 05May00 Added overridden get() function to
|
||
20 | ** retrieve a specific line of text in
|
||
21 | ** the MULTI_SZ
|
||
22 | *******************************************************/
|
||
23 | |||
24 | #ifndef CNCSMULTISZ_H
|
||
25 | #define CNCSMULTISZ_H
|
||
26 | |||
27 | #include <wchar.h> |
||
28 | #include "NCSDefs.h" |
||
29 | |||
30 | const int MAX_MSZ_NUM_LINE = 256; |
||
31 | const int MAX_MSZ_LINE_LENGTH = 1024; |
||
32 | |||
33 | class NCS_EXPORT CNCSMultiSZ { |
||
34 | public : |
||
35 | CNCSMultiSZ(); |
||
36 | ~CNCSMultiSZ(); |
||
37 | void print();
|
||
38 | int strstr(char *entryName); |
||
39 | size_t mszlength(); |
||
40 | void assign(unsigned char *chBuffer); |
||
41 | void get(unsigned char *ptr); |
||
42 | BOOLEAN get(int index, wchar_t *ptr); /**[01]**/ |
||
43 | void append(char *newEntryName); |
||
44 | void replace(char *newEntryName,int index); |
||
45 | void remove(int entryIndex); |
||
46 | protected : |
||
47 | void assemble();
|
||
48 | void disassemble(unsigned char *chBuffer); |
||
49 | private : |
||
50 | char szApps[MAX_MSZ_NUM_LINE][MAX_MSZ_LINE_LENGTH];
|
||
51 | wchar_t wcApps[MAX_MSZ_NUM_LINE][MAX_MSZ_LINE_LENGTH]; |
||
52 | int wcLineCount;
|
||
53 | unsigned char new_chBuffer[1024]; |
||
54 | unsigned char input_multiSZBuffer[2048]; |
||
55 | unsigned char output_multiSZBuffer[2048]; |
||
56 | size_t szlength(unsigned char *chBuffer); |
||
57 | }; |
||
58 | |||
59 | #endif |