Template for ConcatComponent.C
#include "ConcatComponent.h"
#include "../../../../framework/ccacore/Port.h"
#include "../../../../framework/ccacore/CCATServicesProxy.h"
#include "../../../../framework/ccacore/RegisterType.h"
#include "../../../../framework/ccacore/FRAMEWORK_REGISTRATION_ID.h"
ConcatComponent::ConcatComponent() {
// It is important that you initialize the
// pointers in your code here
m_core = NULL;
m_myStringPort = new MyStringPort_impl(this);
m_concatParmsPort = new ConcatParmsPort_impl();
m_computing = false;
m_stopped = false;
}
ConcatComponent::~ConcatComponent() {
if (m_core != NULL) {
delete m_core;
}
delete m_myStringPort;
delete m_concatParmsPort;
}
// This method *has* to be implemented
// as part of the inheritance
void
ConcatComponent::setServices(Services *cc) {
// initialize with some error checking
if (cc == NULL) {
assert(m_core != NULL);
delete m_core;
m_core = NULL;
return;
} else {
m_core = cc;
// Register the provides port
// m_myStringPort: instance of the provides port
// that will implement it.
// "inputMyStringPort": unique string name of the port
// "MyString_idl": unique IDL
m_core->addProvidesPort(m_myStringPort,
new DefaultPortInfo("inputMyStringPort", "MyString_idl"));
// m_concatParmsPort: instance of the provides port
// that will implement it.
// "inputConcatParmsPort": unique string name of the port
// "ConcatParms_idl": unique IDL
m_core->addProvidesPort(m_concatParmsPort,
new DefaultPortInfo("inputConcatParmsPort", "ConcatParms_idl"));
}
}
void
ConcatComponent::startComputation(ConcatParms *cp) {
// You might need a method of this kind
}
Back to CCA Compliant HPC++
based CCAT Components
mgovinda@cs.indiana.edu
Last modified: Tue Jan 25 17:28:43 EST 2000