Skip to content

Warren5382/DynamicParser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

try to use the reflection of Protobuf to parse log dynamicly

This Parser has three modules.

Parser taking in charge of parse pb log dynamicly. By excuting a BFS process to get the field value in pb log.

the LogNode is base node struct when BFS a pb log. struct LogNode { std::string name; Descriptor *descriptor; Message *message; FieldDescriptor *field; Reflection *reflection; }

the name is field name; descriptor is message descriptor, we could get is by FindMessageTypeByName(); message is the field value of log. field is the fielddescriptor, we could get is by descriptor->FindFieldByName(); reflection is the reflection of one message. we could get it by message->GetReflection();

The descriptor is a message's type, while the message is value.

Tanslater

Outputer

About

use the reflection of protobuf to parse the log dynamicly

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published