ProvidesEventPortSkel.C



#include "ProvidesMyStringSkel.h"
#include < hpcxx.h >
#include "../PORTS_REGISTRATION_ID.h"
#include "../../ccacore/RegisterType.h"

bool ProvidesMyStringSkel::registerFlag = false;

ProvidesMyStringSkel::ProvidesMyStringSkel(Port *executingPort): PortSkel(executingPort) {}

int ProvidesMyStringSkel :: sendMyString(MyString myString) {
  ProvidesMyString *port = dynamic_cast(portPointer);
  MyString *ms = new MyString(myString);
  int result = port->sendString(ms);
  return result;
}

void ProvidesMyStringSkel::registerSelf () {
  if (!registerFlag) {
    registerFlag = true;

    hpcxx_registerClass((ProvidesMyStringSkel *)NULL);
    hpcxx_register(&ProvidesMyStringSkel::notify, SEND_MY_STRING_ID);
    registerProvidesPortType("MyString_idl", *(new ProvidesMyStringSkel(NULL)));
  }
}

// these methods will not be called
// we never move skels around.
void hpcxx_pack(HPCxx_Buffer& b, ProvidesMyStringSkel* p, int count){}
void hpcxx_unpack(HPCxx_Buffer& b, ProvidesMyStringSkel* p, int count){}


Back to CCA Compliant HPC++ based CCAT Components
mgovinda@cs.indiana.edu
Last modified: Tue Jan 25 14:06:45 EST 2000