Lumiera  0.pre.03
»edit your freedom«
scope-cmd.cpp
Go to the documentation of this file.
1 /*
2  ScopeCmd - actual steam command scripts for actions within model scope
3 
4  Copyright (C) Lumiera.org
5  2017, 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 
23 
41 #include "steam/cmd.hpp"
43 //#include "steam/mobject/session.hpp"
44 //#include "lib/symbol.hpp"
45 #include "lib/idi/entry-id.hpp"
46 //#include "lib/format-string.hpp"
47 #include "lib/time/timevalue.hpp"
48 
49 //#include <string>
50 
51 using lib::hash::LuidH;
52 using lib::time::Time;
53 using lib::time::Offset;
54 //using std::string;
55 //using util::cStr;
56 //using util::_Fmt;
57 
58 
59 namespace steam {
60 namespace cmd {
61  namespace error = lumiera::error;
62 
63  //using mobject::Session;
64 
65  namespace { // implementation helper...
66  }//(End) implementation helper
67 
68 
69 
70 
73  COMMAND_DEFINITION (scope_moveRelocateClip)
74  {
75  def.operation ([](LuidH clipID, Offset timeDelta)
76  {
77  UNIMPLEMENTED ("shift a clip by the given timeDelta offset");
78  })
79  .captureUndo ([](LuidH clipID, Offset timeDelta) -> Time
80  {
81  TODO ("actually find out the previous position of the Clip");
82  return Time::ZERO;
83  })
84  .undoOperation ([](LuidH clipID, Offset timeDelta, Time originalPos)
85  {
86  UNIMPLEMENTED ("how to revert shifting a clip. Shall we restore the captured Position or reverse apply the delta??");
87  })
88  ;
89  };
90 
91 
92 
93 
98 }} // namespace steam::cmd
#define COMMAND_DEFINITION(_NAME_)
Macro to write command definitions in a compact form.
Common ID definitions for Steam-Layer commands.
Steam-Layer implementation namespace root.
Lumiera&#39;s internal time value datatype.
Definition: timevalue.hpp:308
Hash implementation based on a lumiera unique object id (LUID) When invoking the default ctor...
Offset measures a distance in time.
Definition: timevalue.hpp:367
Bare symbolic and hash ID used for accounting of asset like entries.
Actually defining a command and binding it to execution parameters.
a family of time value like entities and their relationships.