Blame view

3rdparty/opencv-4.5.4/modules/gapi/src/api/gnode.hpp 1.25 KB
f4334277   Hu Chunming   提交3rdparty
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
  // This file is part of OpenCV project.
  // It is subject to the license terms in the LICENSE file found in the top-level directory
  // of this distribution and at http://opencv.org/license.html.
  //
  // Copyright (C) 2018 Intel Corporation
  
  
  #ifndef OPENCV_GAPI_GNODE_HPP
  #define OPENCV_GAPI_GNODE_HPP
  
  #include <memory> // std::shared_ptr
  
  namespace cv {
  
  class GCall;
  
  // TODO Move "internal" namespace
  // TODO Expose details?
  
  // This class won't be public
  
  // data GNode = Call Operation [GNode]
  //            | Const <T>
  //            | Param <GMat|GParam>
  
  class GNode
  {
  public:
      class Priv;
  
      // Constructors
      GNode();                               // Empty (invalid) constructor
      static GNode Call (const GCall &c);    // Call constructor
      static GNode Param();                  // Param constructor
      static GNode Const();
  
      // Internal use only
      Priv& priv();
      const Priv& priv() const;
      enum class NodeShape: unsigned int;
  
      const NodeShape& shape() const;
      const GCall&     call()  const;
  
  protected:
      struct ParamTag {};
      struct ConstTag {};
  
      explicit GNode(const GCall &c);
      explicit GNode(ParamTag unused);
      explicit GNode(ConstTag unused);
  
      std::shared_ptr<Priv> m_priv;
  };
  
  }
  
  #endif // OPENCV_GAPI_GNODE_HPP