2009-06-06 06:18:37 +02:00
|
|
|
/*
|
|
|
|
|
SessionImpl - holds the complete session data to be edited by the user
|
|
|
|
|
|
|
|
|
|
Copyright (C) Lumiera.org
|
|
|
|
|
2008, Hermann Vosseler <Ichthyostega@web.de>
|
|
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
|
|
* *****************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#include "proc/mobject/session/session-impl.hpp"
|
2009-12-17 03:16:08 +01:00
|
|
|
#include "proc/mobject/session/mobjectfactory.hpp"
|
2009-06-06 06:18:37 +02:00
|
|
|
#include "proc/mobject/placement.hpp"
|
2009-12-16 04:54:36 +01:00
|
|
|
#include "proc/mobject/mobject.hpp"
|
2009-06-06 06:18:37 +02:00
|
|
|
#include "lib/error.hpp"
|
|
|
|
|
|
|
|
|
|
namespace mobject {
|
|
|
|
|
namespace session {
|
|
|
|
|
|
2009-11-09 07:35:08 +01:00
|
|
|
|
|
|
|
|
|
2009-06-06 06:18:37 +02:00
|
|
|
/** create a new empty session with default values.
|
|
|
|
|
* @note any exception arising while creating this
|
|
|
|
|
* default session will inevitably halt the
|
|
|
|
|
* system (and this is desirable)
|
|
|
|
|
*/
|
2009-11-09 07:35:08 +01:00
|
|
|
SessionImpl::SessionImpl ()
|
2010-03-09 06:31:07 +01:00
|
|
|
: SessionInterfaceModules()
|
|
|
|
|
, Session( defaultsManager_
|
|
|
|
|
, timelineRegistry_
|
|
|
|
|
, sequenceRegistry_ )
|
|
|
|
|
, contents_( MObject::create (defaultsManager_))
|
|
|
|
|
, fixture_(new Fixture)
|
2009-06-06 06:18:37 +02:00
|
|
|
{
|
2010-01-07 08:28:54 +01:00
|
|
|
INFO (session, "new Session created.");
|
2009-06-06 06:18:37 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** @internal used by SessionManager#clear
|
2010-02-22 03:52:52 +01:00
|
|
|
* discard all Session content,
|
|
|
|
|
* without touching global configuration.
|
2009-06-06 06:18:37 +02:00
|
|
|
*/
|
|
|
|
|
void
|
|
|
|
|
SessionImpl::clear ()
|
|
|
|
|
{
|
|
|
|
|
try
|
|
|
|
|
{
|
2010-02-22 03:52:52 +01:00
|
|
|
//////////////////////////////////////////////////////////////////////////TICKET #496
|
2009-06-06 06:18:37 +02:00
|
|
|
}
|
|
|
|
|
catch (...)
|
|
|
|
|
{
|
2010-02-22 03:52:52 +01:00
|
|
|
throw lumiera::error::Fatal ("unexpected exception while clearing the session"); ///////////TODO still required??
|
2009-06-06 06:18:37 +02:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bool
|
|
|
|
|
SessionImpl::isValid ()
|
|
|
|
|
{
|
|
|
|
|
UNIMPLEMENTED ("session self test");
|
|
|
|
|
return false; // TODO
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2010-03-28 05:15:45 +02:00
|
|
|
MObjectRef
|
2010-03-09 06:31:07 +01:00
|
|
|
SessionImpl::attach (PMO& placement)
|
2009-06-06 06:18:37 +02:00
|
|
|
{
|
2010-02-22 03:52:52 +01:00
|
|
|
UNIMPLEMENTED ("add Placement to the current Session");
|
2009-06-06 06:18:37 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bool
|
2010-03-09 06:31:07 +01:00
|
|
|
SessionImpl::detach (PMO& placement)
|
2009-06-06 06:18:37 +02:00
|
|
|
{
|
2010-02-22 03:52:52 +01:00
|
|
|
UNIMPLEMENTED ("search and remove a given Placement from current Session");
|
2009-06-06 06:18:37 +02:00
|
|
|
return false; // TODO
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2010-03-27 16:26:22 +01:00
|
|
|
MObjectRef
|
|
|
|
|
SessionImpl::getRoot()
|
|
|
|
|
{
|
|
|
|
|
UNIMPLEMENTED ("access and return the model root, packaged as MObject-ref");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-06-06 06:18:37 +02:00
|
|
|
PFix&
|
|
|
|
|
SessionImpl::getFixture ()
|
|
|
|
|
{
|
2010-03-12 01:50:33 +01:00
|
|
|
return fixture_;
|
2009-06-06 06:18:37 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
|
SessionImpl::rebuildFixture ()
|
|
|
|
|
{
|
|
|
|
|
UNIMPLEMENTED ("rebuild Fixture");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}} // namespace mobject::session
|