File: ccFunction

package info (click to toggle)
ccbuild 1.5.7-2
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 2,208 kB
  • ctags: 441
  • sloc: cpp: 4,817; sh: 1,195; makefile: 53; ansic: 43
file content (19 lines) | stat: -rwxr-xr-x 395 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/sh
#Create a simple .cc function file for a 
# class member, whose name is the first argument
# It includes the srcHeader file of the first higher src directory.
FNAME=$1
FILENAME="$FNAME".cc
CNAME=`basename "$PWD"`
HEADER=`echo $PWD |grep -o "^.*src"`/srcHeader
echo $FILENAME
cat < "$HEADER" >> "$FILENAME"
cat >> "$FILENAME" <<EOF

#include "$CNAME.ih"

void $CNAME::$FNAME()
{

}
EOF