Ocean
CreatorSubset.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_SUBSET_H
9 #define META_OCEAN_CV_SYNTHESIS_CREATOR_SUBSET_H
10 
13 
14 namespace Ocean
15 {
16 
17 namespace CV
18 {
19 
20 namespace Synthesis
21 {
22 
23 /**
24  * This class implements a creator that can be distributed to subsets of the synthesis layer.
25  * @ingroup cvsynthesis
26  */
27 class OCEAN_CV_SYNTHESIS_EXPORT CreatorSubset : virtual public Creator
28 {
29  public:
30 
31  /**
32  * Invokes the creator.
33  * @see Creator::invoke().
34  */
35  bool invoke(Worker* worker = nullptr) const override;
36 
37  protected:
38 
39  /**
40  * Creates a new creator object.
41  * @param layer The layer that is used to create the information
42  */
43  inline CreatorSubset(const Layer& layer);
44 
45  /**
46  * Creates a subset of the information.
47  * @param firstColumn First column to be handled
48  * @param numberColumns Number of columns to be handled
49  * @param firstRow First row to be handled
50  * @param numberRows Number of rows to be handled
51  */
52  virtual void createSubset(const unsigned int firstColumn, const unsigned int numberColumns, const unsigned int firstRow, const unsigned int numberRows) const = 0;
53 };
54 
55 inline CreatorSubset::CreatorSubset(const Layer& layer) :
56  Creator(layer)
57 {
58  // nothing to do here
59 }
60 
61 }
62 
63 }
64 
65 }
66 
67 #endif // META_OCEAN_CV_SYNTHESIS_CREATOR_SUBSET_H
This class implements the base class for all creators.
Definition: Creator.h:29
This class implements a creator that can be distributed to subsets of the synthesis layer.
Definition: CreatorSubset.h:28
bool invoke(Worker *worker=nullptr) const override
Invokes the creator.
virtual void createSubset(const unsigned int firstColumn, const unsigned int numberColumns, const unsigned int firstRow, const unsigned int numberRows) const =0
Creates a subset of the information.
CreatorSubset(const Layer &layer)
Creates a new creator object.
Definition: CreatorSubset.h:55
This class implements the base class for all inpainting layers.
Definition: Layer.h:35
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