Lumiera  0.pre.03
»edityourfreedom«
deletecliptest.cpp
Go to the documentation of this file.
1 /*
2  DeleteClip(Test) - removing an Clip-MObject from the Session
3 
4  Copyright (C) Lumiera.org
5  2008, Hermann Vosseler <Ichthyostega@web.de>
6 
7  This program is free software; you can redistribute it and/or
8  modify it under the terms of the GNU General Public License as
9  published by the Free Software Foundation; either version 2 of
10  the License, or (at your option) any later version.
11 
12  This program is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  GNU General Public License for more details.
16 
17  You should have received a copy of the GNU General Public License
18  along with this program; if not, write to the Free Software
19  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 
21 * *****************************************************/
22 
28 #include "lib/test/run.hpp"
29 #include "proc/assetmanager.hpp"
30 #include "proc/mobject/session.hpp"
32 #include "proc/mobject/session/clip.hpp" // TODO: really neded?
33 #include "lib/format-cout.hpp"
34 //#include "lib/util.hpp"
35 
36 
37 //using std::string;
38 
42 
43 using std::dynamic_pointer_cast;
44 
45 
46 namespace proc {
47 namespace mobject {
48 namespace session {
49 namespace test {
50 
51 
52 
53 
54  /***************************************************************/
61  class DeleteClip_test : public Test
62  {
63  virtual void
64  run (Arg)
65  {
67  PSess sess = Session::current;
69 
70  UNIMPLEMENTED("typesafe searching for MObjects in the Session");
71 
72 
73 #if false
74 
75  PClipMO clipPlacement = sess->currEDL().find(SESSION1_CLIP);
76  // global Var assigned in buildTestsession1()
77  PMedia media = clipPlacement->getMedia();
78  IDA clipAID = media->getID();
79  CHECK (clipPlacement);
80 
81  sess->remove (clipPlacement);
82 
83  CHECK (!sess->currEDL().find(SESSION1_CLIP)); // Session forgot the Clip/Placement
84  CHECK (!aMang.known (clipAID)); // corresponding Clip Asset has disappeared
85  CHECK (!clipPlacement->getMedia()); // internal cross-links removed
86 #endif
87  }
88  };
89 
90 
92  LAUNCHER (DeleteClip_test, "function session");
93 
94 
95 
96 }}}} // namespace proc::mobject::session::test
Proc-Layer Interface: Asset Lookup and Organisation.
Automatically use custom string conversion in C++ stream output.
Facade for the Asset subsystem.
const string SESSION1_CLIP("TODO: some sensible way to refer to a clip")
Definition: run.hpp:49
static session::SessManager & current
access point to the current Session
Definition: session.hpp:127
LAUNCHER(PlacementBasic_test, "unit session")
Register this test class...
void buildTestsession1()
Create a Test Session configuration usable for various Tests.
static lib::Depend< AssetManager > instance
get at the system-wide asset manager instance.
MObject in the Session to represent a clip on the timeline.
std::vector< string > & Arg
Definition: run.hpp:54
lib::P< Asset > PAsset
Definition: asset.hpp:123
Simple test class runner.
const ID< Asset > & IDA
Definition: asset.hpp:121
Namespace of Session and user visible high-level objects.
Dummy session content prepared for unit test.
Customised refcounting smart pointer template, built upon std::shared_ptr, but forwarding type relati...
Definition: trait.hpp:76
Primary Interface to the current Session.
Proc-Layer implementation namespace root.
Definition: id-scheme.hpp:63
creation, access and Session lifecycle Interface.
Definition: session.hpp:159