summaryrefslogtreecommitdiff
path: root/tools/newclass
blob: 8831b73672060c76d0e69fb98e2aea8ebdfdb657 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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