@@ -144,27 +144,16 @@ indexstoredb_symbol_name(indexstoredb_symbol_t symbol) {
144
144
return obj->value ->getName ().c_str ();
145
145
}
146
146
147
- // / loops through each symbol in the index and calls the receiver function with each symbol
148
- // / @param index an IndexStoreDB object which contains the symbols
149
- // / @param receiver a function to be called for each symbol, the CString of the symbol will be passed in to this function.
150
- // / The function should return a boolean indicating whether the looping should continue.
151
147
bool
152
- indexstoredb_for_each_symbol_name (indexstoredb_index_t index, indexstoredb_symbol_name_receiver receiver) {
153
- // indexSystem has foreachsymbolName.
148
+ indexstoredb_index_symbol_names (indexstoredb_index_t index, indexstoredb_symbol_name_receiver receiver) {
154
149
auto obj = (IndexStoreDBObject<std::shared_ptr<IndexSystem>> *)index;
155
150
return obj->value ->foreachSymbolName ([&](StringRef ref) -> bool {
156
151
return receiver (ref.str ().c_str ());
157
152
});
158
153
}
159
154
160
- // / loops through each canonical symbol that matches the string, perform the passed in function
161
- // / @param index an IndexStoreDB object which contains the symbols
162
- // / @param symbolName the name of the symbol whose canonical occurence should be found
163
- // / @param receiver a function to be called for each canonical occurence,
164
- // / the SymbolOccurenceRef of the symbol will be passed in to this function.
165
- // / The function should return a boolean indicating whether the looping should continue.
166
155
bool
167
- indexstoredb_for_each_canonical_symbol_occurence_by_name (
156
+ indexstoredb_index_canonical_symbol_occurences_by_name (
168
157
indexstoredb_index_t index,
169
158
const char *_Nonnull symbolName,
170
159
indexstoredb_symbol_occurrence_receiver_t receiver)
@@ -175,32 +164,23 @@ indexstoredb_for_each_canonical_symbol_occurence_by_name(
175
164
});
176
165
}
177
166
178
- // / loops through each canonical symbol that matches the pattern, perform the passed in function
179
- // / @param index an IndexStoreDB object which contains the symbols.
180
- // / @param AnchorStart when true, symbol names should only be considered matching when the first characters of the symbol name match the pattern.
181
- // / @param AnchorEnd when true, symbol names should only be considered matching when the first characters of the symbol name match the pattern.
182
- // / @param Subsequence when true, symbols will be matched even if the pattern is not matched contiguously.
183
- // / @param IgnoreCase when true, symbols may be returned even if the case of letters does not match the pattern.
184
- // / @param receiver a function to be called for each canonical occurence that matches the pattern.
185
- // / The SymbolOccurenceRef of the symbol will be passed in to this function.
186
- // / The function should return a boolean indicating whether the looping should continue.
187
167
bool
188
- indexstoredb_for_each_canonical_symbol_occurence_containing_pattern (
168
+ indexstoredb_index_canonical_symbol_occurences_containing_pattern (
189
169
indexstoredb_index_t index,
190
- const char *_Nonnull Pattern ,
191
- bool AnchorStart ,
192
- bool AnchorEnd ,
193
- bool Subsequence ,
194
- bool IgnoreCase ,
170
+ const char *_Nonnull pattern ,
171
+ bool anchorStart ,
172
+ bool anchorEnd ,
173
+ bool subsequence ,
174
+ bool ignoreCase ,
195
175
indexstoredb_symbol_occurrence_receiver_t receiver)
196
176
{
197
177
auto obj = (IndexStoreDBObject<std::shared_ptr<IndexSystem>> *)index;
198
178
return obj->value ->foreachCanonicalSymbolOccurrenceContainingPattern (
199
- Pattern ,
200
- AnchorStart ,
201
- AnchorEnd ,
202
- Subsequence ,
203
- IgnoreCase ,
179
+ pattern ,
180
+ anchorStart ,
181
+ anchorEnd ,
182
+ subsequence ,
183
+ ignoreCase ,
204
184
[&](SymbolOccurrenceRef occur
205
185
) -> bool {
206
186
return receiver (make_object (occur));
0 commit comments