@@ -25,7 +25,6 @@ using namespace cali;
2525
2626struct Expand ::ExpandImpl {
2727 std::set<std::string> m_selected;
28- std::set<std::string> m_deselected;
2928
3029 std::map<std::string, std::string> m_aliases;
3130
@@ -35,23 +34,6 @@ struct Expand::ExpandImpl {
3534
3635 ExpandImpl (OutputStream& os) : m_os(os) {}
3736
38- void parse (const std::string& field_string)
39- {
40- std::vector<std::string> fields;
41-
42- util::split (field_string, ' :' , std::back_inserter (fields));
43-
44- for (const std::string& s : fields) {
45- if (s.size () == 0 )
46- continue ;
47-
48- if (s[0 ] == ' -' )
49- m_deselected.insert (s.substr (1 , std::string::npos));
50- else
51- m_selected.insert (s);
52- }
53- }
54-
5537 void configure (const QuerySpec& spec)
5638 {
5739 switch (spec.select .selection ) {
@@ -83,7 +65,7 @@ struct Expand::ExpandImpl {
8365 for (const Node* node = e.node (); node && node->attribute () != CALI_INV_ID ; node = node->parent ()) {
8466 std::string name = db.get_attribute (node->attribute ()).name ();
8567
86- if ((!m_selected.empty () && m_selected.count (name) == 0 ) || m_deselected. count (name) )
68+ if ((!m_selected.empty () && m_selected.count (name) == 0 ))
8769 continue ;
8870
8971 nodes.push_back (node);
@@ -118,7 +100,7 @@ struct Expand::ExpandImpl {
118100 } else if (e.is_immediate ()) {
119101 std::string name = db.get_attribute (e.attribute ()).name ();
120102
121- if ((!m_selected.empty () && m_selected.count (name) == 0 ) || m_deselected. count (name) )
103+ if ((!m_selected.empty () && m_selected.count (name) == 0 ))
122104 continue ;
123105
124106 {
@@ -139,21 +121,11 @@ struct Expand::ExpandImpl {
139121 }
140122};
141123
142- Expand::Expand (OutputStream& os, const std::string& field_string) : mP { new ExpandImpl (os) }
143- {
144- mP ->parse (field_string);
145- }
146-
147124Expand::Expand (OutputStream& os, const QuerySpec& spec) : mP { new ExpandImpl (os) }
148125{
149126 mP ->configure (spec);
150127}
151128
152- void Expand::operator () (CaliperMetadataAccessInterface& db, const EntryList& list) const
153- {
154- mP ->print (db, list);
155- }
156-
157129void Expand::process_record (CaliperMetadataAccessInterface& db, const EntryList& list)
158130{
159131 mP ->print (db, list);
0 commit comments