summaryrefslogtreecommitdiff
path: root/bin/Hash_Map_Manager_Helper
diff options
context:
space:
mode:
Diffstat (limited to 'bin/Hash_Map_Manager_Helper')
-rwxr-xr-xbin/Hash_Map_Manager_Helper27
1 files changed, 27 insertions, 0 deletions
diff --git a/bin/Hash_Map_Manager_Helper b/bin/Hash_Map_Manager_Helper
new file mode 100755
index 00000000000..3d98475c043
--- /dev/null
+++ b/bin/Hash_Map_Manager_Helper
@@ -0,0 +1,27 @@
+#! /bin/csh -f
+
+#
+# $Id$
+#
+
+#
+# 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<X, Y, Z>. If X, Y, or Z are
+# complicated types containing commas (e.g., T<a, b>), this script
+# will not work. (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.
+#
+# This script uses Hash_Map_Manager.perl.
+#
+
+foreach file ( `find . -type f \( -name "*.i" -o -name "*.h" -o -name "*.cpp" \) -print | xargs grep -l "template class ACE_Hash_Map_Entry"` )
+ echo Fixing template instantiations in $file
+ perl $ACE_ROOT/bin/Hash_Map_Manager.perl $file > $file.new
+ mv $file.new $file
+end