1 /* Inline Functions for options.{h,cc}.
3 Copyright (C) 1989-1998, 2000, 2002-2004 Free Software Foundation, Inc.
4 Written by Douglas C. Schmidt <schmidt@ics.uci.edu>
5 and Bruno Haible <bruno@clisp.org>.
7 This file is part of GNU GPERF.
9 GNU GPERF 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 2, or (at your option)
14 GNU GPERF 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.
19 You should have received a copy of the GNU General Public License
20 along with this program; see the file COPYING.
21 If not, write to the Free Software Foundation, Inc.,
22 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
24 /* ----------------------------- Class Options ----------------------------- */
26 /* Tests a given boolean option. Returns true if set, false otherwise. */
28 Options::operator[] (Option_Type option) const
30 return _option_word & option;
33 /* Sets a given boolean option. */
35 Options::set (Option_Type option)
37 _option_word |= option;
40 /* Returns the input file name. */
42 Options::get_input_file_name () const
44 return _input_file_name;
47 /* Returns the output file name. */
49 Options::get_output_file_name () const
51 return _output_file_name;
54 /* Returns the jump value. */
56 Options::get_jump () const
61 /* Returns the initial associated character value. */
63 Options::get_initial_asso_value () const
65 return _initial_asso_value;
68 /* Returns the number of iterations for finding finding good asso_values. */
70 Options::get_asso_iterations () const
72 return _asso_iterations;
75 /* Returns the total number of switch statements to generate. */
77 Options::get_total_switches () const
79 return _total_switches;
82 /* Returns the factor by which to multiply the generated table's size. */
84 Options::get_size_multiple () const
86 return _size_multiple;
89 /* Returns the generated function name. */
91 Options::get_function_name () const
93 return _function_name;
96 /* Returns the keyword key name. */
98 Options::get_slot_name () const
103 /* Returns the struct initializer suffix. */
105 Options::get_initializer_suffix () const
107 return _initializer_suffix;
110 /* Returns the generated class name. */
112 Options::get_class_name () const
117 /* Returns the hash function name. */
119 Options::get_hash_name () const
124 /* Returns the hash table array name. */
126 Options::get_wordlist_name () const
128 return _wordlist_name;
131 /* Returns the length table array name. */
133 Options::get_lengthtable_name () const
135 return _lengthtable_name;
138 /* Returns the string pool name. */
140 Options::get_stringpool_name () const
142 return _stringpool_name;
145 /* Returns the string used to delimit keywords from other attributes. */
147 Options::get_delimiters () const
152 /* Returns key positions. */
153 INLINE const Positions&
154 Options::get_key_positions () const
156 return _key_positions;