コード例 #1
0
ファイル: collate.cpp プロジェクト: Ding8222/abelkhan
 virtual long do_hash(char_type const *b,char_type const *e) const
 {
     string_type s(do_transform(b,e));
     char const *begin = reinterpret_cast<char const *>(s.c_str());
     char const *end = begin + s.size() * sizeof(char_type);
     return gnu_gettext::pj_winberger_hash_function(begin,end);
 }
コード例 #2
0
ファイル: collator.hpp プロジェクト: 3DJ/ofxOgre
 ///
 /// This function is used to override default collation function that does not take in account collation level.
 /// Uses primary level
 ///
 virtual string_type do_transform(char_type const *b,char_type const *e) const
 {
     return do_transform(identical,b,e);
 }
コード例 #3
0
ファイル: collator.hpp プロジェクト: 3DJ/ofxOgre
 ///
 /// Create a binary string that can be compared to other in order to get collation order. The string is created
 /// for text in range [b,e). It is useful for collation of multiple strings for text.
 ///
 /// The transformation follows these rules:
 /// \code
 ///   compare(level,b1,e1,b2,e2) == sign( transform(level,b1,e1).compare(transform(level,b2,e2)) );
 /// \endcode
 ///
 /// Calls do_transform
 ///
 string_type transform(level_type level,char_type const *b,char_type const *e) const
 {
     return do_transform(level,b,e);
 }
コード例 #4
0
ファイル: collator.hpp プロジェクト: 3DJ/ofxOgre
 ///
 /// Create a binary string from string \a s, that can be compared to other, useful for collation of multiple
 /// strings.
 ///
 /// The transformation follows these rules:
 /// \code
 ///   compare(level,s1,s2) == sign( transform(level,s1).compare(transform(level,s2)) );
 /// \endcode
 ///
 string_type transform(level_type level,string_type const &s) const
 {
     return do_transform(level,s.data(),s.data()+s.size());
 }