#include <cca.h> #include <stdPorts.h> // for GoPort and other well-known ports. #include "RandRandomGenerator_CCA.h" #include "RandomGenerator_CCA_wrapper.h" extern "C" { // We need a C wrapper to get dynamic loading to work. // Here's our NULL constructor wrapped in C. gov::cca::Component * create_RandomGenerator () { gov::cca::Component * wrapper; randomgen::ccaimpl::RandRandomGenerator * component; component = new randomgen::ccaimpl::RandRandomGenerator (); wrapper = dynamic_cast < gov::cca::Component * >(component); return wrapper; } // See dccafe/cxx/dc/framework/ComponentFactory.h for details. // More sophisticated repository interfaces would supplant this. char **getComponentList () { static char *list[2]; list[0] = "create_RandomGenerator RandomGenerator"; list[1] = 0; return list; } };