summaryrefslogtreecommitdiff
path: root/tools/newclass
diff options
context:
space:
mode:
authoretobi <git@e-tobi.net>2009-11-03 22:04:11 +0100
committeretobi <git@e-tobi.net>2009-11-03 22:18:04 +0100
commitccbbe046f0efb2c9a63e78d307f2c1b96c1c3e64 (patch)
tree499523f44682328545429f93c98d4421cbdc1356 /tools/newclass
parent5ae195f9b432f99a25b6dbaf155879ce9fd815c1 (diff)
downloadvdr-plugin-vodcatcher-master.tar.gz
vdr-plugin-vodcatcher-master.tar.bz2
added toolsHEADv0.2.2master
Diffstat (limited to 'tools/newclass')
-rwxr-xr-xtools/newclass31
1 files changed, 31 insertions, 0 deletions
diff --git a/tools/newclass b/tools/newclass
new file mode 100755
index 0000000..8831b73
--- /dev/null
+++ b/tools/newclass
@@ -0,0 +1,31 @@
+#!/bin/sh
+
+class=$1
+lowerclass=`echo $class | tr [:upper:] [:lower:]`
+upperclass=`echo $class | tr [:lower:] [:upper:]`
+headerfile="${lowerclass}.h"
+ccfile="$lowerclass".cc
+
+cp `dirname $0`/sourcefileheader.txt $headerfile
+
+cat >> $headerfile <<EOF
+#ifndef ___${upperclass}_H
+#define ___${upperclass}_H
+
+class $1
+{
+ public:
+};
+
+#endif
+EOF
+
+cp `dirname $0`/sourcefileheader.txt $ccfile
+
+cat >> $ccfile <<EOF
+#include "$headerfile"
+
+??? $class::???(???)
+{
+}
+EOF