00001
00002
00003
00004
00005
00006
00007
00008
00009 #ifndef wireshark_generator_H
00010 #define wireshark_generator_H
00011
00012 #include "dds_generator.h"
00013
00014 class wireshark_generator : public dds_generator {
00015 public:
00016 wireshark_generator()
00017 {}
00018
00019 bool gen_enum(AST_Enum*, UTL_ScopedName* name,
00020 const std::vector<AST_EnumVal*>& contents, const char* repoid);
00021
00022 bool gen_struct(AST_Structure*, UTL_ScopedName* name,
00023 const std::vector<AST_Field*>& fields,
00024 AST_Type::SIZE_TYPE size, const char* repoid);
00025
00026 bool gen_typedef(AST_Typedef*, UTL_ScopedName*, AST_Type*, const char*);
00027
00028 bool gen_union(AST_Union*, UTL_ScopedName*, const std::vector<AST_UnionBranch*>&,
00029 AST_Type*, const char*);
00030
00031 private:
00032 void write_common(UTL_ScopedName* name,
00033 const char* kind,
00034 const char* repoid);
00035
00036 void gen_array(UTL_ScopedName* tdname, AST_Array* arr);
00037 };
00038
00039 #endif