Lumiera  0.pre.03
»edit your freedom«
nop-job-functor.hpp
Go to the documentation of this file.
1 /*
2  NOP-JOB-FUNCTOR.hpp - a render job to do nothing
3 
4  Copyright (C)
5  2023, 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_NOP_JOB_FUNCTOR_H
26 #define VAULT_GEAR_NOP_JOB_FUNCTOR_H
27 
28 
29 
30 #include "lib/hash-standard.hpp"
31 #include "lib/hash-combine.hpp"
32 #include "lib/time/timevalue.hpp"
33 #include "vault/gear/job.h"
34 
35 #include <string>
36 
37 
38 namespace vault{
39 namespace gear {
40 
41  using lib::time::Time;
42  using lib::HashVal;
43 
44 
50  : public JobClosure
51  {
52 
53  /* === JobFunctor Interface === */
54 
55  JobKind
56  getJobKind() const
57  {
58  return META_JOB;
59  }
60 
61  std::string
62  diagnostic() const override
63  {
64  return "NopJobFunctor";
65  }
66 
68  buildInstanceID (HashVal) const override
69  {
70  return InvocationInstanceID();
71  }
72 
73  size_t
74  hashOfInstance (InvocationInstanceID invoKey) const override
75  {
76  std::hash<size_t> hashr;
77  HashVal res = hashr (invoKey.frameNumber);
78  lib::hash::combine (res, hashr (invoKey.part.t));
79  return res;
80  }
81 
82  void
83  invokeJobOperation (JobParameter) override
84  {
85  /* NOP */
86  }
87 
88  public:
89  NopJobFunctor();
90  };
91 
92 
93 }} // namespace vault::gear
94 #endif /*VAULT_GEAR_NOP_JOB_FUNCTOR_H*/
void combine(size_t &combinedHash, size_t additionalHash)
meld the additional hash value into the given base hash value.
Primary class template for std::hash.
Lumiera&#39;s internal time value datatype.
Definition: timevalue.hpp:299
JobKind
Definition: job.h:62
Helper to use a single extension point for specialised hash functions.
Definition of a render job.
opaque ID attached to each individual job invocation.
Definition: job.h:103
size_t HashVal
a STL compatible hash value
Definition: hash-value.h:52
Interface of the closure for frame rendering jobs.
Definition: job.h:235
render process self organisation
Definition: job.h:66
a family of time value like entities and their relationships.
Vault-Layer implementation namespace root.
Stub/Test implementation of the JobFunctor interface for a render job to do nothing at all ...