/* this file was generated by the MCOP idl compiler - DO NOT EDIT */

#include "artseffects.h"

// Implementation
Arts::ExtraStereo_base *Arts::ExtraStereo_base::_create(const std::string& subClass)
{
	Arts::Object_skel *skel = Arts::ObjectManager::the()->create(subClass);
	assert(skel);
	Arts::ExtraStereo_base *castedObject = (Arts::ExtraStereo_base *)skel->_cast(Arts::ExtraStereo_base::_IID);
	assert(castedObject);
	return castedObject;
}

Arts::ExtraStereo_base *Arts::ExtraStereo_base::_fromString(std::string objectref)
{
	Arts::ObjectReference r;

	if(Arts::Dispatcher::the()->stringToObjectReference(r,objectref))
		return Arts::ExtraStereo_base::_fromReference(r,true);
	return 0;
}

Arts::ExtraStereo_base *Arts::ExtraStereo_base::_fromReference(Arts::ObjectReference r, bool needcopy)
{
	Arts::ExtraStereo_base *result;
	result = (Arts::ExtraStereo_base *)Arts::Dispatcher::the()->connectObjectLocal(r,"Arts::ExtraStereo");
	if(result)
	{
		if(!needcopy)
			result->_cancelCopyRemote();
	}
	else
	{
		Arts::Connection *conn = Arts::Dispatcher::the()->connectObjectRemote(r);
		if(conn)
		{
			result = new Arts::ExtraStereo_stub(conn,r.objectID);
			if(needcopy) result->_copyRemote();
			result->_useRemote();
			if (!result->_isCompatibleWith("Arts::ExtraStereo")) {
				result->_release();
				return 0;
			}
		}
	}
	return result;
}

std::vector<std::string> Arts::ExtraStereo_base::_defaultPortsIn() const {
	std::vector<std::string> ret;
	ret.push_back("inleft");
	ret.push_back("inright");
	return ret;
}
std::vector<std::string> Arts::ExtraStereo_base::_defaultPortsOut() const {
	std::vector<std::string> ret;
	ret.push_back("outleft");
	ret.push_back("outright");
	return ret;
}

void *Arts::ExtraStereo_base::_cast(unsigned long iid)
{
	if(iid == Arts::ExtraStereo_base::_IID) return (Arts::ExtraStereo_base *)this;
	if(iid == Arts::StereoEffect_base::_IID) return (Arts::StereoEffect_base *)this;
	if(iid == Arts::SynthModule_base::_IID) return (Arts::SynthModule_base *)this;
	if(iid == Arts::Object_base::_IID) return (Arts::Object_base *)this;
	return 0;
}

Arts::ExtraStereo_stub::ExtraStereo_stub()
{
	// constructor for subclasses (don't use directly)
}

Arts::ExtraStereo_stub::ExtraStereo_stub(Arts::Connection *connection, long objectID)
	: Arts::Object_stub(connection, objectID)
{
	// constructor to create a stub for an object
}

float Arts::ExtraStereo_stub::intensity()
{
	long methodID = _lookupMethodFast("method:0000000f5f6765745f696e74656e736974790000000006666c6f617400000000020000000000000000");
	long requestID;
	Arts::Buffer *request, *result;
	request = Arts::Dispatcher::the()->createRequest(requestID,_objectID,methodID);
	request->patchLength();
	_connection->qSendBuffer(request);

	result = Arts::Dispatcher::the()->waitForResult(requestID,_connection);
	if(!result) return 0.0; // error occured
	float returnCode = result->readFloat();
	delete result;
	return returnCode;
}

void Arts::ExtraStereo_stub::intensity(float newValue)
{
	long methodID = _lookupMethodFast("method:0000000f5f7365745f696e74656e736974790000000005766f696400000000020000000100000006666c6f617400000000096e657756616c7565000000000000000000");
	long requestID;
	Arts::Buffer *request, *result;
	request = Arts::Dispatcher::the()->createRequest(requestID,_objectID,methodID);
	request->writeFloat(newValue);
	request->patchLength();
	_connection->qSendBuffer(request);

	result = Arts::Dispatcher::the()->waitForResult(requestID,_connection);
	if(result) delete result;
}

std::string Arts::ExtraStereo_skel::_interfaceName()
{
	return "Arts::ExtraStereo";
}

bool Arts::ExtraStereo_skel::_isCompatibleWith(const std::string& interfacename)
{
	if (interfacename == "Arts::ExtraStereo") return true;
	if (interfacename == "Arts::StereoEffect") return true;
	if (interfacename == "Arts::SynthModule") return true;
	if (interfacename == "Arts::Object") return true;
	return false;
}

std::string Arts::ExtraStereo_skel::_interfaceNameSkel()
{
	return "Arts::ExtraStereo";
}

// _get_intensity
static void _dispatch_Arts_ExtraStereo_00(void *object, Arts::Buffer *, Arts::Buffer *result)
{
	result->writeFloat(((Arts::ExtraStereo_skel *)object)->intensity());
}

// _set_intensity
static void _dispatch_Arts_ExtraStereo_01(void *object, Arts::Buffer *request, Arts::Buffer *)
{
	float newValue = request->readFloat();
	((Arts::ExtraStereo_skel *)object)->intensity(newValue);
}

void Arts::ExtraStereo_skel::_buildMethodTable()
{
	Arts::Buffer m;
	m.fromString(
        "MethodTable:0000000f5f6765745f696e74656e736974790000000006666c6f61"
        "74000000000200000000000000000000000f5f7365745f696e74656e7369747900"
        "00000005766f696400000000020000000100000006666c6f617400000000096e65"
        "7756616c7565000000000000000000",
		"MethodTable"
	);
	_addMethod(_dispatch_Arts_ExtraStereo_00,this,Arts::MethodDef(m));
	_addMethod(_dispatch_Arts_ExtraStereo_01,this,Arts::MethodDef(m));
	Arts::StereoEffect_skel::_buildMethodTable();
}

Arts::ExtraStereo_skel::ExtraStereo_skel()
{
}

Arts::Object_base* Arts::ExtraStereo::_Creator() {
	return Arts::ExtraStereo_base::_create();
}

unsigned long Arts::ExtraStereo_base::_IID = Arts::MCOPUtils::makeIID("Arts::ExtraStereo");

Arts::VoiceRemoval_base *Arts::VoiceRemoval_base::_create(const std::string& subClass)
{
	Arts::Object_skel *skel = Arts::ObjectManager::the()->create(subClass);
	assert(skel);
	Arts::VoiceRemoval_base *castedObject = (Arts::VoiceRemoval_base *)skel->_cast(Arts::VoiceRemoval_base::_IID);
	assert(castedObject);
	return castedObject;
}

Arts::VoiceRemoval_base *Arts::VoiceRemoval_base::_fromString(std::string objectref)
{
	Arts::ObjectReference r;

	if(Arts::Dispatcher::the()->stringToObjectReference(r,objectref))
		return Arts::VoiceRemoval_base::_fromReference(r,true);
	return 0;
}

Arts::VoiceRemoval_base *Arts::VoiceRemoval_base::_fromReference(Arts::ObjectReference r, bool needcopy)
{
	Arts::VoiceRemoval_base *result;
	result = (Arts::VoiceRemoval_base *)Arts::Dispatcher::the()->connectObjectLocal(r,"Arts::VoiceRemoval");
	if(result)
	{
		if(!needcopy)
			result->_cancelCopyRemote();
	}
	else
	{
		Arts::Connection *conn = Arts::Dispatcher::the()->connectObjectRemote(r);
		if(conn)
		{
			result = new Arts::VoiceRemoval_stub(conn,r.objectID);
			if(needcopy) result->_copyRemote();
			result->_useRemote();
			if (!result->_isCompatibleWith("Arts::VoiceRemoval")) {
				result->_release();
				return 0;
			}
		}
	}
	return result;
}

std::vector<std::string> Arts::VoiceRemoval_base::_defaultPortsIn() const {
	std::vector<std::string> ret;
	ret.push_back("inleft");
	ret.push_back("inright");
	return ret;
}
std::vector<std::string> Arts::VoiceRemoval_base::_defaultPortsOut() const {
	std::vector<std::string> ret;
	ret.push_back("outleft");
	ret.push_back("outright");
	return ret;
}

void *Arts::VoiceRemoval_base::_cast(unsigned long iid)
{
	if(iid == Arts::VoiceRemoval_base::_IID) return (Arts::VoiceRemoval_base *)this;
	if(iid == Arts::StereoEffect_base::_IID) return (Arts::StereoEffect_base *)this;
	if(iid == Arts::SynthModule_base::_IID) return (Arts::SynthModule_base *)this;
	if(iid == Arts::Object_base::_IID) return (Arts::Object_base *)this;
	return 0;
}

Arts::VoiceRemoval_stub::VoiceRemoval_stub()
{
	// constructor for subclasses (don't use directly)
}

Arts::VoiceRemoval_stub::VoiceRemoval_stub(Arts::Connection *connection, long objectID)
	: Arts::Object_stub(connection, objectID)
{
	// constructor to create a stub for an object
}

std::string Arts::VoiceRemoval_skel::_interfaceName()
{
	return "Arts::VoiceRemoval";
}

bool Arts::VoiceRemoval_skel::_isCompatibleWith(const std::string& interfacename)
{
	if (interfacename == "Arts::VoiceRemoval") return true;
	if (interfacename == "Arts::StereoEffect") return true;
	if (interfacename == "Arts::SynthModule") return true;
	if (interfacename == "Arts::Object") return true;
	return false;
}

std::string Arts::VoiceRemoval_skel::_interfaceNameSkel()
{
	return "Arts::VoiceRemoval";
}

