~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/util/string.h

  • Committer: Patrick Crews
  • Date: 2010-08-03 14:40:01 UTC
  • mfrom: (1099.4.171)
  • mto: This revision was merged to the branch mainline in revision 1682.
  • Revision ID: gleebix@gmail.com-20100803144001-u9orqrd1jsjo5tq0
Merge updated translations

Show diffs side-by-side

added added

removed removed

Lines of Context:
46
46
namespace util
47
47
{
48
48
 
49
 
 
50
 
namespace string {
51
 
typedef boost::shared_ptr<std::string> shared_ptr;
52
 
typedef boost::shared_ptr<const std::string> const_shared_ptr;
53
 
}
54
 
 
55
49
struct insensitive_equal_to : std::binary_function<std::string, std::string, bool>
56
50
{
57
51
  bool operator()(std::string const& x, std::string const& y) const
76
70
  }
77
71
};
78
72
 
79
 
struct sensitive_hash : std::unary_function< std::vector<char>, std::size_t>
80
 
{
81
 
  std::size_t operator()(std::vector<char> const& x) const
82
 
  {
83
 
    std::size_t seed = 0;
84
 
 
85
 
    for(std::vector<char>::const_iterator it = x.begin(); it != x.end(); ++it)
86
 
    {
87
 
      boost::hash_combine(seed, *it);
88
 
    }
89
 
 
90
 
    return seed;
91
 
  }
92
 
};
93
 
 
94
73
} /* namespace util */
95
74
} /* namespace drizzled */
96
75