UsesMyStringSkel.C


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

bool UsesMyStringSkel::registerFlag = false;

int UsesMyStringSkel :: sendMyString(MyString *myString) {
  for(vector::iterator iter = providerList.begin();
      iter != providerList.end();  
      iter++) {
    Port *pidl = *iter;
    int dummy;
    if ((*pidl).skp) {
      hpcxx_minvoke((HPCxx_GlobalPtr *)(*pidl).skp, dummy, SEND_MY_STRING_ID, *event);
    } else {
      cout << "UsesMyStringSkel::sendMyString::Unbound ProvidesPort Proxy !! \n";
    }
  }
  return 0;
}


void UsesMyStringSkel::registerSelf () {
  if (!registerFlag) {
    registerFlag = true;
    registerUsesPortType("MyString_idl", *(new UsesMyStringSkel()));
  }
}

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


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