Ocean
Creator.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) Meta Platforms, Inc. and affiliates.
3  *
4  * This source code is licensed under the MIT license found in the
5  * LICENSE file in the root directory of this source tree.
6  */
7 
8 #ifndef META_OCEAN_CV_SYNTHESIS_CREATOR_H
9 #define META_OCEAN_CV_SYNTHESIS_CREATOR_H
10 
13 
14 namespace Ocean
15 {
16 
17 namespace CV
18 {
19 
20 namespace Synthesis
21 {
22 
23 /**
24  * This class implements the base class for all creators.
25  * A creator uses the current state of the synthesis layer to create any kind of information.<br>
26  * @ingroup cvsynthesis
27  */
28 class Creator : virtual public Operator
29 {
30  public:
31 
32  /**
33  * Invokes the creator and provides the result.
34  * @param worker Optional worker object to distribute the computation
35  * @return True, if succeeded
36  */
37  virtual bool invoke(Worker* worker = nullptr) const = 0;
38 
39  protected:
40 
41  /**
42  * Creates a new creator object.
43  * @param layer The layer that is used to create the information
44  */
45  inline Creator(const Layer& layer);
46 
47  protected:
48 
49  /// Creator layer to be used of information creation.
50  const Layer& layer_;
51 };
52 
53 inline Creator::Creator(const Layer& layer) :
54  layer_(layer)
55 {
56  // nothing to do here
57 }
58 
59 }
60 
61 }
62 
63 }
64 
65 #endif // META_OCEAN_CV_SYNTHESIS_CREATOR_H
This class implements the base class for all creators.
Definition: Creator.h:29
const Layer & layer_
Creator layer to be used of information creation.
Definition: Creator.h:50
Creator(const Layer &layer)
Creates a new creator object.
Definition: Creator.h:53
virtual bool invoke(Worker *worker=nullptr) const =0
Invokes the creator and provides the result.
This class implements the base class for all inpainting layers.
Definition: Layer.h:35
This class is the base class for all image synthesis operators.
Definition: Operator.h:28
This class implements a worker able to distribute function calls over different threads.
Definition: Worker.h:33
The namespace covering the entire Ocean framework.
Definition: Accessor.h:15