1
0
mirror of https://git.savannah.gnu.org/git/gperf.git synced 2025-12-02 21:19:24 +00:00
Files
gperf/src/options.icc
2002-11-09 01:12:49 +00:00

161 lines
3.1 KiB
Plaintext

/* Inline Functions for options.{h,cc}.
Copyright (C) 1989-1998, 2000, 2002 Free Software Foundation, Inc.
written by Douglas C. Schmidt (schmidt@ics.uci.edu)
This file is part of GNU GPERF.
GNU GPERF is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 1, or (at your option)
any later version.
GNU GPERF is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU GPERF; see the file COPYING. If not, write to the Free
Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111, USA. */
/* TRUE if option enable, else FALSE. */
INLINE int
Options::operator[] (Option_Type option)
{
return _option_word & option;
}
/* Enables option OPT. */
INLINE void
Options::operator = (enum Option_Type opt)
{
_option_word |= opt;
}
/* Disables option OPT. */
INLINE void
Options::operator != (enum Option_Type opt)
{
_option_word &= ~opt;
}
/* Initializes the key Iterator. */
INLINE void
Options::reset ()
{
_key_pos = 0;
}
/* Returns current key_position and advance index. */
INLINE int
Options::get ()
{
return _key_positions[_key_pos++];
}
/* Sets the size of the table size. */
INLINE void
Options::set_asso_max (int r)
{
_size = r;
}
/* Returns the size of the table size. */
INLINE int
Options::get_asso_max ()
{
return _size;
}
/* Returns total distinct key positions. */
INLINE int
Options::get_max_keysig_size ()
{
return _total_keysig_size;
}
/* Sets total distinct key positions. */
INLINE void
Options::set_keysig_size (int size)
{
_total_keysig_size = size;
}
/* Returns the jump value. */
INLINE int
Options::get_jump ()
{
return _jump;
}
/* Returns the generated function name. */
INLINE const char *
Options::get_function_name ()
{
return _function_name;
}
/* Returns the keyword key name. */
INLINE const char *
Options::get_key_name ()
{
return _key_name;
}
/* Returns the struct initializer suffix. */
INLINE const char *
Options::get_initializer_suffix ()
{
return _initializer_suffix;
}
/* Returns the hash function name. */
INLINE const char *
Options::get_hash_name ()
{
return _hash_name;
}
/* Returns the hash table array name. */
INLINE const char *
Options::get_wordlist_name ()
{
return _wordlist_name;
}
/* Returns the generated class name. */
INLINE const char *
Options::get_class_name ()
{
return _class_name;
}
/* Returns the initial associated character value. */
INLINE int
Options::initial_value ()
{
return _initial_asso_value;
}
/* Returns the iterations value. */
INLINE int
Options::get_iterations ()
{
return _iterations;
}
/* Returns the string used to delimit keywords from other attributes. */
INLINE const char *
Options::get_delimiter ()
{
return _delimiters;
}
/* Gets the total number of switch statements to generate. */
INLINE int
Options::get_total_switches ()
{
return _total_switches;
}