#!/bin/sh

source defs

PRO="#ifndef __file_h\n#define __file_h\n"
EPI="#endif\n"
INC="#include <system/config.h>\n#include <system/info.h>\n"

COM="class Common
{
protected:
    Common() {}

public:
    // methods

protected:
    // data
};\n"

if (( $# != 2 )); then
    echo "usage: `basename $0` <type> <family>"
    exit 1
fi

type=$1
common=$2"_Common"

echo -e "`echo "$PRO" | rep File "$common"`"
echo -e "$INC"
echo -e "`begns`\n"
echo -e "`echo "$COM" | rep Common "$common"`"
echo -e "`endns`\n"
echo -e "$EPI"

exit 0
