1 // Copyright (C) 2018-2019 Intel Corporation
2 // SPDX-License-Identifier: Apache-2.0
7 #include <builders/ie_layer_builder.hpp>
11 namespace InferenceEngine {
15 * @brief This class defines the basic functional for layer builders
17 class INFERENCE_ENGINE_API_CLASS(LayerDecorator) {
20 * @brief The constructor creates layer builders with layer type and layer name
21 * @param type Layer type
22 * @param name Layer name
24 LayerDecorator(const std::string& type, const std::string& name);
26 * @brief The constructor creates layer builders from reference to generic layer builder
27 * @param layer pointer to generic layer builder
29 explicit LayerDecorator(const Layer::Ptr& layer);
31 * @brief The constructor creates layer builders from reference to generic layer builder
32 * @param layer constant pointer to generic layer builder
34 explicit LayerDecorator(const Layer::CPtr& layer);
36 * @brief The copy constructor
37 * @param rval Source builder
39 LayerDecorator(const LayerDecorator& rval);
42 * @brief Copy operator for LayerDecorator
44 * @return Layer builder
46 LayerDecorator& operator=(const LayerDecorator& rval);
49 * @brief Virtual destructor
51 virtual ~LayerDecorator() = default;
54 * @brief The operator creates generic builder
55 * @return Generic builder
57 virtual operator Layer() const;
60 * @brief The operator creates generic builder
61 * @return Pointer to generic builder
63 virtual operator Layer::Ptr();
66 * @brief The operator creates generic builder
67 * @return Constant pointer to generic builder
69 virtual operator Layer::CPtr() const;
72 * @brief Returns layer type
75 const std::string& getType() const;
77 * @brief Returns layer name
80 const std::string& getName() const;
83 Layer::Ptr& getLayer();
84 const Layer::CPtr getLayer() const;
85 void checkType(const std::string& type) const;
93 } // namespace Builder
95 } // namespace InferenceEngine