P4C
The P4 Compiler
All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
Table::Format Class Reference

Classes

struct  bitrange_t
 
struct  Field
 

Public Member Functions

 Format (Table *, const VECTOR(pair_t) &data, bool may_overlap=false)
 
 Format (Table *t)
 
void add_field (Field &f, std::string name="dummy", int grp=0)
 
void apply_to_field (const std::string &n, std::function< void(Field *)> fn)
 
decltype(fmt[0].begin()) begin (int grp=0)
 
decltype(fmt[0].cbegin()) begin (int grp=0) const
 
decltype(fmt[0].end()) end (int grp=0)
 
decltype(fmt[0].cend()) end (int grp=0) const
 
Fieldfield (const std::string &n, int group=0)
 
std::string find_field (Field *field)
 
int find_field_lineno (Field *field)
 
int get_entries_per_table_word () const
 
int get_mem_units_per_table_word () const
 
int get_padding_format_width () const
 
int get_table_word_width () const
 
const ordered_map< std::string, Field > & group (int g) const
 
unsigned groups () const
 
bool is_wide_format () const
 
void pass1 (Table *tbl)
 
void pass2 (Table *tbl)
 

Public Attributes

Fieldimmed = 0
 
unsigned immed_size = 0
 
int lineno = -1
 
unsigned log2size = 0
 
unsigned overhead_size = 0
 
unsigned overhead_start = 0
 
int overhead_word = -1
 
unsigned size = 0
 
Tabletbl
 

Friends

std::ostream & operator<< (std::ostream &out, const Field &f)