MCPcopy Create free account
hub / github.com/USBGuard/usbguard / parseUEventFromString

Function parseUEventFromString

src/Library/UEventParser.cpp:128–147  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

126
127 template<class G>
128 void parseUEventFromString(const std::string& uevent_string, UEvent& uevent, bool trace)
129 {
130 try {
131 tao::pegtl::string_input<> in(uevent_string, std::string());
132
133 if (!trace) {
134 tao::pegtl::parse<G, UEventParser::actions>(in, uevent);
135 }
136 else {
137#if TAO_PEGTL_VERSION_MAJOR >= 3
138 tao::pegtl::complete_trace<G, UEventParser::actions>(in, uevent);
139#else
140 tao::pegtl::parse<G, UEventParser::actions, tao::pegtl::tracer>(in, uevent);
141#endif
142 }
143 }
144 catch (...) {
145 throw;
146 }
147 }
148
149 void parseUEventFromString(const std::string& uevent_string, UEvent& uevent, bool attributes_only, bool trace)
150 {

Callers 2

fromStringMethod · 0.85
parseUEventFromFileFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected