CodeSonar C++ API
[For improved navigation, enable JavaScript.]
cs_int_pair.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_INT_PAIR_HPP
17 #define CS_INT_PAIR_HPP
18 
19 #include "cs_ir_boilerplate.hpp"
20 #include "cs_types.hpp"
21 
24 namespace cs{
25  template<>
26  class cglue<int_pair>{
27  friend class mutable_set<int_pair>;
28  friend class set_impl<int_pair>;
29  friend class set_iterator_policy<int_pair>;
30  friend class iterator_adapter<set_iterator_policy<int_pair> >;
31  cglue();
32  public:
33  typedef int_pair type;
34  typedef cs_int_pair ctype;
35  CS_CXX_API_CGLUE_ACCESS_MODIFIER:
36  static int_pair wrap(const cs_int_pair &c)
37  { return int_pair(c.int1, c.int2); }
38 
39  static cs_int_pair unwrap(const int_pair &c)
40  {
41  cs_int_pair rv;
42  rv.int1 = c.first;
43  rv.int2 = c.second;
44  return rv;
45  }
46  };
47 }
48 
49 #endif /* CS_INT_PAIR_HPP */
Namespace for CodeSonar/CodeSurfer API.
Definition: cs_ast.hpp:33
std::pair< csuint32, csuint32 > int_pair
A std::pair of integers, used to represent a range of locations in a compilation unit.
Definition: cs_tplt_instantiations.hpp:70