2007-09-02 18:48:22 +02:00
|
|
|
/*
|
2008-02-14 04:12:30 +01:00
|
|
|
PIPE.hpp - structural asset denoting a processing pipe generating media output
|
2007-09-02 18:48:22 +02:00
|
|
|
|
2008-03-10 08:38:59 +01:00
|
|
|
Copyright (C) Lumiera.org
|
|
|
|
|
2008, Hermann Vosseler <Ichthyostega@web.de>
|
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
|
|
|
|
|
published by the Free Software Foundation; either version 2 of the
|
|
|
|
|
License, or (at your option) any later version.
|
|
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
2008-02-14 04:12:30 +01:00
|
|
|
#ifndef ASSET_PIPE_H
|
|
|
|
|
#define ASSET_PIPE_H
|
2007-09-02 18:48:22 +02:00
|
|
|
|
|
|
|
|
#include "proc/asset/struct.hpp"
|
2008-01-07 18:16:03 +01:00
|
|
|
#include "proc/asset/procpatt.hpp"
|
2007-09-02 18:48:22 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
namespace asset
|
|
|
|
|
{
|
2008-05-19 08:46:19 +02:00
|
|
|
using lumiera::P;
|
2008-01-12 18:19:37 +01:00
|
|
|
|
2008-02-14 04:12:30 +01:00
|
|
|
class Pipe;
|
2008-05-19 08:46:19 +02:00
|
|
|
typedef P<Pipe> PPipe;
|
2008-01-12 18:19:37 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
template<>
|
2008-02-14 04:12:30 +01:00
|
|
|
class ID<Pipe> : public ID<Struct>
|
2008-01-12 18:19:37 +01:00
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
ID (size_t id);
|
2008-02-14 04:12:30 +01:00
|
|
|
ID (const Pipe&);
|
2008-01-12 18:19:37 +01:00
|
|
|
};
|
2007-09-02 18:48:22 +02:00
|
|
|
|
2008-01-12 18:19:37 +01:00
|
|
|
|
|
|
|
|
|
2007-09-02 18:48:22 +02:00
|
|
|
/**
|
2008-02-14 04:12:30 +01:00
|
|
|
* structural asset corresponding to some
|
|
|
|
|
* processing pipe for generating media output
|
2007-09-02 18:48:22 +02:00
|
|
|
*/
|
2008-02-14 04:12:30 +01:00
|
|
|
class Pipe : public Struct
|
2007-09-02 18:48:22 +02:00
|
|
|
{
|
2008-02-18 04:16:53 +01:00
|
|
|
const string pipeID_;
|
2008-02-13 04:41:58 +01:00
|
|
|
PProcPatt wiringTemplate;
|
2008-01-14 01:01:11 +01:00
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
wstring shortDesc;
|
|
|
|
|
wstring longDesc;
|
|
|
|
|
|
2008-02-14 04:12:30 +01:00
|
|
|
virtual const ID<Pipe>& getID() const ///< @return ID typed to asset::Pipe
|
2008-01-14 01:01:11 +01:00
|
|
|
{
|
2008-02-14 04:12:30 +01:00
|
|
|
return static_cast<const ID<Pipe>& > (Asset::getID());
|
2008-01-14 01:01:11 +01:00
|
|
|
}
|
|
|
|
|
|
2008-01-12 18:19:37 +01:00
|
|
|
|
2008-01-07 18:16:03 +01:00
|
|
|
protected:
|
2008-02-18 04:16:53 +01:00
|
|
|
Pipe (const Asset::Ident&, PProcPatt& wiring, const string& pipeID, wstring shortName =wstring(), wstring longName =wstring()) ;
|
2008-01-12 18:19:37 +01:00
|
|
|
friend class StructFactory;
|
2008-02-10 17:23:16 +01:00
|
|
|
friend class StructFactoryImpl;
|
2008-01-07 18:16:03 +01:00
|
|
|
|
2008-01-14 01:01:11 +01:00
|
|
|
public:
|
2008-02-14 04:12:30 +01:00
|
|
|
const string& getPipeID() const { return pipeID_; }
|
2008-01-14 01:01:11 +01:00
|
|
|
const PProcPatt& getProcPatt() const { return wiringTemplate; }
|
|
|
|
|
|
|
|
|
|
/** use another wiring template. Triggers complete rebuild of the render engine. */
|
|
|
|
|
void switchProcPatt (PProcPatt& another);
|
|
|
|
|
|
2008-02-14 04:12:30 +01:00
|
|
|
/** convienience shortcut for retrieving default configured pipes */
|
|
|
|
|
static PPipe query (string properties) ;
|
2007-09-02 18:48:22 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
2008-01-12 18:19:37 +01:00
|
|
|
// catch up with postponed definition of ID<Struct> ctors...
|
|
|
|
|
//
|
2008-02-14 04:12:30 +01:00
|
|
|
inline ID<Pipe>::ID(size_t id) : ID<Struct> (id) {};
|
|
|
|
|
inline ID<Pipe>::ID(const Pipe& pipe) : ID<Struct> (pipe.getID()) {};
|
2008-01-12 18:19:37 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-09-02 18:48:22 +02:00
|
|
|
|
|
|
|
|
} // namespace asset
|
|
|
|
|
#endif
|