LUMIERA.clone/src/proc/mobject/session/binding.hpp

77 lines
2.1 KiB
C++
Raw Normal View History

/*
BINDING.hpp - link to use a sequence within the session
2010-12-17 23:28:49 +01:00
Copyright (C) Lumiera.org
2009, Hermann Vosseler <Ichthyostega@web.de>
2010-12-17 23:28:49 +01: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.
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
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
*/
#ifndef PROC_MOBJECT_SESSION_BINDING_H
#define PROC_MOBJECT_SESSION_BINDING_H
#include "proc/mobject/session/meta.hpp"
2010-03-27 16:26:22 +01:00
#include "proc/mobject/builder/buildertool.hpp"
namespace proc {
2010-03-28 05:14:57 +02:00
namespace asset {
class Sequence;
typedef lib::P<Sequence> PSequence;
2010-03-28 05:14:57 +02:00
}
namespace mobject {
namespace session {
2010-03-28 05:14:57 +02:00
using asset::PSequence;
2010-03-27 16:26:22 +01:00
/**
* Explicit link to bind a Sequence (container) to be used within the Session,
* either as contents of a top level Timeline, or as embedded MetaClip.
* Usually, the Placement holding such a Binding also constitutes a scope
* on its own, containing other nested objects.
*/
class Binding : public Meta
{
PSequence boundSequence_;
string
initShortID() const
{
return buildShortID("Binding");
}
2010-03-27 16:26:22 +01:00
bool isValid() const;
public:
2010-03-28 05:14:57 +02:00
Binding (PSequence const& sequence_to_bind);
2010-03-27 16:26:22 +01:00
DEFINE_PROCESSABLE_BY (builder::BuilderTool);
2010-03-27 16:26:22 +01:00
};
} // namespace mobject::session
/** Placement<Binding> defined to be subclass of Placement<Meta> */
template class Placement<session::Binding, session::Meta>;
typedef Placement<session::Binding, session::Meta> PBinding;
}} // namespace proc::mobject
#endif