]> CyberLeo.Net >> Repos - FreeBSD/releng/10.0.git/blob - contrib/gperf/src/options.icc
- Copy stable/10 (r259064) to releng/10.0 as part of the
[FreeBSD/releng/10.0.git] / contrib / gperf / src / options.icc
1 /* Inline Functions for options.{h,cc}.
2
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>.
6
7    This file is part of GNU GPERF.
8
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)
12    any later version.
13
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.
18
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.  */
23
24 /* ----------------------------- Class Options ----------------------------- */
25
26 /* Tests a given boolean option.  Returns true if set, false otherwise.  */
27 INLINE bool
28 Options::operator[] (Option_Type option) const
29 {
30   return _option_word & option;
31 }
32
33 /* Sets a given boolean option.  */
34 INLINE void
35 Options::set (Option_Type option)
36 {
37   _option_word |= option;
38 }
39
40 /* Returns the input file name.  */
41 INLINE const char *
42 Options::get_input_file_name () const
43 {
44   return _input_file_name;
45 }
46
47 /* Returns the output file name.  */
48 INLINE const char *
49 Options::get_output_file_name () const
50 {
51   return _output_file_name;
52 }
53
54 /* Returns the jump value.  */
55 INLINE int
56 Options::get_jump () const
57 {
58   return _jump;
59 }
60
61 /* Returns the initial associated character value.  */
62 INLINE int
63 Options::get_initial_asso_value () const
64 {
65   return _initial_asso_value;
66 }
67
68 /* Returns the number of iterations for finding finding good asso_values.  */
69 INLINE int
70 Options::get_asso_iterations () const
71 {
72   return _asso_iterations;
73 }
74
75 /* Returns the total number of switch statements to generate.  */
76 INLINE int
77 Options::get_total_switches () const
78 {
79   return _total_switches;
80 }
81
82 /* Returns the factor by which to multiply the generated table's size.  */
83 INLINE float
84 Options::get_size_multiple () const
85 {
86   return _size_multiple;
87 }
88
89 /* Returns the generated function name.  */
90 INLINE const char *
91 Options::get_function_name () const
92 {
93   return _function_name;
94 }
95
96 /* Returns the keyword key name.  */
97 INLINE const char *
98 Options::get_slot_name () const
99 {
100   return _slot_name;
101 }
102
103 /* Returns the struct initializer suffix.  */
104 INLINE const char *
105 Options::get_initializer_suffix () const
106 {
107   return _initializer_suffix;
108 }
109
110 /* Returns the generated class name.  */
111 INLINE const char *
112 Options::get_class_name () const
113 {
114   return _class_name;
115 }
116
117 /* Returns the hash function name.  */
118 INLINE const char *
119 Options::get_hash_name () const
120 {
121   return _hash_name;
122 }
123
124 /* Returns the hash table array name.  */
125 INLINE const char *
126 Options::get_wordlist_name () const
127 {
128   return _wordlist_name;
129 }
130
131 /* Returns the length table array name.  */
132 INLINE const char *
133 Options::get_lengthtable_name () const
134 {
135   return _lengthtable_name;
136 }
137
138 /* Returns the string pool name.  */
139 INLINE const char *
140 Options::get_stringpool_name () const
141 {
142   return _stringpool_name;
143 }
144
145 /* Returns the string used to delimit keywords from other attributes.  */
146 INLINE const char *
147 Options::get_delimiters () const
148 {
149   return _delimiters;
150 }
151
152 /* Returns key positions.  */
153 INLINE const Positions&
154 Options::get_key_positions () const
155 {
156   return _key_positions;
157 }