Lumiera  0.pre.03
»edit your freedom«
scheduler-frontend.hpp
Go to the documentation of this file.
1 /*
2  SCHEDULER-FRONTEND.hpp - access point to the scheduler within the renderengine
3 
4  Copyright (C)
5  2011, 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 
25 #ifndef VAULT_GEAR_SCHEDULER_FRONTEND_H
26 #define VAULT_GEAR_SCHEDULER_FRONTEND_H
27 
28 
29 
30 #include "lib/depend.hpp"
31 #include "lib/time/timevalue.hpp"
32 #include "vault/gear/job.h"
33 
34 
35 namespace vault{
36 namespace gear {
37 
38  using lib::time::Time;
39 
40 
59  {
60  public:
66 
67 
76  {
77  SchedulerFrontend* sched_;
78 
79 
81  : sched_(s)
82  { }
83 
84  friend class SchedulerFrontend;
85 
86  // using default copy operations
87 
88 
89  public:
96  void
98  {
99  UNIMPLEMENTED ("feed all the attached jobs and transactions to the scheduler");
100  }
101 
105  addJob (Time deadline, Job const& job)
106  {
107  UNIMPLEMENTED ("a mock implementation for adding a single job; change this later to talk to the real scheduler");
108  return *this;
109  }
110 
113  addBackground (Job const& job)
114  {
115  UNIMPLEMENTED ("a mock implementation for adding a single background job; change this later to talk to the real scheduler");
116  return *this;
117  }
118 
124  addFreewheeling (Job const& job)
125  {
126  UNIMPLEMENTED ("a mock implementation for adding a single job for immediate calculation; change this later to talk to the real scheduler");
127  return *this;
128  }
129 
139  attach (JobTransaction const& prerequisites)
140  {
141  UNIMPLEMENTED ("a mock implementation for adding a tree of prerequisite jobs; change this later to talk to the real scheduler");
142  return *this;
143  }
144 
146  startPrerequisiteTx()
147  {
148  return JobTransaction(sched_);
149  }
150 
151  };
152 
153 
155  startJobTransaction()
156  {
157  return JobTransaction(this);
158  }
159 
160 
162 
163 
164  protected:
165  void activateTracing();
166  void disableTracing();
167 
168  friend class SchedulerDiagnostics;
169 
170  private:
171 
172  };
173 
174 }} // namespace vault::gear
175 #endif /*VAULT_GEAR_SCHEDULER_FRONTEND_H*/
Access point to the scheduler service provided by the back-end.
Definition context for jobs to be scheduled.
void activateTracing()
Switch the complete engine into diagnostics mode.
Access point to singletons and other kinds of dependencies designated by type.
Definition: depend.hpp:280
Lumiera&#39;s internal time value datatype.
Definition: timevalue.hpp:299
static lib::Depend< SchedulerFrontend > instance
access point to the Engine Interface.
Render engine diagnostic facility.
JobTransaction & addBackground(Job const &job)
define a job for background rendering.
JobTransaction & addFreewheeling(Job const &job)
define a render job to be calculated as soon as resources permit.
JobTransaction & attach(JobTransaction const &prerequisites)
define a set of prerequisites of the current JobTransaction.
Definition of a render job.
Singleton services and Dependency Injection.
void commit()
finish this set of job definitions.
Individual frame rendering task, forwarding to a closure.
Definition: job.h:268
a family of time value like entities and their relationships.
Vault-Layer implementation namespace root.
JobTransaction & addJob(Time deadline, Job const &job)
define a render job for time-bound calculation