//******************************************************************************
//
// Restricted Rights
// WARNING: This is a restricted distribution Zeligsoft file.
//
//******************************************************************************
//
// Copyright (C) 2006 Zeligsoft Inc. - All Rights Reserved
//

//******************************************************************************
//
//     FILE: zcePushPorts_OctetSeqConsumerProvidesPort.cpp
//
//******************************************************************************


#include "zceOperatingEnvironment.h"

#include "zcePushPorts_OctetSeqConsumerProvidesPort.h"


zcePushPorts_OctetSeqConsumerProvidesPort::zcePushPorts_OctetSeqConsumerProvidesPort( const std::string name, int portIdentifier, zcePushPorts_OctetSeqConsumerPortHandler* cons ZCE_EXC_ENV_ARG )
	 : zceAbstractProvidesPort(name), cons_(cons), portIdentifier_(portIdentifier )
{

	ZCE_ASSERT_EXCEPTION_VOID;
	
}

zcePushPorts_OctetSeqConsumerProvidesPort::~zcePushPorts_OctetSeqConsumerProvidesPort()
{

	//ZCE_ASSERT_EXCEPTION_VOID;
	
}

void zcePushPorts_OctetSeqConsumerProvidesPort::Destroy( ZCE_EXC_ENV_SINGLE_ARG )
{
	ZCE_ASSERT_EXCEPTION_VOID;
	
	if( !destroyed_ )
	{
		destroyed_  = true;

	}
}

/*!	\brief
 *
 *	 Describe operation here.
 * 
 *	\param msg ( ::CF::OctetSequence ) 
 * 
 *	\param options ( ::CF::Properties ) 
 * 
 */
void zcePushPorts_OctetSeqConsumerProvidesPort::processOctetMsg( const CF::OctetSequence& msg, const CF::Properties& options ZCE_EXC_ENV_ARG )
	throw( CORBA::SystemException )
{

	ZCE_ASSERT_EXCEPTION_VOID;
	if ( cons_ == 0)
	{
		ZCE_EXC_THROW ( CORBA::OBJECT_NOT_EXIST,(0, CORBA::COMPLETED_NO) );
	}

	cons_->PushPorts_OctetSeqConsumer_processOctetMsg(portIdentifier_ , msg, options ZCE_EXC_ENV_PARAM );
}




// End-Of-File
//------------------------------------------------------------------------------
