⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 parameterhash.cxx

📁 一个著名的SIP协议栈
💻 CXX
📖 第 1 页 / 共 2 页
字号:
/* C++ code produced by gperf version 3.0.1 */
/* Command-line: gperf -D --enum -E -L C++ -t -k '*' --compare-strncmp -Z ParameterHash ParameterHash.gperf  */

#if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
      && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \
      && (')' == 41) && ('*' == 42) && ('+' == 43) && (',' == 44) \
      && ('-' == 45) && ('.' == 46) && ('/' == 47) && ('0' == 48) \
      && ('1' == 49) && ('2' == 50) && ('3' == 51) && ('4' == 52) \
      && ('5' == 53) && ('6' == 54) && ('7' == 55) && ('8' == 56) \
      && ('9' == 57) && (':' == 58) && (';' == 59) && ('<' == 60) \
      && ('=' == 61) && ('>' == 62) && ('?' == 63) && ('A' == 65) \
      && ('B' == 66) && ('C' == 67) && ('D' == 68) && ('E' == 69) \
      && ('F' == 70) && ('G' == 71) && ('H' == 72) && ('I' == 73) \
      && ('J' == 74) && ('K' == 75) && ('L' == 76) && ('M' == 77) \
      && ('N' == 78) && ('O' == 79) && ('P' == 80) && ('Q' == 81) \
      && ('R' == 82) && ('S' == 83) && ('T' == 84) && ('U' == 85) \
      && ('V' == 86) && ('W' == 87) && ('X' == 88) && ('Y' == 89) \
      && ('Z' == 90) && ('[' == 91) && ('\\' == 92) && (']' == 93) \
      && ('^' == 94) && ('_' == 95) && ('a' == 97) && ('b' == 98) \
      && ('c' == 99) && ('d' == 100) && ('e' == 101) && ('f' == 102) \
      && ('g' == 103) && ('h' == 104) && ('i' == 105) && ('j' == 106) \
      && ('k' == 107) && ('l' == 108) && ('m' == 109) && ('n' == 110) \
      && ('o' == 111) && ('p' == 112) && ('q' == 113) && ('r' == 114) \
      && ('s' == 115) && ('t' == 116) && ('u' == 117) && ('v' == 118) \
      && ('w' == 119) && ('x' == 120) && ('y' == 121) && ('z' == 122) \
      && ('{' == 123) && ('|' == 124) && ('}' == 125) && ('~' == 126))
/* The character set is not based on ISO-646.  */
#error "gperf generated tables don't work with this execution character set. Please report a bug to <bug-gnu-gperf@gnu.org>."
#endif

#line 1 "ParameterHash.gperf"

