/*  opsemant.c   */
/*  Copyright 1989 Mountain Math Software  */
/*  All Rights Reserved                    */
#include "portable.h"
#include "debug.h"

#include "intfc.h"
#include "yachead.h"
#include "yacintfc.h"

#include "dfnode.h"
#include "network.h"

#include "opsemant.h"



class ValueType * ConnectSignalSource (ValueType* Op1, struct ValueType* Op2)
{
	UserEntity * EntOp1 = Op1->Value.ValEnt ;
	UserEntity * EntOp2 = Op2->Value.ValEnt ;
	*((ProcessNet*) EntOp1) + *((DfNode*) EntOp2) ;
	State.DoingThis("Connected network ",NameOfObj(Op1)," to signal ",
		NameOfObj(Op2));
	delete Op2;
	return Op1;
}

class ValueType * ConnectNodes(ValueType* Op1, struct ValueType* Op2)
{
	UserEntity * EntOp1 = Op1->Value.ValEnt ;
	UserEntity * EntOp2 = Op2->Value.ValEnt ;
	*((ProcessNet*) EntOp1)  >> *((DfNode*) EntOp2) ;
	State.DoingThis("Connected network ",NameOfObj(Op1)," to node ",
		NameOfObj(Op2));
	delete Op2;
	return Op1;
}
