CodeSonar C++ API
[For improved navigation, enable JavaScript.]
cs_xref_fwd.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_XREF_FWD_HPP
17 #define CS_XREF_FWD_HPP
18 
19 #include "cs_enum_boilerplate.hpp"
20 
21 #ifdef CSFE_API
22 #error --- frontend should not include this,
23 #endif
24 
25 #include "cs_xref.h"
26 #include "cs_types.hpp"
27 #include "cs_xr_kind_role.hpp"
28 
31 namespace cs{
32 
33  class xr_tuple;
34 
39  CS_FLAGS_BOILERPLATE(xr_def_iter_flags, cs_xref_def_iter_flags,
40  csxrdif_all,
41  "drop_libmodel_defs");
43  static const xr_def_iter_flags NONE;
44 
49  };
50  CS_FLAGS_BOILERPLATE_FRIENDS(xr_def_iter_flags,
51  friend class xr_definition_iterator_policy;
52  friend class sfile;,
54  )
55 #ifdef CS_CPP_IMPL
58 #endif
59 
65  class xr_occ_iter_flags{
66  CS_FLAGS_BOILERPLATE(xr_occ_iter_flags, cs_xref_occ_iter_flags,
67  csxroif_all,
68  "drop_libmodel_defs",
69  "drop_libmodel_occs",
70  "dontcare_complete",
71  "dontcare_def_or_complete",
72  "populate_counters");
74  static const xr_occ_iter_flags NONE;
75 
82 
88 
94 
101 
118  };
119  CS_FLAGS_BOILERPLATE_FRIENDS(xr_occ_iter_flags,
120  friend class xr_occurrence_iterator_policy;
121  friend class xr_homonym_iterator_policy;
122  friend class sfile;,
123  cs
124  )
125 #ifdef CS_CPP_IMPL
130  const xr_occ_iter_flags xr_occ_iter_flags::DONTCARE_DEF_OR_COMPLETE = xr_occ_iter_flags(csxroif_dontcare_def_or_complete);
132 #endif
133 
136  class xr_query_flags{
137  CS_FLAGS_BOILERPLATE(xr_query_flags, cs_xref_query_flags,
138  csxrqf_all,
139  "uniquify",
140  "populate_counters");
142  static const xr_query_flags NONE;
143 
172  static const xr_query_flags UNIQUIFY;
173 
184  static const xr_query_flags POPULATE_COUNTERS;
185  };
186  CS_FLAGS_BOILERPLATE_FRIENDS(xr_query_flags,
187  friend class xr_query_iterator_policy_container;
188  friend class xr_query;,
189  cs
190  )
191 #ifdef CS_CPP_IMPL
193  const xr_query_flags xr_query_flags::UNIQUIFY = xr_query_flags(csxrqf_uniquify);
194  const xr_query_flags xr_query_flags::POPULATE_COUNTERS = xr_query_flags(csxrqf_populate_counters);
195 #endif
196 
197 }
198 
199 #endif /* CS_XREF_FWD_HPP */
static const xr_occ_iter_flags DONTCARE_COMPLETE
Singleton set containing the "don't care about completeness" flag: if two tuples differ only in compl...
Definition: cs_xref_fwd.hpp:103
static const xr_occ_iter_flags POPULATE_COUNTERS
Compute and store tuple counts for later retrieval by xr_occurrence_iterator or xr_homonym_iterator g...
Definition: cs_xref_fwd.hpp:127
Namespace for CodeSonar/CodeSurfer API.
Definition: cs_ast.hpp:33
Flag class: additional properties for an xr_query.
Definition: cs_xref_fwd.hpp:146
static const xr_def_iter_flags DROP_LIBMODEL_DEFS
Singleton set containing the "drop libmodel defs" flag: if a definition is in a library model...
Definition: cs_xref_fwd.hpp:53
static const xr_occ_iter_flags DONTCARE_DEF_OR_COMPLETE
Set containing the "don't care about definition location or completeness" flags: if two tuples differ...
Definition: cs_xref_fwd.hpp:110
cs::xr_occurrence_iterator_policy
Definition: cs_xref.hpp:406
static const xr_occ_iter_flags NONE
Empty set: contains no flags.
Definition: cs_xref_fwd.hpp:82
static const xr_query_flags UNIQUIFY
Singleton set containing the "uniquify" flag: specifies whether and how the query will perform 'uniqu...
Definition: cs_xref_fwd.hpp:187
static const xr_occ_iter_flags DROP_LIBMODEL_DEFS
Singleton set containing the "drop library model definitions" flag: if an occurrence's associated def...
Definition: cs_xref_fwd.hpp:91
cs::xr_homonym_iterator_policy
Definition: cs_xref.hpp:571
static const xr_occ_iter_flags DROP_LIBMODEL_OCCS
Singleton set containing the "drop library model occurrences" flag: if an occurrence is in a library ...
Definition: cs_xref_fwd.hpp:97
Flag class: properties for xr_occurrence_iterator and xr_homonym_iterator iterators.
Definition: cs_xref_fwd.hpp:70
static const xr_query_flags POPULATE_COUNTERS
Singleton set containing the "populate counters" flag: compute and store tuple counts for later retri...
Definition: cs_xref_fwd.hpp:199
A source file.
Definition: cs_sfile_decl.hpp:98
static const xr_def_iter_flags NONE
Empty set: contains no flags.
Definition: cs_xref_fwd.hpp:46
Fully specifies a cross-referencing query over the tokens in an analyzed project. ...
Definition: cs_xref.hpp:1158
cs::xr_definition_iterator_policy
Definition: cs_xref.hpp:352
static const xr_query_flags NONE
Empty set: contains no flags.
Definition: cs_xref_fwd.hpp:155
Flag class: properties for an xr_definition_iterator.
Definition: cs_xref_fwd.hpp:38