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

#include "playobjects.h"

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

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

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

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

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

void *AVIPlayObject_base::_cast(unsigned long iid)
{
	if(iid == AVIPlayObject_base::_IID) return (AVIPlayObject_base *)this;
	if(iid == Arts::PlayObject_base::_IID) return (Arts::PlayObject_base *)this;
	if(iid == Arts::PlayObject_private_base::_IID) return (Arts::PlayObject_private_base *)this;
	if(iid == Arts::Object_base::_IID) return (Arts::Object_base *)this;
	return 0;
}

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

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

std::string AVIPlayObject_skel::_interfaceName()
{
	return "AVIPlayObject";
}

bool AVIPlayObject_skel::_isCompatibleWith(const std::string& interfacename)
{
	if (interfacename == "AVIPlayObject") return true;
	if (interfacename == "Arts::PlayObject") return true;
	if (interfacename == "Arts::PlayObject_private") return true;
	if (interfacename == "Arts::Object") return true;
	return false;
}

std::string AVIPlayObject_skel::_interfaceNameSkel()
{
	return "AVIPlayObject";
}

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

AVIPlayObject_skel::AVIPlayObject_skel()
{
}

Arts::Object_base* AVIPlayObject::_Creator() {
	return AVIPlayObject_base::_create();
}

unsigned long AVIPlayObject_base::_IID = Arts::MCOPUtils::makeIID("AVIPlayObject");

static Arts::IDLFileReg IDLFileReg_playobjects("playobjects",
    "IDLFile:00000001000000000000000000000000010000000e415649506c61794f626a"
    "656374000000000100000011417274733a3a506c61794f626a65637400000000000000"
    "0000000000000000000000000000"
);