#include <string.h>
#include <ctype.h>
#include "resip/stack/ParameterTypes.hxx"
namespace resip {
using namespace std;
#line 8 "ParameterHash.gperf"
struct params { char *name; ParameterTypes::Type type; };
/* maximum key range = 292, duplicates = 1 */

class ParameterHash
{
private:
  static inline unsigned int hash (const char *str, unsigned int len);
public:
  static struct params *in_word_set (const char *str, unsigned int len);
};

inline unsigned int
ParameterHash::hash (register const char *str, register unsigned int len)
{
  static unsigned short asso_values[] =
    {
      293, 293, 293, 293, 293, 293, 293, 293, 293, 293,
      293, 293, 293, 293, 293, 293, 293, 293, 293, 293,
      293, 293, 293, 293, 293, 293, 293, 293, 293, 293,
      293, 293, 293, 293, 293, 293, 293, 293, 293, 293,
      293, 293, 293,   0, 293,  55,   0, 293, 293, 293,
      293, 293, 293, 293, 293, 293, 293, 293, 293, 293,
      293, 293, 293, 293, 293, 293, 293, 293, 293, 293,
      293, 293, 293, 293, 293, 293, 293, 293, 293, 293,
      293, 293, 293, 293,   0, 293, 293, 293, 293, 293,
      293, 293, 293, 293, 293, 293, 293,   0,  35,   0,
       15,   0,  20,   5,  40,  10, 293,   0,   0,  25,
        5,   5,   5,   0,   0,   0,   0,  40,  70,  30,
       55,  70,  40, 293, 293, 293, 293, 293, 293, 293,
      293, 293, 293, 293, 293, 293, 293, 293, 293, 293,
      293, 293, 293, 293, 293, 293, 293, 293, 293, 293,
      293, 293, 293, 293, 293, 293, 293, 293, 293, 293,
      293, 293, 293, 293, 293, 293, 293, 293, 293, 293,
      293, 293, 293, 293, 293, 293, 293, 293, 293, 293,
      293, 293, 293, 293, 293, 293, 293, 293, 293, 293,
      293, 293, 293, 293, 293, 293, 293, 293, 293, 293,
      293, 293, 293, 293, 293, 293, 293, 293, 293, 293,
      293, 293, 293, 293, 293, 293, 293, 293, 293, 293,
      293, 293, 293, 293, 293, 293, 293, 293, 293, 293,
      293, 293, 293, 293, 293, 293, 293, 293, 293, 293,
      293, 293, 293, 293, 293, 293, 293, 293, 293, 293,
      293, 293, 293, 293, 293, 293
    };
  register int hval = len;

  switch (hval)
    {
      default:
        hval += asso_values[(unsigned char)tolower(str[12])];
      /*FALLTHROUGH*/
      case 12:
        hval += asso_values[(unsigned char)tolower(str[11])];
      /*FALLTHROUGH*/
      case 11:
        hval += asso_values[(unsigned char)tolower(str[10])];
      /*FALLTHROUGH*/
      case 10:
        hval += asso_values[(unsigned char)tolower(str[9])];
      /*FALLTHROUGH*/
      case 9:
        hval += asso_values[(unsigned char)tolower(str[8])];
      /*FALLTHROUGH*/
      case 8:
        hval += asso_values[(unsigned char)tolower(str[7])];
      /*FALLTHROUGH*/
      case 7:
        hval += asso_values[(unsigned char)tolower(str[6])];
      /*FALLTHROUGH*/
      case 6:
        hval += asso_values[(unsigned char)tolower(str[5])];
      /*FALLTHROUGH*/
      case 5:
        hval += asso_values[(unsigned char)tolower(str[4])];
      /*FALLTHROUGH*/
      case 4:
        hval += asso_values[(unsigned char)tolower(str[3])];
      /*FALLTHROUGH*/
      case 3:
        hval += asso_values[(unsigned char)tolower(str[2])];
      /*FALLTHROUGH*/
      case 2:
        hval += asso_values[(unsigned char)tolower(str[1])];
      /*FALLTHROUGH*/
      case 1:
        hval += asso_values[(unsigned char)tolower(str[0])];
        break;
    }
  return hval;
}

struct params *
ParameterHash::in_word_set (register const char *str, register unsigned int len)
{
  enum
    {
      TOTAL_KEYWORDS = 85,
      MIN_WORD_LENGTH = 1,
      MAX_WORD_LENGTH = 13,
      MIN_HASH_VALUE = 1,
      MAX_HASH_VALUE = 292
    };

  static struct params wordlist[] =
    {
#line 36 "ParameterHash.gperf"
      {"q", ParameterTypes::q},
#line 35 "ParameterHash.gperf"
      {"lr", ParameterTypes::lr},
#line 33 "ParameterHash.gperf"
      {"ttl", ParameterTypes::ttl},
#line 58 "ParameterHash.gperf"
      {"stale", ParameterTypes::stale},
#line 54 "ParameterHash.gperf"
      {"nc", ParameterTypes::nc},
#line 43 "ParameterHash.gperf"
      {"tag", ParameterTypes::tag},
#line 23 "ParameterHash.gperf"
      {"actor", ParameterTypes::actor},
#line 62 "ParameterHash.gperf"
      {"qop", ParameterTypes::qopFactory},
#line 78 "ParameterHash.gperf"
      {"site", ParameterTypes::site},
#line 48 "ParameterHash.gperf"
      {"rport", ParameterTypes::rport},
#line 65 "ParameterHash.gperf"
      {"reason", ParameterTypes::reason},
#line 10 "ParameterHash.gperf"
      {"data", ParameterTypes::data},
#line 53 "ParameterHash.gperf"
      {"nonce", ParameterTypes::nonce},
#line 50 "ParameterHash.gperf"
      {"cnonce", ParameterTypes::cnonce},
#line 11 "ParameterHash.gperf"
      {"control", ParameterTypes::control},
#line 57 "ParameterHash.gperf"
      {"response", ParameterTypes::response},
#line 30 "ParameterHash.gperf"
      {"transport", ParameterTypes::transport},
#line 52 "ParameterHash.gperf"
      {"id", ParameterTypes::id},
#line 71 "ParameterHash.gperf"
      {"protocol", ParameterTypes::protocol},
#line 46 "ParameterHash.gperf"
      {"rinstance", ParameterTypes::rinstance},
#line 56 "ParameterHash.gperf"
      {"realm", ParameterTypes::realm},
#line 29 "ParameterHash.gperf"
      {"name", ParameterTypes::name},
#line 74 "ParameterHash.gperf"
      {"name", ParameterTypes::name},
#line 47 "ParameterHash.gperf"
      {"comp", ParameterTypes::comp},
#line 92 "ParameterHash.gperf"
      {"url", ParameterTypes::url},
#line 31 "ParameterHash.gperf"
      {"user", ParameterTypes::user},
#line 72 "ParameterHash.gperf"
      {"micalg", ParameterTypes::micalg},
#line 82 "ParameterHash.gperf"

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -