added support for UTF-8
now the UTF-8 is a default charset git-svn-id: svn://ttmath.org/publicrep/winix/trunk@677 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
@@ -28,7 +28,7 @@ public:
|
||||
typedef typename Table::size_type SizeType;
|
||||
|
||||
typedef typename std::map<long, SizeType> TableId;
|
||||
typedef typename std::map<std::string, SizeType> TableName;
|
||||
typedef typename std::map<std::wstring, SizeType> TableName;
|
||||
|
||||
|
||||
UGContainer();
|
||||
@@ -41,10 +41,10 @@ public:
|
||||
void Clear();
|
||||
|
||||
bool Is(long id);
|
||||
bool Is(const std::string & name);
|
||||
bool Is(const std::wstring & name);
|
||||
|
||||
Iterator FindId(long id);
|
||||
Iterator FindName(const std::string & name);
|
||||
Iterator FindName(const std::wstring & name);
|
||||
|
||||
Type & operator[](SizeType pos);
|
||||
|
||||
@@ -141,7 +141,7 @@ return true;
|
||||
|
||||
|
||||
template<class Type>
|
||||
bool UGContainer<Type>::Is(const std::string & name)
|
||||
bool UGContainer<Type>::Is(const std::wstring & name)
|
||||
{
|
||||
typename TableName::iterator i = table_name.find(name);
|
||||
|
||||
@@ -167,7 +167,7 @@ return table.begin() + i->second;
|
||||
|
||||
|
||||
template<class Type>
|
||||
typename UGContainer<Type>::Iterator UGContainer<Type>::FindName(const std::string & name)
|
||||
typename UGContainer<Type>::Iterator UGContainer<Type>::FindName(const std::wstring & name)
|
||||
{
|
||||
typename TableName::iterator i = table_name.find(name);
|
||||
|
||||
|
Reference in New Issue
Block a user