Content-Based Networking Simulation Library Documentation (v. 1.2.1)

Public Types | Public Member Functions

cbnsim::WorkloadParser Class Reference

Class to parse a workload created by cbnwlgen. More...

#include <WorkloadParser.h>

List of all members.

Public Types

enum  TOK {
  AMP, BOOL, COMMA, DOUBLE,
  END, ID, INTEGER, LINK,
  NODE, OP, PIPE, SEMICOLON,
  SIM_LENGTH, STRING, TIME_UNIT, TOK_COUNT
}

Public Member Functions

void add (WorkloadEventParser *ep)
void advance () throw ( parse_exception )
void eat (TOK tok) throw ( parse_exception )
bool eat_bool () throw ( parse_exception )
std::string eat_id () throw ( parse_exception )
int eat_integer () throw ( parse_exception )
double eat_double () throw ( parse_exception )
siena::operator_id eat_op () throw ( parse_exception )
std::string eat_string () throw ( parse_exception )
const std::set< std::pair
< unsigned int, unsigned int > > & 
get_links () const
unsigned int get_link_weight (unsigned int from, unsigned int to) const
unsigned int get_node_count () const
unsigned int get_node_x (unsigned int id) const
unsigned int get_node_y (unsigned int id) const
unsigned int get_sim_length () const
double get_time_unit () const
bool isbool () const
bool isdouble () const
bool isid () const
bool isinteger () const
bool isop () const
bool isstring () const
unsigned int get_link_count () const
const WorkloadEventnext_event () throw ( parse_exception )
void parse_topology () throw ( parse_exception )
void set_istream (std::istream &in)
TOK tok ()
const std::string & val ()

Detailed Description

Class to parse a workload created by cbnwlgen.

This is implemented as a simple recursive-descent parser which makes it amenable to doing an inline parse.


The documentation for this class was generated from the following file: