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

#include "artsmodules.h"

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

Arts::Interface_MIDI_NOTE_base *Arts::Interface_MIDI_NOTE_base::_fromString(const std::string& objectref)
{
	Arts::ObjectReference r;

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

Arts::Interface_MIDI_NOTE_base *Arts::Interface_MIDI_NOTE_base::_fromDynamicCast(const Arts::Object& object)
{
	if(object.isNull()) return 0;

	Arts::Interface_MIDI_NOTE_base *castedObject = (Arts::Interface_MIDI_NOTE_base *)object._base()->_cast(Arts::Interface_MIDI_NOTE_base::_IID);
	if(castedObject) return castedObject->_copy();

	return _fromString(object._toString());
}

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

std::vector<std::string> Arts::Interface_MIDI_NOTE_base::_defaultPortsIn() const {
	std::vector<std::string> ret;
	return ret;
}
std::vector<std::string> Arts::Interface_MIDI_NOTE_base::_defaultPortsOut() const {
	std::vector<std::string> ret;
	return ret;
}

void *Arts::Interface_MIDI_NOTE_base::_cast(unsigned long iid)
{
	if(iid == Arts::Interface_MIDI_NOTE_base::_IID) return (Arts::Interface_MIDI_NOTE_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::Interface_MIDI_NOTE_stub::Interface_MIDI_NOTE_stub()
{
	// constructor for subclasses (don't use directly)
}

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

std::string Arts::Interface_MIDI_NOTE_skel::_interfaceName()
{
	return "Arts::Interface_MIDI_NOTE";
}

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

std::string Arts::Interface_MIDI_NOTE_skel::_interfaceNameSkel()
{
	return "Arts::Interface_MIDI_NOTE";
}

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

Arts::Interface_MIDI_NOTE_skel::Interface_MIDI_NOTE_skel()
{
	_initStream("frequency",&frequency,10);
	_initStream("velocity",&velocity,10);
	_initStream("pressed",&pressed,10);
}

Arts::Object_base* Arts::Interface_MIDI_NOTE::_Creator() {
	return Arts::Interface_MIDI_NOTE_base::_create();
}

unsigned long Arts::Interface_MIDI_NOTE_base::_IID = Arts::MCOPUtils::makeIID("Arts::Interface_MIDI_NOTE");

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

Arts::Synth_STRUCT_KILL_base *Arts::Synth_STRUCT_KILL_base::_fromString(const std::string& objectref)
{
	Arts::ObjectReference r;

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

Arts::Synth_STRUCT_KILL_base *Arts::Synth_STRUCT_KILL_base::_fromDynamicCast(const Arts::Object& object)
{
	if(object.isNull()) return 0;

	Arts::Synth_STRUCT_KILL_base *castedObject = (Arts::Synth_STRUCT_KILL_base *)object._base()->_cast(Arts::Synth_STRUCT_KILL_base::_IID);
	if(castedObject) return castedObject->_copy();

	return _fromString(object._toString());
}

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

std::vector<std::string> Arts::Synth_STRUCT_KILL_base::_defaultPortsIn() const {
	std::vector<std::string> ret;
	ret.push_back("ready");
	return ret;
}
std::vector<std::string> Arts::Synth_STRUCT_KILL_base::_defaultPortsOut() const {
	std::vector<std::string> ret;
	return ret;
}

void *Arts::Synth_STRUCT_KILL_base::_cast(unsigned long iid)
{
	if(iid == Arts::Synth_STRUCT_KILL_base::_IID) return (Arts::Synth_STRUCT_KILL_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::Synth_STRUCT_KILL_stub::Synth_STRUCT_KILL_stub()
{
	// constructor for subclasses (don't use directly)
}

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

std::string Arts::Synth_STRUCT_KILL_skel::_interfaceName()
{
	return "Arts::Synth_STRUCT_KILL";
}

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

std::string Arts::Synth_STRUCT_KILL_skel::_interfaceNameSkel()
{
	return "Arts::Synth_STRUCT_KILL";
}

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

Arts::Synth_STRUCT_KILL_skel::Synth_STRUCT_KILL_skel()
{
	_initStream("ready",&ready,9);
}

Arts::Object_base* Arts::Synth_STRUCT_KILL::_Creator() {
	return Arts::Synth_STRUCT_KILL_base::_create();
}

unsigned long Arts::Synth_STRUCT_KILL_base::_IID = Arts::MCOPUtils::makeIID("Arts::Synth_STRUCT_KILL");

static Arts::IDLFileReg IDLFileReg_artsmodules("artsmodules",
    "IDLFile:00000001000000000000000000000000020000001a417274733a3a496e7465"
    "72666163655f4d4944495f4e4f5445000000000100000012417274733a3a53796e7468"
    "4d6f64756c650000000000000000030000000a6672657175656e63790000000006666c"
    "6f6174000000000a000000000000000976656c6f636974790000000006666c6f617400"
    "0000000a0000000000000008707265737365640000000006666c6f6174000000000a00"
    "000000000000000000000000000018417274733a3a53796e74685f5354525543545f4b"
    "494c4c000000000100000012417274733a3a53796e74684d6f64756c65000000000000"
    "0000010000000672656164790000000006666c6f617400000000090000000000000000"
    "0000000000000000"
);
