CodeSonar C++ API
[For improved navigation, enable JavaScript.]
cs_cfg_edge_set.hpp
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2023, an unpublished work by CodeSecure, Inc.
3  * ALL RIGHTS RESERVED
4  *
5  * Copyright (c) 2013-2023, an unpublished work by GrammaTech, Inc.
6  * ALL RIGHTS RESERVED
7  *
8  * This software is furnished under a license and may be used and
9  * copied only in accordance with the terms of such license and the
10  * inclusion of the above copyright notice. This software or any
11  * other copies thereof may not be provided or otherwise made
12  * available to any other person. Title to and ownership of the
13  * software is retained by CodeSecure, Inc.
14  */
15 
16 #ifndef CS_CFG_EDGE_SET_HPP
17 #define CS_CFG_EDGE_SET_HPP
18 
19 #include "cs_set.hpp"
20 #include "cs_cfg_edge_fwd.hpp"
21 #include "cs_point_decl.hpp"
22 #include "cs_cfg_edge_set.h"
23 
26 #ifndef SWIG
27 namespace cs{
29  inline cs_result cs_cfg_edge_set_iter_first_pair(
30  const cs_const_cfg_edge_set &l_cfg_edge_set,
31  cs_cfg_edge* edge,
32  cs_cfg_edge_set_iter* cfg_edge_set_iter)
33  {
34  return cs_cfg_edge_set_iter_first(&l_cfg_edge_set,
35  &edge->sv,
36  &edge->lbl,
37  cfg_edge_set_iter);
38  }
39 
40  inline cs_result cs_cfg_edge_set_iter_next_pair(
41  cs_cfg_edge* edge,
42  cs_cfg_edge_set_iter* cfg_edge_set_iter)
43  {
44  return cs_cfg_edge_set_iter_next(&edge->sv,
45  &edge->lbl,
46  cfg_edge_set_iter);
47  }
49 }
50 #endif
51 
52 
53 #define CS_SET_IMPL_ID(name) cs_cfg_edge_ ## name
54 #define CS_SET_IMPL_KEY cfg_edge
55 #define CS_SET_IMPL_FIRST cs_cfg_edge_set_iter_first_pair
56 #define CS_SET_IMPL_NEXT cs_cfg_edge_set_iter_next_pair
57 #define CS_SET_IMPL_MUTABLE 1
58 #include "cs_set_impl.hpp"
59 
60 namespace cs{
61  template<>
62  class cglue<cfg_edge_set>
63  {
64  cglue();
65  friend class point;
66  CS_CXX_API_CGLUE_ACCESS_MODIFIER:
67  typedef cs_cfg_edge_set ctype;
68  typedef cfg_edge_set type;
69  static type wrap(const ctype &c, bool frozen)
70  { return type(c, frozen); }
71  static ctype unwrap(const type &c)
72  { return c.unwrap(); }
73  };
74 
89  template<>
90  class set_mixin<cfg_edge_set>{
91  protected:
92  set_mixin(){}
93  };
94 }
95 
96 #endif /* CS_CFG_EDGE_SET_HPP */
Namespace for CodeSonar/CodeSurfer API.
Definition: cs_ast.hpp:33