void Arts::VoiceRemoval_skel::_buildMethodTable()
{
	Arts::Buffer m;
	m.fromString(
        "MethodTable:",
		"MethodTable"
	);
	Arts::StereoEffect_skel::_buildMethodTable();
}

Arts::VoiceRemoval_skel::VoiceRemoval_skel()
{
}

Arts::Object_base* Arts::VoiceRemoval::_Creator() {
	return Arts::VoiceRemoval_base::_create();
}

unsigned long Arts::VoiceRemoval_base::_IID = Arts::MCOPUtils::makeIID("Arts::VoiceRemoval");

Arts::RawWriter_base *Arts::RawWriter_base::_create(const std::string& subClass)
{
	Arts::Object_skel *skel = Arts::ObjectManager::the()->create(subClass);
	assert(skel);
	Arts::RawWriter_base *castedObject = (Arts::RawWriter_base *)skel->_cast(Arts::RawWriter_base::_IID);
	assert(castedObject);
	return castedObject;
}

Arts::RawWriter_base *Arts::RawWriter_base::_fromString(std::string objectref)
{
	Arts::ObjectReference r;

	if(Arts::Dispatcher::the()->stringToObjectReference(r,objectref))
		return Arts::RawWriter_base::_fromReference(r,true);
	return 0;
}

Arts::RawWriter_base *Arts::RawWriter_base::_fromReference(Arts::ObjectReference r, bool needcopy)
{
	Arts::RawWriter_base *result;
	result = (Arts::RawWriter_base *)Arts::Dispatcher::the()->connectObjectLocal(r,"Arts::RawWriter");
	if(result)
	{
		if(!needcopy)
			result->_cancelCopyRemote();
	}
	else
	{
		Arts::Connection *conn = Arts::Dispatcher::the()->connectObjectRemote(r);
		if(conn)
		{
			result = new Arts::RawWriter_stub(conn,r.objectID);
			if(needcopy) result->_copyRemote();
			result->_useRemote();
			if (!result->_isCompatibleWith("Arts::RawWriter")) {
				result->_release();
				return 0;
			}
		}
	}
	return result;
}

std::vector<std::string> Arts::RawWriter_base::_defaultPortsIn() const {
	std::vector<std::string> ret;
	ret.push_back("inleft");
	ret.push_back("inright");
	return ret;
}
std::vector<std::string> Arts::RawWriter_base::_defaultPortsOut() const {
	std::vector<std::string> ret;
	ret.push_back("outleft");
	ret.push_back("outright");
	return ret;
}

void *Arts::RawWriter_base::_cast(unsigned long iid)
{
	if(iid == Arts::RawWriter_base::_IID) return (Arts::RawWriter_base *)this;
	if(iid == Arts::StereoEffect_base::_IID) return (Arts::StereoEffect_base *)this;
	if(iid == Arts::SynthModule_base::_IID) return (Arts::SynthModule_base *)this;
	if(iid == Arts::Object_base::_IID) return (Arts::Object_base *)this;
	return 0;
}

Arts::RawWriter_stub::RawWriter_stub()
{
	// constructor for subclasses (don't use directly)
}

Arts::RawWriter_stub::RawWriter_stub(Arts::Connection *connection, long objectID)
	: Arts::Object_stub(connection, objectID)
{
	// constructor to create a stub for an object
}

std::string Arts::RawWriter_skel::_interfaceName()
{
	return "Arts::RawWriter";
}

bool Arts::RawWriter_skel::_isCompatibleWith(const std::string& interfacename)
{
	if (interfacename == "Arts::RawWriter") return true;
	if (interfacename == "Arts::StereoEffect") return true;
	if (interfacename == "Arts::SynthModule") return true;
	if (interfacename == "Arts::Object") return true;
	return false;
}

std::string Arts::RawWriter_skel::_interfaceNameSkel()
{
	return "Arts::RawWriter";
}

void Arts::RawWriter_skel::_buildMethodTable()
{
	Arts::Buffer m;
	m.fromString(
        "MethodTable:",
		"MethodTable"
	);
	Arts::StereoEffect_skel::_buildMethodTable();
}

Arts::RawWriter_skel::RawWriter_skel()
{
}

Arts::Object_base* Arts::RawWriter::_Creator() {
	return Arts::RawWriter_base::_create();
}

unsigned long Arts::RawWriter_base::_IID = Arts::MCOPUtils::makeIID("Arts::RawWriter");

static Arts::IDLFileReg IDLFileReg_artseffects("artseffects",
    "IDLFile:000000010000000000000000000000000300000012417274733a3a45787472"
    "6153746572656f000000000100000013417274733a3a53746572656f45666665637400"
    "00000000000000010000000a696e74656e736974790000000006666c6f617400000000"
    "1300000000000000000000000000000013417274733a3a566f69636552656d6f76616c"
    "000000000100000013417274733a3a53746572656f4566666563740000000000000000"
    "00000000000000000000000010417274733a3a52617757726974657200000000010000"
    "0013417274733a3a53746572656f456666656374000000000000000000000000000000"
    "000000000000"
);
