#include "pyInterface.h"
#include "pyNode.h"

using namespace std;

extern "C" ygNode* construct_pyNode(const char* name,bool master) { return new pyNode(name,master); }

struct _pyNodePrivateData
	{
	pyInterface * python;
	};


pyNode::pyNode(const char* name,bool master) : ygNode(name,master)
	{
	setClassName("pyNode");
	p_ = new struct _pyNodePrivateData;
	p_->python = new pyInterface(this);
	}

pyNode::~pyNode(void)
	{
	delete p_->python;
	delete p_;
	}


void pyNode::message(const ygMessage& msg)
	{
	if (p_->python->message(msg))
		;
	else
		ygNode::message(msg);
	}


void pyNode::app(void)
	{
	p_->python->app();
	ygNode::app();
	}
