/*	Copyright (C) 2003-2008 Free Electron Organization
	Any use of this software requires a license.  If a valid license
	was not distributed with this file, visit freeelectron.org. */

#include "data/data.pmh"
#include "platform/dlCore.cc"

extern "C"
{

FE_DL_EXPORT fe::Library* CreateLibrary(fe::sp<fe::Master> spMaster)
{
	if(!spMaster->cataloged("path:media"))
	{
		fe::String mediaPath=fe::String("${FE_MEDIA}").substituteEnv();
		if(mediaPath.empty())
		{
			mediaPath="${FE_ROOT}/../media";
		}
		spMaster->catalog<fe::String>("path:media")=mediaPath.substituteEnv();
	}

	fe::Library *pLibrary = new fe::Library();
	pLibrary->add<fe::SegmentStore>("StoreI.SegmentStore.fe");
	pLibrary->add<fe::Scope>("Scope.Scope.fe");
	pLibrary->add<fe::data::AsciiFileStream>("FileStreamI.Ascii.fe");
	pLibrary->add<fe::data::BinaryFileStream>("FileStreamI.Binary.fe");

	pLibrary->add<fe::AsSystem>("PopulateI.AsSystem.fe");
	pLibrary->add<fe::AsSequenceSignal>("PopulateI.AsSequenceSignal.fe");
	pLibrary->addSingleton<fe::RecordCookbook>("Component.RecordCookbook.fe");
	return pLibrary;
}

}

