1/* Inline Functions for options.{h,cc}.
2
3   Copyright (C) 1989-1998, 2000, 2002-2004, 2011 Free Software Foundation, Inc.
4   Written by Douglas C. Schmidt <schmidt@ics.uci.edu>
5   and Bruno Haible <bruno@clisp.org>.
6
7   This file is part of GNU GPERF.
8
9   This program is free software: you can redistribute it and/or modify
10   it under the terms of the GNU General Public License as published by
11   the Free Software Foundation; either version 3 of the License, or
12   (at your option) any later version.
13
14   This program is distributed in the hope that it will be useful,
15   but WITHOUT ANY WARRANTY; without even the implied warranty of
16   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17   GNU General Public License for more details.
18
19   You should have received a copy of the GNU General Public License
20   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
21
22/* ----------------------------- Class Options ----------------------------- */
23
24/* Tests a given boolean option.  Returns true if set, false otherwise.  */
25INLINE bool
26Options::operator[] (Option_Type option) const
27{
28  return _option_word & option;
29}
30
31/* Sets a given boolean option.  */
32INLINE void
33Options::set (Option_Type option)
34{
35  _option_word |= option;
36}
37
38/* Returns the input file name.  */
39INLINE const char *
40Options::get_input_file_name () const
41{
42  return _input_file_name;
43}
44
45/* Returns the output file name.  */
46INLINE const char *
47Options::get_output_file_name () const
48{
49  return _output_file_name;
50}
51
52/* Returns the jump value.  */
53INLINE int
54Options::get_jump () const
55{
56  return _jump;
57}
58
59/* Returns the initial associated character value.  */
60INLINE int
61Options::get_initial_asso_value () const
62{
63  return _initial_asso_value;
64}
65
66/* Returns the number of iterations for finding finding good asso_values.  */
67INLINE int
68Options::get_asso_iterations () const
69{
70  return _asso_iterations;
71}
72
73/* Returns the total number of switch statements to generate.  */
74INLINE int
75Options::get_total_switches () const
76{
77  return _total_switches;
78}
79
80/* Returns the factor by which to multiply the generated table's size.  */
81INLINE float
82Options::get_size_multiple () const
83{
84  return _size_multiple;
85}
86
87/* Returns the generated function name.  */
88INLINE const char *
89Options::get_function_name () const
90{
91  return _function_name;
92}
93
94/* Returns the keyword key name.  */
95INLINE const char *
96Options::get_slot_name () const
97{
98  return _slot_name;
99}
100
101/* Returns the struct initializer suffix.  */
102INLINE const char *
103Options::get_initializer_suffix () const
104{
105  return _initializer_suffix;
106}
107
108/* Returns the generated class name.  */
109INLINE const char *
110Options::get_class_name () const
111{
112  return _class_name;
113}
114
115/* Returns the hash function name.  */
116INLINE const char *
117Options::get_hash_name () const
118{
119  return _hash_name;
120}
121
122/* Returns the hash table array name.  */
123INLINE const char *
124Options::get_wordlist_name () const
125{
126  return _wordlist_name;
127}
128
129/* Returns the length table array name.  */
130INLINE const char *
131Options::get_lengthtable_name () const
132{
133  return _lengthtable_name;
134}
135
136/* Returns the string pool name.  */
137INLINE const char *
138Options::get_stringpool_name () const
139{
140  return _stringpool_name;
141}
142
143/* Returns the prefix for the constants.  */
144INLINE const char *
145Options::get_constants_prefix () const
146{
147  return _constants_prefix;
148}
149
150/* Returns the string used to delimit keywords from other attributes.  */
151INLINE const char *
152Options::get_delimiters () const
153{
154  return _delimiters;
155}
156
157/* Returns key positions.  */
158INLINE const Positions&
159Options::get_key_positions () const
160{
161  return _key_positions;
162}
163