2007-09-02 18:48:22 +02:00
|
|
|
/*
|
|
|
|
|
Meta(Asset) - key abstraction: metadata and organisational asset
|
2010-12-17 23:28:49 +01:00
|
|
|
|
2008-03-10 04:25:03 +01:00
|
|
|
Copyright (C) Lumiera.org
|
|
|
|
|
2008, Hermann Vosseler <Ichthyostega@web.de>
|
2010-12-17 23:28:49 +01:00
|
|
|
|
2007-09-02 18:48:22 +02:00
|
|
|
This program is free software; you can redistribute it and/or
|
|
|
|
|
modify it under the terms of the GNU General Public License as
|
2010-12-17 23:28:49 +01:00
|
|
|
published by the Free Software Foundation; either version 2 of
|
|
|
|
|
the License, or (at your option) any later version.
|
|
|
|
|
|
2007-09-02 18:48:22 +02:00
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
GNU General Public License for more details.
|
2010-12-17 23:28:49 +01:00
|
|
|
|
2007-09-02 18:48:22 +02:00
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
|
along with this program; if not, write to the Free Software
|
|
|
|
|
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
2010-12-17 23:28:49 +01:00
|
|
|
|
2007-09-02 18:48:22 +02:00
|
|
|
* *****************************************************/
|
|
|
|
|
|
|
|
|
|
|
2007-09-16 03:02:05 +02:00
|
|
|
#include "proc/assetmanager.hpp"
|
2007-09-02 18:48:22 +02:00
|
|
|
#include "proc/asset/meta.hpp"
|
2008-12-17 17:53:32 +01:00
|
|
|
#include "lib/util.hpp"
|
2007-09-16 03:02:05 +02:00
|
|
|
|
2015-07-02 19:13:50 +02:00
|
|
|
using lib::idi::EntryID;
|
2007-09-02 18:48:22 +02:00
|
|
|
|
2011-12-02 16:10:03 +01:00
|
|
|
namespace proc {
|
2010-12-30 04:30:33 +01:00
|
|
|
namespace asset {
|
|
|
|
|
|
|
|
|
|
using meta::Descriptor;
|
2007-09-02 18:48:22 +02:00
|
|
|
|
2007-09-16 03:02:05 +02:00
|
|
|
namespace // Implementation details
|
|
|
|
|
{
|
|
|
|
|
/** helper: .....*/
|
2010-12-30 04:30:33 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
namespace meta {
|
|
|
|
|
|
2010-12-31 05:59:53 +01:00
|
|
|
Descriptor::~Descriptor() { } // emit VTable here...
|
2010-12-30 04:30:33 +01:00
|
|
|
|
|
|
|
|
}
|
2007-09-16 03:02:05 +02:00
|
|
|
|
|
|
|
|
|
2010-12-30 04:30:33 +01:00
|
|
|
/**storage for the static MetaFactory instance */
|
|
|
|
|
MetaFactory Meta::create;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** Generic factory method for Metadata Asset instances.
|
|
|
|
|
* @param EntryID specifying the type and a human readable name-ID
|
2011-01-15 13:10:02 +01:00
|
|
|
* @return an meta::Builder struct with the metadata parameters. After configuring
|
|
|
|
|
* and tweaking those parameters, the builder's \c commit() function
|
|
|
|
|
* will create a new (immutable) meta asset.
|
2010-12-30 04:30:33 +01:00
|
|
|
*/
|
|
|
|
|
template<class MA>
|
2010-12-31 05:59:53 +01:00
|
|
|
meta::Builder<MA>
|
2011-01-15 13:10:02 +01:00
|
|
|
MetaFactory::operator() (EntryID<MA> elementIdentity)
|
2010-12-30 04:30:33 +01:00
|
|
|
{
|
2011-01-15 13:10:02 +01:00
|
|
|
return meta::Builder<MA> (elementIdentity.getSym());
|
2010-12-30 04:30:33 +01:00
|
|
|
}
|
2007-09-16 03:02:05 +02:00
|
|
|
|
|
|
|
|
|
2010-12-30 04:30:33 +01:00
|
|
|
/** Generic factory method for specialising Metadata.
|
|
|
|
|
* @param prototype Descriptor of a special kind of metadata,
|
|
|
|
|
* to be augmented and further specialised. Can indeed
|
|
|
|
|
* be an existing asset::Meta instance
|
|
|
|
|
* @param EntryID specifying the type and a human readable name-ID
|
2011-01-15 13:10:02 +01:00
|
|
|
* @return an meta::Builder struct with the metadata parameters. After configuring
|
|
|
|
|
* and tweaking those parameters, the builder's \c commit() function
|
|
|
|
|
* will create a new (immutable) meta asset.
|
2007-09-16 03:02:05 +02:00
|
|
|
*/
|
2010-12-30 04:30:33 +01:00
|
|
|
template<class MA>
|
2010-12-31 05:59:53 +01:00
|
|
|
meta::Builder<MA>
|
2010-12-30 04:30:33 +01:00
|
|
|
MetaFactory::operator() (Descriptor const& prototype, EntryID<MA> elementIdentity)
|
2007-09-16 03:02:05 +02:00
|
|
|
{
|
2011-01-15 13:10:02 +01:00
|
|
|
UNIMPLEMENTED ("Meta-Factory: extend or supersede existing meta asset"); ////////////////////TICKET #746
|
2007-09-16 03:02:05 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-12-02 17:50:44 +01:00
|
|
|
}} // namespace proc::asset
|
2010-12-30 04:30:33 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**************************************************/
|
|
|
|
|
/* explicit instantiations of the factory methods */
|
|
|
|
|
/**************************************************/
|
|
|
|
|
|
|
|
|
|
#include "proc/asset/meta/time-grid.hpp"
|
|
|
|
|
//#include "proc/asset/procpatt.hpp"
|
|
|
|
|
//#include "proc/asset/timeline.hpp"
|
|
|
|
|
//#include "proc/asset/sequence.hpp"
|
|
|
|
|
|
|
|
|
|
|
2011-12-02 17:50:44 +01:00
|
|
|
namespace proc {
|
2010-12-30 04:30:33 +01:00
|
|
|
namespace asset {
|
|
|
|
|
|
|
|
|
|
using meta::Descriptor;
|
2010-12-31 05:59:53 +01:00
|
|
|
using meta::Builder;
|
2010-12-30 04:30:33 +01:00
|
|
|
using meta::TimeGrid;
|
|
|
|
|
|
2010-12-31 05:59:53 +01:00
|
|
|
template Builder<TimeGrid> MetaFactory::operator() (EntryID<TimeGrid>);
|
2010-12-30 04:30:33 +01:00
|
|
|
|
2010-12-31 05:59:53 +01:00
|
|
|
template Builder<TimeGrid> MetaFactory::operator() (Descriptor const&, EntryID<TimeGrid>);
|
2010-12-30 04:30:33 +01:00
|
|
|
|
2011-12-02 16:10:03 +01:00
|
|
|
}} // namespace proc::asset
|