2007-09-03 02:33:47 +02:00
/*
DeleteClip ( Test ) - removing an Clip - MObject from the Session
2010-12-17 23:28:49 +01:00
Copyright: clarify and simplify the file headers
* Lumiera source code always was copyrighted by individual contributors
* there is no entity "Lumiera.org" which holds any copyrights
* Lumiera source code is provided under the GPL Version 2+
== Explanations ==
Lumiera as a whole is distributed under Copyleft, GNU General Public License Version 2 or above.
For this to become legally effective, the ''File COPYING in the root directory is sufficient.''
The licensing header in each file is not strictly necessary, yet considered good practice;
attaching a licence notice increases the likeliness that this information is retained
in case someone extracts individual code files. However, it is not by the presence of some
text, that legally binding licensing terms become effective; rather the fact matters that a
given piece of code was provably copyrighted and published under a license. Even reformatting
the code, renaming some variables or deleting parts of the code will not alter this legal
situation, but rather creates a derivative work, which is likewise covered by the GPL!
The most relevant information in the file header is the notice regarding the
time of the first individual copyright claim. By virtue of this initial copyright,
the first author is entitled to choose the terms of licensing. All further
modifications are permitted and covered by the License. The specific wording
or format of the copyright header is not legally relevant, as long as the
intention to publish under the GPL remains clear. The extended wording was
based on a recommendation by the FSF. It can be shortened, because the full terms
of the license are provided alongside the distribution, in the file COPYING.
2024-11-17 23:42:55 +01:00
Copyright ( C )
2008 , Hermann Vosseler < Ichthyostega @ web . de >
2010-12-17 23:28:49 +01:00
Copyright: clarify and simplify the file headers
* Lumiera source code always was copyrighted by individual contributors
* there is no entity "Lumiera.org" which holds any copyrights
* Lumiera source code is provided under the GPL Version 2+
== Explanations ==
Lumiera as a whole is distributed under Copyleft, GNU General Public License Version 2 or above.
For this to become legally effective, the ''File COPYING in the root directory is sufficient.''
The licensing header in each file is not strictly necessary, yet considered good practice;
attaching a licence notice increases the likeliness that this information is retained
in case someone extracts individual code files. However, it is not by the presence of some
text, that legally binding licensing terms become effective; rather the fact matters that a
given piece of code was provably copyrighted and published under a license. Even reformatting
the code, renaming some variables or deleting parts of the code will not alter this legal
situation, but rather creates a derivative work, which is likewise covered by the GPL!
The most relevant information in the file header is the notice regarding the
time of the first individual copyright claim. By virtue of this initial copyright,
the first author is entitled to choose the terms of licensing. All further
modifications are permitted and covered by the License. The specific wording
or format of the copyright header is not legally relevant, as long as the
intention to publish under the GPL remains clear. The extended wording was
based on a recommendation by the FSF. It can be shortened, because the full terms
of the license are provided alongside the distribution, in the file COPYING.
2024-11-17 23:42:55 +01:00
* * Lumiera * * 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 . See the file COPYING for further details .
2010-12-17 23:28:49 +01:00
Copyright: clarify and simplify the file headers
* Lumiera source code always was copyrighted by individual contributors
* there is no entity "Lumiera.org" which holds any copyrights
* Lumiera source code is provided under the GPL Version 2+
== Explanations ==
Lumiera as a whole is distributed under Copyleft, GNU General Public License Version 2 or above.
For this to become legally effective, the ''File COPYING in the root directory is sufficient.''
The licensing header in each file is not strictly necessary, yet considered good practice;
attaching a licence notice increases the likeliness that this information is retained
in case someone extracts individual code files. However, it is not by the presence of some
text, that legally binding licensing terms become effective; rather the fact matters that a
given piece of code was provably copyrighted and published under a license. Even reformatting
the code, renaming some variables or deleting parts of the code will not alter this legal
situation, but rather creates a derivative work, which is likewise covered by the GPL!
The most relevant information in the file header is the notice regarding the
time of the first individual copyright claim. By virtue of this initial copyright,
the first author is entitled to choose the terms of licensing. All further
modifications are permitted and covered by the License. The specific wording
or format of the copyright header is not legally relevant, as long as the
intention to publish under the GPL remains clear. The extended wording was
based on a recommendation by the FSF. It can be shortened, because the full terms
of the license are provided alongside the distribution, in the file COPYING.
2024-11-17 23:42:55 +01:00
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
2007-09-03 02:33:47 +02:00
2017-02-22 01:54:20 +01:00
/** @file deletecliptest.cpp
2017-02-22 03:17:18 +01:00
* * unit test \ ref DeleteClip_test
2016-11-03 18:20:10 +01:00
*/
2007-09-03 02:33:47 +02:00
2008-12-18 04:47:41 +01:00
# include "lib/test/run.hpp"
2018-11-15 23:42:43 +01:00
# include "steam/assetmanager.hpp"
# include "steam/mobject/session.hpp"
# include "steam/mobject/session/testsession1.hpp"
# include "steam/mobject/session/clip.hpp" // TODO: really neded?
2016-01-07 03:58:29 +01:00
# include "lib/format-cout.hpp"
2008-12-18 04:47:41 +01:00
//#include "lib/util.hpp"
2007-09-03 02:33:47 +02:00
2016-01-07 03:58:29 +01:00
//using std::string;
2023-04-25 18:27:16 +02:00
using std : : dynamic_pointer_cast ; //////////////////// TODO only temp
2007-09-03 02:33:47 +02:00
2007-09-27 23:26:54 +02:00
using proc_interface : : AssetManager ;
using proc_interface : : PAsset ;
using proc_interface : : IDA ;
2007-09-03 02:33:47 +02:00
2007-11-14 10:10:52 +01:00
2023-04-25 18:27:16 +02:00
namespace steam {
2009-06-09 09:05:19 +02:00
namespace mobject {
namespace session {
namespace test {
2013-10-24 23:06:36 +02:00
/***************************************************************/ /**
2010-02-22 03:52:52 +01:00
* @ test removing a test clip from the Session / Model .
2009-06-09 09:05:19 +02:00
* @ see mobject : : session : : Clip
2010-02-22 03:52:52 +01:00
* @ see mobject : : Session
*
* @ todo ////////////////////////////////////////////////TICKET #499
2009-06-09 09:05:19 +02:00
*/
class DeleteClip_test : public Test
2007-09-03 02:33:47 +02:00
{
2009-06-09 09:05:19 +02:00
virtual void
run ( Arg )
2007-09-03 02:33:47 +02:00
{
2009-06-09 09:05:19 +02:00
buildTestsession1 ( ) ;
PSess sess = Session : : current ;
AssetManager & aMang = AssetManager : : instance ( ) ;
2010-02-22 03:52:52 +01:00
UNIMPLEMENTED ( " typesafe searching for MObjects in the Session " ) ;
2009-06-09 09:05:19 +02:00
2010-06-25 04:43:06 +02:00
# if false /////////////////////////////////////////////////////////////////////////////////////////////////////TICKET #639 : work out how to search within the Model!!
2009-06-09 09:05:19 +02:00
PClipMO clipPlacement = sess - > currEDL ( ) . find ( SESSION1_CLIP ) ;
2010-02-22 03:52:52 +01:00
// global Var assigned in buildTestsession1()
2009-06-09 09:05:19 +02:00
PMedia media = clipPlacement - > getMedia ( ) ;
IDA clipAID = media - > getID ( ) ;
2010-12-10 02:55:40 +01:00
CHECK ( clipPlacement ) ;
2009-06-09 09:05:19 +02:00
sess - > remove ( clipPlacement ) ;
2010-12-10 02:55:40 +01:00
CHECK ( ! sess - > currEDL ( ) . find ( SESSION1_CLIP ) ) ; // Session forgot the Clip/Placement
CHECK ( ! aMang . known ( clipAID ) ) ; // corresponding Clip Asset has disappeared
CHECK ( ! clipPlacement - > getMedia ( ) ) ; // internal cross-links removed
2010-06-25 04:43:06 +02:00
# endif /////////////////////////////////////////////////////////////////////////////////////////////////////TICKET #639 : work out how to search within the Model!!
2009-06-09 09:05:19 +02:00
}
} ;
2007-11-14 10:10:52 +01:00
2007-09-03 02:33:47 +02:00
2009-06-09 09:05:19 +02:00
/** Register this test class... */
LAUNCHER ( DeleteClip_test , " function session " ) ;
2018-11-15 23:55:13 +01:00
} } } } // namespace steam::mobject::session::test