options.icc revision 228060
150477Speter/* Inline Functions for options.{h,cc}. 250120Swpaul 370711Sobrien Copyright (C) 1989-1998, 2000, 2002-2004 Free Software Foundation, Inc. 450120Swpaul Written by Douglas C. Schmidt <schmidt@ics.uci.edu> 570711Sobrien and Bruno Haible <bruno@clisp.org>. 6190558Simp 7190558Simp This file is part of GNU GPERF. 8179336Syongari 9175701Smarius GNU GPERF is free software; you can redistribute it and/or modify 10175702Smarius it under the terms of the GNU General Public License as published by 11179895Sdelphij the Free Software Foundation; either version 2, or (at your option) 12179895Sdelphij any later version. 13175701Smarius 1470711Sobrien GNU GPERF is distributed in the hope that it will be useful, 15213878Smarius but WITHOUT ANY WARRANTY; without even the implied warranty of 16213878Smarius MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17175701Smarius GNU General Public License for more details. 18175701Smarius 1989244Smsmith You should have received a copy of the GNU General Public License 20175701Smarius along with this program; see the file COPYING. 2189244Smsmith If not, write to the Free Software Foundation, Inc., 2260966Speter 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. */ 27INLINE bool 28Options::operator[] (Option_Type option) const 29{ 30 return _option_word & option; 31} 32 33/* Sets a given boolean option. */ 34INLINE void 35Options::set (Option_Type option) 36{ 37 _option_word |= option; 38} 39 40/* Returns the input file name. */ 41INLINE const char * 42Options::get_input_file_name () const 43{ 44 return _input_file_name; 45} 46 47/* Returns the output file name. */ 48INLINE const char * 49Options::get_output_file_name () const 50{ 51 return _output_file_name; 52} 53 54/* Returns the jump value. */ 55INLINE int 56Options::get_jump () const 57{ 58 return _jump; 59} 60 61/* Returns the initial associated character value. */ 62INLINE int 63Options::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. */ 69INLINE int 70Options::get_asso_iterations () const 71{ 72 return _asso_iterations; 73} 74 75/* Returns the total number of switch statements to generate. */ 76INLINE int 77Options::get_total_switches () const 78{ 79 return _total_switches; 80} 81 82/* Returns the factor by which to multiply the generated table's size. */ 83INLINE float 84Options::get_size_multiple () const 85{ 86 return _size_multiple; 87} 88 89/* Returns the generated function name. */ 90INLINE const char * 91Options::get_function_name () const 92{ 93 return _function_name; 94} 95 96/* Returns the keyword key name. */ 97INLINE const char * 98Options::get_slot_name () const 99{ 100 return _slot_name; 101} 102 103/* Returns the struct initializer suffix. */ 104INLINE const char * 105Options::get_initializer_suffix () const 106{ 107 return _initializer_suffix; 108} 109 110/* Returns the generated class name. */ 111INLINE const char * 112Options::get_class_name () const 113{ 114 return _class_name; 115} 116 117/* Returns the hash function name. */ 118INLINE const char * 119Options::get_hash_name () const 120{ 121 return _hash_name; 122} 123 124/* Returns the hash table array name. */ 125INLINE const char * 126Options::get_wordlist_name () const 127{ 128 return _wordlist_name; 129} 130 131/* Returns the length table array name. */ 132INLINE const char * 133Options::get_lengthtable_name () const 134{ 135 return _lengthtable_name; 136} 137 138/* Returns the string pool name. */ 139INLINE const char * 140Options::get_stringpool_name () const 141{ 142 return _stringpool_name; 143} 144 145/* Returns the string used to delimit keywords from other attributes. */ 146INLINE const char * 147Options::get_delimiters () const 148{ 149 return _delimiters; 150} 151 152/* Returns key positions. */ 153INLINE const Positions& 154Options::get_key_positions () const 155{ 156 return _key_positions; 157} 158