Template:Module/main.cpp

// $Id$ // Copyright (c) <<>> <<>> // Template valid as of // TODO add class includes here // TODO define module globals here EXPORT CLASS *init(CALLBACKS *fntable, MODULE *module, int argc, char *argv[]) {        if (set_callback(fntable)==NULL) {                errno = EINVAL; return NULL; }        // TODO publish module globals here new <<>>(module); // TODO add other classes here // always return the first class registered return <<>>::oclass; } EXPORT int do_kill(void*) {        // TODO module cleanup if any return 0; } // TODO add optional functions
 * 1) define DLMAIN // required to enable module main code in gridlabd.h
 * 2) include "gridlabd.h"
 * 3) include "<<>>.h"