ceta::op_t Class Reference

List of all members.

Detailed Description

Operator in a many-kinded signature.
Examples:

example1.cc.

Definition at line 156 of file ta.hh.

Public Types

typedef std::vector< kind_t
>::const_iterator 
input_iterator
 Type of constant random-access iterator that is used to iterate through the input kinds of an operator.

Public Member Functions

template<typename InputIterator>
 op_t (const std::string &name, InputIterator inputs_begin, InputIterator inputs_end, const kind_t &output)
 Constructs a new operator.

Friends

const std::string & name (const op_t &op)
 Returns the name of this operator.
const op_t::input_iterator inputs_begin (const op_t &op)
 Returns iterator that points to first input kind of the operator.
const op_t::input_iterator inputs_end (const op_t &op)
 Returns iterator that points one past the last input kind of the operator.
const kind_toutput (const op_t &op)
 Returns the output kind of this operator.
bool operator== (const op_t &lhs, const op_t &rhs)
 Returns true if lhs is the same operator as rhs.
bool operator< (const op_t &lhs, const op_t &rhs)
 Compares two operators based on address of implementation.

Related Functions

(Note that these are not member functions.)

bool operator!= (const op_t &lhs, const op_t &rhs)
 Returns true if lhs does not equal rhs.
const kind_tinput (const op_t &op, size_t i)
 Returns the ith input kind for operator.
size_t input_count (const op_t &op)
 Returns number of inputs for operator.
bool is_constant (const op_t &op)
 Returns true if op is a constant.
bool is_binary (const op_t &op)
 Returns true if op takes two args with same kind as output kind.
op_t make_constant (const std::string &name, const kind_t &output)
 Constructs a constant operator.
op_t make_unary_op (const std::string &name, const kind_t &input1, const kind_t &output)
 Constructs a unary operator.
op_t make_binary_op (const std::string &name, const kind_t &input1, const kind_t &input2, const kind_t &output)
 Constructs a binary operator.
std::ostream & operator<< (std::ostream &o, const op_t &op)
 Writes the operator's identifier to the output stream.
rule_t make_constant_rule (const op_t &lhs_op, const state_t &rhs)
 Constructs a rule for a constant symbol.
rule_t make_unary_rule (const op_t &lhs_op, const state_t &lhs, const state_t &rhs)
 Constructs a rule for a unary symbol.
rule_t make_binary_rule (const op_t &lhs_op, const state_t &lhs1, const state_t &lhs2, const state_t &rhs)
 Constructs a rule for a binary symbol.


Constructor & Destructor Documentation

template<typename InputIterator>
ceta::op_t::op_t const std::string &  name,
InputIterator  inputs_begin,
InputIterator  inputs_end,
const kind_t output
[inline]
 

Constructs a new operator.

Parameters:
name Name of operator.
inputs_begin An input iterator that points to first the input kind.
inputs_end An input iterator that points one past the last input kind.
output Output kind of operator.

Definition at line 173 of file ta.hh.


The documentation for this class was generated from the following file:
Generated on Fri Mar 3 14:38:58 2006 for libceta by  doxygen 1.4.6