Lumiera  0.pre.03
»edit your freedom«
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 "steam/assetmanager.hpp"
32 #include "steam/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 using std::dynamic_pointer_cast;
39 
41 using proc_interface::PAsset;
42 using proc_interface::IDA;
43 
44 
45 
46 namespace steam {
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 steam::mobject::session::test
Steam-Layer Interface: Asset Lookup and Organisation.
Automatically use custom string conversion in C++ stream output.
Definition: run.hpp:49
MObject in the Session to represent a clip on the timeline.
Facade for the Asset subsystem.
static session::SessManager & current
access point to the current Session
Definition: session.hpp:129
Steam-Layer implementation namespace root.
Namespace of Session and user visible high-level objects.
Definition: sequence.hpp:74
static lib::Depend< AssetManager > instance
get at the system-wide asset manager instance.
void buildTestsession1()
Create a Test Session configuration usable for various Tests.
Simple test class runner.
creation, access and Session lifecycle Interface.
Definition: session.hpp:161
Dummy session content prepared for unit test.
Customised refcounting smart pointer template, built upon std::shared_ptr, but forwarding type relati...
Definition: trait.hpp:80
Primary Interface to the current Session.