diff options
author | Johnny Willemsen <jwillemsen@remedy.nl> | 2002-01-01 13:13:17 +0000 |
---|---|---|
committer | Johnny Willemsen <jwillemsen@remedy.nl> | 2002-01-01 13:13:17 +0000 |
commit | ff9e09eb44ba78abeaf92ce56f9f122ff4b15c07 (patch) | |
tree | 3acc77f5c6b15dc4161920b8bf89896ca223244d /examples/Map_Manager | |
parent | aa66e77b19554b27ad4896fa2cb04de83c1de07d (diff) | |
download | ATCD-ff9e09eb44ba78abeaf92ce56f9f122ff4b15c07.tar.gz |
ChangeLogTag: Tue Jan 01 14:04:08 2002 Johnny Willemsen <jwillemsen@remedy.nl>
Diffstat (limited to 'examples/Map_Manager')
-rw-r--r-- | examples/Map_Manager/test_hash_map_manager.cpp | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/examples/Map_Manager/test_hash_map_manager.cpp b/examples/Map_Manager/test_hash_map_manager.cpp index 843cab03235..9a094b78e42 100644 --- a/examples/Map_Manager/test_hash_map_manager.cpp +++ b/examples/Map_Manager/test_hash_map_manager.cpp @@ -9,7 +9,7 @@ ACE_RCSID(Map_Manager, test_hash_map_manager, "$Id$") const int MAX_KEY_LEN = 1000; -typedef ACE_Hash_Map_Manager<ACE_CString, ACE_CString, ACE_SYNCH_RW_MUTEX> MAP_MANAGER; +typedef ACE_Hash_Map_Manager<ACE_TString, ACE_TString, ACE_SYNCH_RW_MUTEX> MAP_MANAGER; int main (int argc, ACE_TCHAR *argv[]) @@ -21,17 +21,17 @@ main (int argc, ACE_TCHAR *argv[]) { int total = ACE_OS::atoi (argv[1]); - if (!freopen (argv[2], "r", stdin)) + if (!ACE_OS::freopen (argv[2], ACE_TEXT("r"), stdin)) ACE_OS::perror (argv[0]), ACE_OS::exit (1); MAP_MANAGER hash (total); - char key[MAX_KEY_LEN]; + ACE_TCHAR key[MAX_KEY_LEN]; while (ACE_OS::fgets (key, sizeof key, stdin)) // stream ops are just too slow!! { - ACE_CString string (key); + ACE_TString string (key); hash.bind (string, string); } @@ -46,23 +46,23 @@ main (int argc, ACE_TCHAR *argv[]) entry->ext_id_.fast_rep (), entry->int_id_.fast_rep ())); - if (!freopen (argv[3], "r", stdin)) + if (!ACE_OS::freopen (argv[3], ACE_TEXT("r"), stdin)) ACE_OS::perror (argv[0]), exit (1); while (ACE_OS::fgets (key, sizeof key, stdin)) { - ACE_CString name (key); - ACE_CString value; + ACE_TString name (key); + ACE_TString value; assert (hash.find (name, value) != -1); assert (name == value); } - if (!freopen (argv[3], "r", stdin)) + if (!ACE_OS::freopen (argv[3], ACE_TEXT("r"), stdin)) ACE_OS::perror (argv[0]), exit (1); while (ACE_OS::fgets (key, sizeof key, stdin)) { - ACE_CString string (key); + ACE_TString string (key); assert (hash.unbind (string) != -1); } @@ -77,14 +77,14 @@ main (int argc, ACE_TCHAR *argv[]) #if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) -template class ACE_Hash_Map_Entry<ACE_CString, ACE_CString>; -template class ACE_Hash_Map_Iterator_Base_Ex<ACE_CString, ACE_CString, ACE_Hash<ACE_CString>, ACE_Equal_To<ACE_CString>, ACE_SYNCH_RW_MUTEX>; -template class ACE_Hash_Map_Iterator<ACE_CString, ACE_CString, ACE_SYNCH_RW_MUTEX>; -template class ACE_Hash_Map_Iterator_Ex<ACE_CString, ACE_CString, ACE_Hash<ACE_CString>, ACE_Equal_To<ACE_CString>, ACE_SYNCH_RW_MUTEX>; -template class ACE_Hash_Map_Reverse_Iterator<ACE_CString, ACE_CString, ACE_SYNCH_RW_MUTEX>; -template class ACE_Hash_Map_Reverse_Iterator_Ex<ACE_CString, ACE_CString, ACE_Hash<ACE_CString>, ACE_Equal_To<ACE_CString>, ACE_SYNCH_RW_MUTEX>; -template class ACE_Hash_Map_Manager<ACE_CString, ACE_CString, ACE_SYNCH_RW_MUTEX>; -template class ACE_Hash_Map_Manager_Ex<ACE_CString, ACE_CString, ACE_Hash<ACE_CString>, ACE_Equal_To<ACE_CString>, ACE_SYNCH_RW_MUTEX>; +template class ACE_Hash_Map_Entry<ACE_TString, ACE_TString>; +template class ACE_Hash_Map_Iterator_Base_Ex<ACE_TString, ACE_TString, ACE_Hash<ACE_TString>, ACE_Equal_To<ACE_TString>, ACE_SYNCH_RW_MUTEX>; +template class ACE_Hash_Map_Iterator<ACE_TString, ACE_TString, ACE_SYNCH_RW_MUTEX>; +template class ACE_Hash_Map_Iterator_Ex<ACE_TString, ACE_TString, ACE_Hash<ACE_TString>, ACE_Equal_To<ACE_TString>, ACE_SYNCH_RW_MUTEX>; +template class ACE_Hash_Map_Reverse_Iterator<ACE_TString, ACE_TString, ACE_SYNCH_RW_MUTEX>; +template class ACE_Hash_Map_Reverse_Iterator_Ex<ACE_TString, ACE_TString, ACE_Hash<ACE_TString>, ACE_Equal_To<ACE_TString>, ACE_SYNCH_RW_MUTEX>; +template class ACE_Hash_Map_Manager<ACE_TString, ACE_TString, ACE_SYNCH_RW_MUTEX>; +template class ACE_Hash_Map_Manager_Ex<ACE_TString, ACE_TString, ACE_Hash<ACE_TString>, ACE_Equal_To<ACE_TString>, ACE_SYNCH_RW_MUTEX>; #elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) #if defined(ACE_HAS_THREADS) @@ -93,12 +93,12 @@ template class ACE_Hash_Map_Manager_Ex<ACE_CString, ACE_CString, ACE_Hash<ACE_CS #pragma instantiate ACE_Write_Guard<ACE_SYNCH_RW_MUTEX> #endif /* ACE_HAS_THREADS */ -#pragma instantiate ACE_Hash_Map_Entry<ACE_CString, ACE_CString> -#pragma instantiate ACE_Hash_Map_Iterator_Base_Ex<ACE_CString, ACE_CString, ACE_Hash<ACE_CString>, ACE_Equal_To<ACE_CString>, ACE_SYNCH_RW_MUTEX> -#pragma instantiate ACE_Hash_Map_Iterator<ACE_CString, ACE_CString, ACE_SYNCH_RW_MUTEX> -#pragma instantiate ACE_Hash_Map_Iterator_Ex<ACE_CString, ACE_CString, ACE_Hash<ACE_CString>, ACE_Equal_To<ACE_CString>, ACE_SYNCH_RW_MUTEX> -#pragma instantiate ACE_Hash_Map_Reverse_Iterator<ACE_CString, ACE_CString, ACE_SYNCH_RW_MUTEX> -#pragma instantiate ACE_Hash_Map_Reverse_Iterator_Ex<ACE_CString, ACE_CString, ACE_Hash<ACE_CString>, ACE_Equal_To<ACE_CString>, ACE_SYNCH_RW_MUTEX> -#pragma instantiate ACE_Hash_Map_Manager<ACE_CString, ACE_CString, ACE_SYNCH_RW_MUTEX> -#pragma instantiate ACE_Hash_Map_Manager_Ex<ACE_CString, ACE_CString, ACE_Hash<ACE_CString>, ACE_Equal_To<ACE_CString>, ACE_SYNCH_RW_MUTEX> +#pragma instantiate ACE_Hash_Map_Entry<ACE_TString, ACE_TString> +#pragma instantiate ACE_Hash_Map_Iterator_Base_Ex<ACE_TString, ACE_TString, ACE_Hash<ACE_TString>, ACE_Equal_To<ACE_TString>, ACE_SYNCH_RW_MUTEX> +#pragma instantiate ACE_Hash_Map_Iterator<ACE_TString, ACE_TString, ACE_SYNCH_RW_MUTEX> +#pragma instantiate ACE_Hash_Map_Iterator_Ex<ACE_TString, ACE_TString, ACE_Hash<ACE_TString>, ACE_Equal_To<ACE_TString>, ACE_SYNCH_RW_MUTEX> +#pragma instantiate ACE_Hash_Map_Reverse_Iterator<ACE_TString, ACE_TString, ACE_SYNCH_RW_MUTEX> +#pragma instantiate ACE_Hash_Map_Reverse_Iterator_Ex<ACE_TString, ACE_TString, ACE_Hash<ACE_TString>, ACE_Equal_To<ACE_TString>, ACE_SYNCH_RW_MUTEX> +#pragma instantiate ACE_Hash_Map_Manager<ACE_TString, ACE_TString, ACE_SYNCH_RW_MUTEX> +#pragma instantiate ACE_Hash_Map_Manager_Ex<ACE_TString, ACE_TString, ACE_Hash<ACE_TString>, ACE_Equal_To<ACE_TString>, ACE_SYNCH_RW_MUTEX> #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ |