#include <Inventor/cve/SoNetworkP.h>


SoComputerList SoNetworkP::compList;
SoDistributionGroupList SoNetworkP::distribGroupList;
SbList<SbNetListener*> SoNetworkP::listenerList;

int SoNetworkP::numTrReceived = 0;
int SoNetworkP::numTrExecuted;
int SoNetworkP::numTrScheduled;
int SoNetworkP::numMsgReceived;



SbBool SoThisComputer::isThisComputer() const
{
  return TRUE;
}


void SoNetworkP::addComputer(SoComputer *comp)
{
  compList.append(comp);
}


void SoNetworkP::removeComputer(SoComputer *comp)
{
  int index = compList.find(comp);
  compList.removeFast(index);
  if (compList.getLength() == 0)
    compList.truncate(0,1);
}


void SoNetworkP::addListener(SbNetListener *listener)
{
  listenerList.append(listener);
}


void SoNetworkP::removeListener(SbNetListener *listener)
{
  int index = listenerList.find(listener);
  listenerList.removeFast(index);
  if (listenerList.getLength() == 0)
    listenerList.truncate(0,1);
}
