Debian Codegraph @

Source/ShConstants.h

raw
1 /*
2 * ShConstants.h
3 *
4 * This file is a part of NSIS.
5 *
6 * Copyright (C) 2003 Ramon
7 * Copyright (C) 2003-2026 NSIS Contributors
8 *
9 * Licensed under the zlib/libpng license (the "License");
10 * you may not use this file except in compliance with the License.
11 *
12 * Licence details can be found in the file COPYING.
13 *
14 * This software is provided 'as-is', without any express or implied
15 * warranty.
16 *
17 * Unicode support by Jim Park -- 08/24/2007
18 */
19
20 #ifndef ___CONSTANTS___H_____
21 #define ___CONSTANTS___H_____
22
23 #include "strlist.h"
24
25 struct constantstring {
26 int name;
27 int index;
28 int pos;
29 int value1;
30 int value2;
31 };
32
33 class ConstantsStringList : public SortedStringListND<struct constantstring>
34 {
35 public:
36 ConstantsStringList();
37
38 int add(const TCHAR *name, int value1, int value2);
39 int get(const TCHAR *name, int n_chars = -1);
40 int getnum();
41 int get_value1(int idx);
42 int get_value2(int idx);
43 TCHAR *idx2name(int idx);
44 bool set_values(const TCHAR *name, int val1, int val2);
45
46 private:
47 int m_index;
48 int get_internal_idx(int idx);
49 };
50
51 #endif