options.icc revision 228060
158551Skris/* Inline Functions for options.{h,cc}. 258551Skris 3228060Sbapt Copyright (C) 1989-1998, 2000, 2002-2004 Free Software Foundation, Inc. 4228060Sbapt Written by Douglas C. Schmidt <schmidt@ics.uci.edu> 5228060Sbapt and Bruno Haible <bruno@clisp.org>. 658551Skris 7228060Sbapt This file is part of GNU GPERF. 858551Skris 9228060Sbapt GNU GPERF is free software; you can redistribute it and/or modify 10228060Sbapt it under the terms of the GNU General Public License as published by 11228060Sbapt the Free Software Foundation; either version 2, or (at your option) 12228060Sbapt any later version. 1358551Skris 14228060Sbapt GNU GPERF is distributed in the hope that it will be useful, 15228060Sbapt but WITHOUT ANY WARRANTY; without even the implied warranty of 16228060Sbapt MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17228060Sbapt GNU General Public License for more details. 1858551Skris 19228060Sbapt You should have received a copy of the GNU General Public License 20228060Sbapt along with this program; see the file COPYING. 21228060Sbapt If not, write to the Free Software Foundation, Inc., 22228060Sbapt 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ 2358551Skris 24228060Sbapt/* ----------------------------- Class Options ----------------------------- */ 2558551Skris 26228060Sbapt/* Tests a given boolean option. Returns true if set, false otherwise. */ 27228060SbaptINLINE bool 28228060SbaptOptions::operator[] (Option_Type option) const 2958551Skris{ 30228060Sbapt return _option_word & option; 3158551Skris} 3258551Skris 33228060Sbapt/* Sets a given boolean option. */ 3458551SkrisINLINE void 35228060SbaptOptions::set (Option_Type option) 3658551Skris{ 37228060Sbapt _option_word |= option; 3858551Skris} 3958551Skris 40228060Sbapt/* Returns the input file name. */ 41228060SbaptINLINE const char * 42228060SbaptOptions::get_input_file_name () const 4358551Skris{ 44228060Sbapt return _input_file_name; 4558551Skris} 4658551Skris 47228060Sbapt/* Returns the output file name. */ 48228060SbaptINLINE const char * 49228060SbaptOptions::get_output_file_name () const 5058551Skris{ 51228060Sbapt return _output_file_name; 5258551Skris} 5358551Skris 54228060Sbapt/* Returns the jump value. */ 5558551SkrisINLINE int 56228060SbaptOptions::get_jump () const 5758551Skris{ 58228060Sbapt return _jump; 5958551Skris} 6058551Skris 61228060Sbapt/* Returns the initial associated character value. */ 62228060SbaptINLINE int 63228060SbaptOptions::get_initial_asso_value () const 6458551Skris{ 65228060Sbapt return _initial_asso_value; 6658551Skris} 6758551Skris 68228060Sbapt/* Returns the number of iterations for finding finding good asso_values. */ 6958551SkrisINLINE int 70228060SbaptOptions::get_asso_iterations () const 7158551Skris{ 72228060Sbapt return _asso_iterations; 7358551Skris} 7458551Skris 75228060Sbapt/* Returns the total number of switch statements to generate. */ 7658551SkrisINLINE int 77228060SbaptOptions::get_total_switches () const 7858551Skris{ 79228060Sbapt return _total_switches; 8058551Skris} 8158551Skris 82228060Sbapt/* Returns the factor by which to multiply the generated table's size. */ 83228060SbaptINLINE float 84228060SbaptOptions::get_size_multiple () const 8558551Skris{ 86228060Sbapt return _size_multiple; 8758551Skris} 8858551Skris 89228060Sbapt/* Returns the generated function name. */ 90228060SbaptINLINE const char * 91228060SbaptOptions::get_function_name () const 9258551Skris{ 93228060Sbapt return _function_name; 9458551Skris} 9558551Skris 96228060Sbapt/* Returns the keyword key name. */ 9758551SkrisINLINE const char * 98228060SbaptOptions::get_slot_name () const 9958551Skris{ 100228060Sbapt return _slot_name; 10158551Skris} 10258551Skris 103228060Sbapt/* Returns the struct initializer suffix. */ 10458551SkrisINLINE const char * 105228060SbaptOptions::get_initializer_suffix () const 10658551Skris{ 107228060Sbapt return _initializer_suffix; 10858551Skris} 10958551Skris 110228060Sbapt/* Returns the generated class name. */ 11167064SobrienINLINE const char * 112228060SbaptOptions::get_class_name () const 11367064Sobrien{ 114228060Sbapt return _class_name; 11567064Sobrien} 11667064Sobrien 117228060Sbapt/* Returns the hash function name. */ 11858551SkrisINLINE const char * 119228060SbaptOptions::get_hash_name () const 12058551Skris{ 121228060Sbapt return _hash_name; 12258551Skris} 12358551Skris 124228060Sbapt/* Returns the hash table array name. */ 12558551SkrisINLINE const char * 126228060SbaptOptions::get_wordlist_name () const 12758551Skris{ 128228060Sbapt return _wordlist_name; 12958551Skris} 13058551Skris 131228060Sbapt/* Returns the length table array name. */ 13258551SkrisINLINE const char * 133228060SbaptOptions::get_lengthtable_name () const 13458551Skris{ 135228060Sbapt return _lengthtable_name; 13658551Skris} 13758551Skris 138228060Sbapt/* Returns the string pool name. */ 139228060SbaptINLINE const char * 140228060SbaptOptions::get_stringpool_name () const 14158551Skris{ 142228060Sbapt return _stringpool_name; 14358551Skris} 14458551Skris 145228060Sbapt/* Returns the string used to delimit keywords from other attributes. */ 14658551SkrisINLINE const char * 147228060SbaptOptions::get_delimiters () const 14858551Skris{ 149228060Sbapt return _delimiters; 15058551Skris} 15158551Skris 152228060Sbapt/* Returns key positions. */ 153228060SbaptINLINE const Positions& 154228060SbaptOptions::get_key_positions () const 15558551Skris{ 156228060Sbapt return _key_positions; 15758551Skris} 158