1 /* Copyright (C) 2021-2024 Free Software Foundation, Inc.
4 This file is part of GNU Binutils.
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 3, or (at your option)
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, 51 Franklin Street - Fifth Floor, Boston,
19 MA 02110-1301, USA. */
24 // A sample selection specifies a set of samples the user is interested in
25 // viewing as a whole.
28 #include "data_pckts.h"
35 FilterNumeric (Experiment
*, const char *, const char *);
38 // set or update the range of items first and last
39 void set_range (uint64_t findex
, uint64_t lindex
, uint64_t total
);
41 // Return a string representation of the current ranges
42 // E.g. "1-5,7,9,10,12-13,73"
45 // Return a string for the current status: %, range, ...
46 // E.g. "100%" "100% [1-7]" "25% [1-4]"
49 char *get_advanced_filter ();
51 // Sets selection according to the string representation
52 // See above for return values and error handling
53 bool set_pattern (char *, bool *);
55 // Return true if "number" is included in selection
56 bool is_selected (uint64_t number
);
76 char *prop_name
; // name in advanced filter
86 void update_status ();
89 // Include "range" in selection
90 bool include_range (uint64_t findex
, uint64_t lindex
);
92 // Parse a number from the string
93 uint64_t get_next_number (char *s
, char **e
, bool *fail
);
96 Vector
<RangePair
*> *items
; // sorted array of items
106 // First and Last items in selection
111 #endif /* _FILTER_H */