hapi.cc File Reference
#include "hapi.h"
Functions | |
void | sdfToHapiComment (ostream &out) |
void | hapiActorDeclaration (ostream &out, TimedSDFactor *a) |
void | hapiActorConstructor (ostream &out, TimedSDFactor *a) |
void | hapiActorMain (ostream &out, TimedSDFactor *a) |
void | hapiActorDeclarationH (ostream &out, TimedSDFactor *a) |
void | hapiActorDeclarationCC (ostream &out, TimedSDFactor *a) |
void | hapiNetworkDeclaration (ostream &out, TimedSDFgraph *g) |
void | hapiNetworkConstructor (ostream &out, SDFgraph *g) |
void | hapiNetworkDeclarationH (ostream &out, TimedSDFgraph *g) |
void | hapiNetworkDeclarationCC (ostream &out, TimedSDFgraph *g) |
void | hapiMain (ostream &out, TimedSDFgraph *g) |
void | hapiMainCC (ostream &out, TimedSDFgraph *g) |
void | createHapiActor (TimedSDFactor *a) |
void | createHapiNetwork (TimedSDFgraph *g) |
void | createHapiMain (TimedSDFgraph *g) |
void | outputSDFasHAPI (TimedSDFgraph *g) |
Function Documentation
void createHapiActor | ( | TimedSDFactor * | a | ) |
createHapiActor () The function creates files with the names actor type '.cc' and '.h' with the declaration of an actor of the given type.
References SDFactor::getType(), hapiActorDeclarationCC(), hapiActorDeclarationH(), and CString::toLower().
Referenced by outputSDFasHAPI().
void createHapiMain | ( | TimedSDFgraph * | g | ) |
createHapiMain () The function creates a file with the main function to simulate a hapi network.
References hapiMainCC().
Referenced by outputSDFasHAPI().
void createHapiNetwork | ( | TimedSDFgraph * | g | ) |
createHapiNetwork () The function creates a SDF graph in the files '<graph type>="">.cc' and '<>.h'.
References SDFcomponent::getName(), hapiNetworkDeclarationCC(), hapiNetworkDeclarationH(), and CString::toLower().
Referenced by outputSDFasHAPI().
void hapiActorConstructor | ( | ostream & | out, | |
TimedSDFactor * | a | |||
) |
hapiActorConstructor () Output an SDF actor class to the output stream
References c, SDFport::getChannel(), SDFcomponent::getName(), TimedSDFchannel::getTokenType(), SDFport::getType(), SDFactor::getType(), SDFactor::portsBegin(), and SDFactor::portsEnd().
Referenced by hapiActorDeclarationCC().
void hapiActorDeclaration | ( | ostream & | out, | |
TimedSDFactor * | a | |||
) |
hapiActorDelcaration () Output an SDF actor declaration to the output stream
References c, SDFport::getChannel(), SDFcomponent::getName(), TimedSDFchannel::getTokenType(), SDFport::getType(), SDFactor::getType(), SDFactor::portsBegin(), and SDFactor::portsEnd().
Referenced by hapiActorDeclarationH().
void hapiActorDeclarationCC | ( | ostream & | out, | |
TimedSDFactor * | a | |||
) |
hapiActorDelcarationCC () Output an SDF actor defenition to the output stream
References SDFactor::getType(), hapiActorConstructor(), hapiActorMain(), sdfToHapiComment(), and CString::toLower().
Referenced by createHapiActor().
void hapiActorDeclarationH | ( | ostream & | out, | |
TimedSDFactor * | a | |||
) |
hapiActorDelcarationH () Output an SDF actor declaration header file to the output stream
References SDFactor::getType(), hapiActorDeclaration(), sdfToHapiComment(), and CString::toUpper().
Referenced by createHapiActor().
void hapiActorMain | ( | ostream & | out, | |
TimedSDFactor * | a | |||
) |
hapiActorMain () Output an SDF actors main function to the output stream
References c, SDFport::getChannel(), SDFcomponent::getName(), SDFport::getRate(), TimedSDFchannel::getTokenType(), SDFport::getType(), SDFactor::getType(), SDFactor::portsBegin(), and SDFactor::portsEnd().
Referenced by hapiActorDeclarationCC().
void hapiMain | ( | ostream & | out, | |
TimedSDFgraph * | g | |||
) |
hapiMain () The function creates a main function to simulate a hapi network.
References SDFcomponent::getName(), and SDFgraph::getType().
Referenced by hapiMainCC().
void hapiMainCC | ( | ostream & | out, | |
TimedSDFgraph * | g | |||
) |
hapiMainCC () The function creates a main function to simulate a hapi network.
References SDFgraph::getType(), hapiMain(), sdfToHapiComment(), and CString::toLower().
Referenced by createHapiMain().
void hapiNetworkConstructor | ( | ostream & | out, | |
SDFgraph * | g | |||
) |
hapiNetworkConstructor () Output an SDF graph constructor to the output stream
References a, SDFgraph::actorsBegin(), SDFgraph::actorsEnd(), c, SDFgraph::channelsBegin(), SDFgraph::channelsEnd(), SDFport::getChannel(), SDFcomponent::getName(), SDFgraph::getType(), SDFactor::portsBegin(), and SDFactor::portsEnd().
Referenced by hapiNetworkDeclarationCC().
void hapiNetworkDeclaration | ( | ostream & | out, | |
TimedSDFgraph * | g | |||
) |
hapiNetworkDelcaration () Output an SDF graph declaration to the output stream
References a, SDFgraph::actorsBegin(), SDFgraph::actorsEnd(), c, SDFgraph::channelsBegin(), SDFgraph::channelsEnd(), SDFcomponent::getName(), TimedSDFchannel::getTokenType(), SDFactor::getType(), and SDFgraph::getType().
Referenced by hapiNetworkDeclarationH().
void hapiNetworkDeclarationCC | ( | ostream & | out, | |
TimedSDFgraph * | g | |||
) |
hapiNetworkDeclarationCC () Output an SDF graph declaration to the output stream
References SDFgraph::getType(), hapiNetworkConstructor(), sdfToHapiComment(), and CString::toLower().
Referenced by createHapiNetwork().
void hapiNetworkDeclarationH | ( | ostream & | out, | |
TimedSDFgraph * | g | |||
) |
hapiNetworkDelcarationH () Output an SDF graph header to the output stream
References a, SDFgraph::actorsBegin(), SDFgraph::actorsEnd(), SDFactor::getType(), SDFgraph::getType(), hapiNetworkDeclaration(), sdfToHapiComment(), CString::toLower(), and CString::toUpper().
Referenced by createHapiNetwork().
void outputSDFasHAPI | ( | TimedSDFgraph * | g | ) |
outputSDFasHAPI () The function translates an SDF graph to an HAPI network.
References a, SDFgraph::actorsBegin(), SDFgraph::actorsEnd(), createHapiActor(), createHapiMain(), and createHapiNetwork().
Referenced by printSDFG().
void sdfToHapiComment | ( | ostream & | out | ) |
sdfToHapiComment () The function outputs a comment string with the tool name.
Referenced by hapiActorDeclarationCC(), hapiActorDeclarationH(), hapiMainCC(), hapiNetworkDeclarationCC(), and hapiNetworkDeclarationH().