wireshark_generator.cpp File Reference

#include "wireshark_generator.h"
#include "be_extern.h"
#include "utl_identifier.h"
#include "utl_labellist.h"

Include dependency graph for wireshark_generator.cpp:

Go to the source code of this file.

Functions

void write_field (AST_Field *field)
void write_branch (AST_UnionBranch *branch)

Variables

static std::stringstream orderstrm


Function Documentation

void @96::write_branch ( AST_UnionBranch *  branch  )  [static]

Definition at line 123 of file wireshark_generator.cpp.

References be_global, scoped(), and BE_GlobalData::ws_config_.

Referenced by wireshark_generator::gen_union().

00124   {
00125     const char *label_name = 0;
00126     unsigned long count = branch->label_list_length();
00127     for (unsigned long i = 0; i < count; i++)
00128       {
00129         AST_UnionLabel *label = branch->label(i);
00130         if (label->label_kind() == AST_UnionLabel::UL_default)
00131           {
00132             label_name = "default";
00133             break;
00134           }
00135         label_name = label->label_val()->n()->last_component()->get_string();
00136         orderstrm << label_name << " ";
00137       }
00138 
00139     be_global->ws_config_ << label_name << ".type = \""
00140                           << scoped(branch->field_type()->name()) << "\"\n";
00141     be_global->ws_config_ << label_name << ".name = \""
00142                           << branch->local_name()->get_string() << "\"\n";
00143   }

void @96::write_field ( AST_Field *  field  )  [static]

Definition at line 116 of file wireshark_generator.cpp.

References be_global, scoped(), and BE_GlobalData::ws_config_.

Referenced by wireshark_generator::gen_struct().

00117   {
00118     orderstrm << field->local_name()->get_string() << " ";
00119     be_global->ws_config_ << field->local_name()->get_string() << " = \"";
00120     be_global->ws_config_ << scoped(field->field_type()->name()) << "\"\n";
00121   }


Variable Documentation

std::stringstream orderstrm [static]

Definition at line 114 of file wireshark_generator.cpp.

Referenced by wireshark_generator::gen_struct(), and wireshark_generator::gen_union().


Generated on Fri Feb 12 20:05:52 2016 for OpenDDS by  doxygen 1.4.7