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) Lumiera.org
5  2011, 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 
34 #ifndef VAULT_GEAR_SCHEDULER_FRONTEND_H
35 #define VAULT_GEAR_SCHEDULER_FRONTEND_H
36 
37 
38 
39 #include "lib/depend.hpp"
40 #include "lib/time/timevalue.hpp"
41 #include "vault/gear/job.h"
42 
43 
44 namespace vault{
45 namespace gear {
46 
47  using lib::time::Time;
48 
49 
68  {
69  public:
75 
76 
85  {
86  SchedulerFrontend* sched_;
87 
88 
90  : sched_(s)
91  { }
92 
93  friend class SchedulerFrontend;
94 
95  // using default copy operations
96 
97 
98  public:
105  void
107  {
108  UNIMPLEMENTED ("feed all the attached jobs and transactions to the scheduler");
109  }
110 
114  addJob (Time deadline, Job const& job)
115  {
116  UNIMPLEMENTED ("a mock implementation for adding a single job; change this later to talk to the real scheduler");
117  return *this;
118  }
119 
122  addBackground (Job const& job)
123  {
124  UNIMPLEMENTED ("a mock implementation for adding a single background job; change this later to talk to the real scheduler");
125  return *this;
126  }
127 
133  addFreewheeling (Job const& job)
134  {
135  UNIMPLEMENTED ("a mock implementation for adding a single job for immediate calculation; change this later to talk to the real scheduler");
136  return *this;
137  }
138 
148  attach (JobTransaction const& prerequisites)
149  {
150  UNIMPLEMENTED ("a mock implementation for adding a tree of prerequisite jobs; change this later to talk to the real scheduler");
151  return *this;
152  }
153 
155  startPrerequisiteTx()
156  {
157  return JobTransaction(sched_);
158  }
159 
160  };
161 
162 
164  startJobTransaction()
165  {
166  return JobTransaction(this);
167  }
168 
169 
171 
172 
173  protected:
174  void activateTracing();
175  void disableTracing();
176 
177  friend class SchedulerDiagnostics;
178 
179  private:
180 
181  };
182 
183 }} // namespace vault::gear
184 #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:289
Lumiera&#39;s internal time value datatype.
Definition: timevalue.hpp:308
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:277
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