/[projects]/smsdaemon/plugins/createskeleton.sh
ViewVC logotype

Diff of /smsdaemon/plugins/createskeleton.sh

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 51 by torben, Wed Jun 11 11:05:03 2008 UTC revision 187 by torben, Mon Dec 15 10:13:21 2008 UTC
# Line 26  echo "class $CLASS : public Plugin" >> $ Line 26  echo "class $CLASS : public Plugin" >> $
26  echo "{" >> $HEADER  echo "{" >> $HEADER
27  echo "public:" >> $HEADER  echo "public:" >> $HEADER
28  echo -e "\t$CLASS();\n" >> $HEADER  echo -e "\t$CLASS();\n" >> $HEADER
29  echo -e "\tvirtual void Execute(IGsmModem& modem, SMS& sms);\n" >> $HEADER  echo -e "\tvirtual void Execute(ISmsTransceiver& modem, SMS& sms);\n" >> $HEADER
30  echo -e "\tvirtual ~$CLASS() {}\n" >> $HEADER  echo -e "\tvirtual ~$CLASS() {}\n" >> $HEADER
31  echo -e "};\n\n" >> $HEADER  echo -e "};\n\n" >> $HEADER
32  echo -n "#endif // __" >> $HEADER  echo -n "#endif // __" >> $HEADER
# Line 35  echo "_H__" >> $HEADER Line 35  echo "_H__" >> $HEADER
35    
36  #create implementation file  #create implementation file
37  echo "#include \"$HEADER\"" > $CPP  echo "#include \"$HEADER\"" > $CPP
38  echo -e "#include \"GsmModem.h\"\n" >> $CPP  echo -e "#include \"ISmsTransceiver.h\"" >> $CPP
39    echo -e "#include \"Sms.h\"\n" >> $CPP
40    
41  echo "$CLASS::$CLASS()" >> $CPP  echo "$CLASS::$CLASS()" >> $CPP
42  echo "  : Plugin(\"$CLASSLO\", \"<insert description>\")" >> $CPP  echo "  : Plugin(\"$CLASSLO\", \"<insert description>\")" >> $CPP
43  echo "{" >> $CPP  echo "{" >> $CPP
44  echo -e "}\n" >> $CPP  echo -e "}\n" >> $CPP
45    
46  echo "void $CLASS::Execute(IGsmModem& modem, SMS& sms)" >> $CPP  echo "void $CLASS::Execute(ISmsTransceiver& modem, SMS& sms)" >> $CPP
47  echo "{" >> $CPP  echo "{" >> $CPP
48  echo -e "\t//Add Implementation" >> $CPP  echo -e "\t//Add Implementation" >> $CPP
49  echo "}" >> $CPP  echo "}" >> $CPP
50    
51    echo ""
52    echo "Created $HEADER and $CPP"
53    echo "Remember to:"
54    echo "  - Add an implementation in the $CLASS::Execute() method"
55    echo "  - Add $CPP to CMakeLists.txt"
56    echo "  - Add $HEADER and $CPP to source control"
57    echo "  - Add an instance of $CLASS to PluginManager::LoadPlugins()"

Legend:
Removed from v.51  
changed lines
  Added in v.187

  ViewVC Help
Powered by ViewVC 1.1.20