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) Lumiera.org
5  2023, 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_NOP_JOB_FUNCTOR_H
35 #define VAULT_GEAR_NOP_JOB_FUNCTOR_H
36 
37 
38 
39 #include "lib/hash-standard.hpp"
40 #include "vault/gear/job.h"
41 #include "lib/time/timevalue.hpp"
42 
43 #include <string>
44 
45 
46 namespace vault{
47 namespace gear {
48 
49  using lib::time::Time;
50  using lib::HashVal;
51 
52 
58  : public JobClosure
59  {
60 
61  /* === JobFunctor Interface === */
62 
63  JobKind
64  getJobKind() const
65  {
66  return META_JOB;
67  }
68 
69  std::string
70  diagnostic() const override
71  {
72  return "NopJobFunctor";
73  }
74 
76  buildInstanceID (HashVal) const override
77  {
78  return InvocationInstanceID();
79  }
80 
81  size_t
82  hashOfInstance (InvocationInstanceID invoKey) const override
83  {
84  std::hash<size_t> hashr;
85  HashVal res = hashr (invoKey.frameNumber);
86  lib::hash::combine (res, hashr (invoKey.part.t));
87  return res;
88  }
89 
90  void
91  invokeJobOperation (JobParameter) override
92  {
93  /* NOP */
94  }
95 
96  public:
97  NopJobFunctor();
98  };
99 
100 
101 }} // namespace vault::gear
102 #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.
Definition: hash-value.h:71
Primary class template for std::hash.
Lumiera&#39;s internal time value datatype.
Definition: timevalue.hpp:308
JobKind
Definition: job.h:71
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:112
size_t HashVal
a STL compatible hash value
Definition: hash-value.h:56
Interface of the closure for frame rendering jobs.
Definition: job.h:244
render process self organisation
Definition: job.h:75
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 ...