2009-03-12 01:27:14 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
|
|
check_header_file() {
|
|
|
|
|
NAMES=$(grep "^class .* {$" $@ | sed "s/^class \([A-Za-z]\+\) .*$/\1/")
|
|
|
|
|
FILE=$(basename $@ .h)
|
|
|
|
|
for name in ${NAMES}
|
|
|
|
|
do
|
2009-03-24 03:18:00 +00:00
|
|
|
if [ "$FILE" == "$name" ]
|
2009-09-03 00:43:55 +01:00
|
|
|
then
|
|
|
|
|
true
|
|
|
|
|
elif [ "${FILE}Base" == "$name" ]
|
2009-03-12 01:27:14 +00:00
|
|
|
then
|
2009-03-24 03:18:00 +00:00
|
|
|
true
|
|
|
|
|
elif [ "Python${FILE}" == "$name" ]
|
|
|
|
|
then
|
|
|
|
|
# PythonFoo is the standard python version derived from Foo
|
|
|
|
|
true
|
|
|
|
|
elif [ "$(echo ${FILE}| sed s/Factory/Kit/)" == "$name" ]
|
|
|
|
|
then
|
|
|
|
|
# FooKit is the standard base class for FooFactory
|
|
|
|
|
true
|
|
|
|
|
else
|
|
|
|
|
echo $1: $name
|
2009-03-12 01:27:14 +00:00
|
|
|
fi
|
|
|
|
|
done
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
for i in */*.h
|
|
|
|
|
do
|
|
|
|
|
check_header_file $i
|
|
|
|
|
done
|