src
Public Member Functions | Static Public Member Functions | Friends | List of all members
re2c::label_t Class Reference

#include <label.h>

Public Member Functions

bool operator< (const label_t &l) const
 
uint32_t width () const
 

Static Public Member Functions

static label_t first ()
 

Friends

class counter_t< label_t >
 
std::ostream & operator<< (std::ostream &o, label_t l)
 

Detailed Description

Definition at line 21 of file label.h.

Member Function Documentation

label_t re2c::label_t::first ( )
static

Definition at line 18 of file label.cc.

19 {
20  return label_t ();
21 }
bool re2c::label_t::operator< ( const label_t l) const

Definition at line 23 of file label.cc.

24 {
25  return value < l.value;
26 }
uint32_t re2c::label_t::width ( ) const

Definition at line 28 of file label.cc.

29 {
30  uint32_t v = value;
31  uint32_t n = 0;
32  while (v /= 10) ++n;
33  return n;
34 }

Here is the caller graph for this function:

Friends And Related Function Documentation

friend class counter_t< label_t >
friend

Definition at line 34 of file label.h.

std::ostream& operator<< ( std::ostream &  o,
label_t  l 
)
friend

Definition at line 36 of file label.cc.

37 {
38  o << l.value;
39  return o;
40 }

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