#! /bin/sh # # Hash_Map_Manager_Helper,v 4.6 1998/12/30 03:37:53 levine Exp # # # This script uses Hash_Map_Manager.pl. # # # This script helps in fixing the template instantiations changes # required by the new design of ACE_Hash_Map_Manager. # # Note that this script is not a 100% fool proof: # # (a) It uses commas to delimit the types in ACE_Hash_Map_Manager. If X, Y, or Z are complicated types containing commas (e.g., # T), this script will not work. Also, all template parameters # are assumed to be on the same line. # # In the case where this script will not work, here are the cookbook, # do-it-yourself instructions: # # ACE_Hash_Map_Entry # # changes to: # # ACE_Hash_Map_Entry # ACE_Hash # ACE_Equal_To # # # ACE_Hash_Map_Iterator_Base # # changes to: # # ACE_Hash_Map_Iterator_Base_Ex, ACE_Equal_To, Z> # # # ACE_Hash_Map_Manager # # changes to: # # ACE_Hash_Map_Manager # ACE_Hash_Map_Manager_Ex, ACE_Equal_To, Z> # # # ACE_Hash_Map_Iterator # # changes to: # # ACE_Hash_Map_Iterator # ACE_Hash_Map_Iterator_Ex, ACE_Equal_To, Z> # # # ACE_Hash_Map_Reverse_Iterator # # changes to: # # ACE_Hash_Map_Reverse_Iterator # ACE_Hash_Map_Reverse_Iterator_Ex, ACE_Equal_To, Z> # (b) The second problem is for g++ users (version lower than # 2.8). g++ is broken such that if you explicitly instantiate # templates, it will ignore template specialization. Therefore if you # are using the template instantiation provided in ACE for ACE_Hash # and ACE_Equal_To, don't instantiate those templates. for file in `find . -type f \( -name "*.i" -o -name "*.h" -o -name "*.cpp" \) -print | xargs egrep -l "template[ \t]*class[ \t]*ACE_Hash_Map_Manager"` do echo Fixing template instantiations in $file perl $ACE_ROOT/bin/Hash_Map_Manager.pl $file > $file.new mv $file.new $file done