#include "c4d_baseplugin.h"
#include "c4d_memory.h"

BaseData::BaseData(void) 
{
}

BaseData::~BaseData(void) 
{
}

void BaseData::Destructor(void) 
{ 
	delete this; 
}

#define Call(fnc) (this->*C4DOS.Ge->fnc)

void* BasePlugin::GetPluginStructure()
{
	return Call(GetPluginStructure)();
}

LONG BasePlugin::GetInfo()
{
	return Call(GetInfo)();
}

Filename BasePlugin::GetFilename()
{
	return Call(GetFilename)();
}

LONG BasePlugin::GetID()
{
	return Call(GetID)();
}

BasePlugin* FindPlugin(LONG id, LONG type)
{
	return (*C4DOS.Ge->FindPlugin)(id, type);
}

void RemovePlugin(BasePlugin *plug)
{
	(*C4DOS.Ge->RemovePlugin)(plug);
}

BasePlugin*	GetFirstPlugin()
{
	return (*C4DOS.Ge->GetFirstPlugin)();
}

Bool FilterPluginList(AtomArray &arr, LONG type, Bool sortbyname)
{
	return (*C4DOS.Ge->FilterPluginList)(arr, type, sortbyname);
}

void BuildGlobalTagPluginContainer(BaseContainer *plugincontainer,LONG *id)
{
	(*C4DOS.Ge->BuildGlobalTagPluginContainer)(plugincontainer,id);
}

LONG ResolveGlobalTagPluginContainer(LONG *id)
{
	return (*C4DOS.Ge->ResolveGlobalTagPluginContainer)(id);
}

