20 #ifndef GNASH_STRING_TABLE_H
21 #define GNASH_STRING_TABLE_H
27 #include <boost/multi_index_container.hpp>
28 #include <boost/multi_index/hashed_index.hpp>
29 #include <boost/multi_index/identity.hpp>
30 #include <boost/multi_index/member.hpp>
31 #include <boost/thread.hpp>
48 svt(
const std::string& val, std::size_t
i)
69 typedef boost::multi_index_container<
svt,
70 boost::multi_index::indexed_by<
72 boost::multi_index::hashed_unique<
73 boost::multi_index::tag<StringValue>,
74 boost::multi_index::member<svt, std::string, &svt::value> >,
76 boost::multi_index::hashed_unique<
77 boost::multi_index::tag<StringID>,
78 boost::multi_index::member<svt, std::size_t, &svt::id>
83 typedef std::size_t
key;
95 key find(
const std::string& to_find,
bool insert_unfound =
true);
102 const std::string& value(
key to_find)
const
104 if (
_table.empty() || !to_find)
return _empty;
106 table::index<StringID>::type::iterator
r =
114 key insert(
const std::string& to_insert);
122 void insert_group(
const svt* pList, std::size_t size);
128 key already_locked_insert(
const std::string& to_insert);
134 _highestKnownLowercase(0)
142 key noCase(key
a)
const;
146 void setHighestKnownLowercase(std::size_t
k);
151 static const std::string _empty;
153 std::size_t _highestKey;
155 std::map<key, key> _caseTable;
156 key _highestKnownLowercase;