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)
5  2017, Hermann Vosseler <Ichthyostega@web.de>
6 
7   **Lumiera** is free software; you can redistribute it and/or modify it
8   under the terms of the GNU General Public License as published by the
9   Free Software Foundation; either version 2 of the License, or (at your
10   option) any later version. See the file COPYING for further details.
11 
12 * *****************************************************************/
13 
14 
32 #include "steam/cmd.hpp"
34 //#include "steam/mobject/session.hpp"
35 //#include "lib/symbol.hpp"
36 #include "lib/idi/entry-id.hpp"
37 //#include "lib/format-string.hpp"
38 #include "lib/time/timevalue.hpp"
39 
40 //#include <string>
41 
42 using lib::hash::LuidH;
43 using lib::time::Time;
44 using lib::time::Offset;
45 //using std::string;
46 //using util::cStr;
47 //using util::_Fmt;
48 
49 
50 namespace steam {
51 namespace cmd {
52  namespace error = lumiera::error;
53 
54  //using mobject::Session;
55 
56  namespace { // implementation helper...
57  }//(End) implementation helper
58 
59 
60 
61 
64  COMMAND_DEFINITION (scope_moveRelocateClip)
65  {
66  def.operation ([](LuidH clipID, Offset timeDelta)
67  {
68  UNIMPLEMENTED ("shift a clip by the given timeDelta offset");
69  })
70  .captureUndo ([](LuidH clipID, Offset timeDelta) -> Time
71  {
72  TODO ("actually find out the previous position of the Clip");
73  return Time::ZERO;
74  })
75  .undoOperation ([](LuidH clipID, Offset timeDelta, Time originalPos)
76  {
77  UNIMPLEMENTED ("how to revert shifting a clip. Shall we restore the captured Position or reverse apply the delta??");
78  })
79  ;
80  };
81 
82 
83 
84 
89 }} // 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:299
Hash implementation based on a lumiera unique object id (LUID) When invoking the default ctor...
Offset measures a distance in time.
Definition: timevalue.hpp:358
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.