|
basix_doc 0.1
|
Definition at line 26 of file composite_port.cpp.
| composite_port_rep | ( | const vector< port > & | p2, |
| const vector< string > & | n2 | ||
| ) | [inline] |
Definition at line 120 of file composite_port.cpp.
:
ps (p2), names (n2) {}
| port accept | ( | ) | [virtual, inherited] |
Reimplemented in socket_port_rep.
Definition at line 87 of file port.cpp.
References ERROR, port_rep::expression(), mmx::lf, and mmx::mmerr.
{
mmerr << "port= " << expression () << lf;
ERROR ("socket server port expected");
}
| bool busy | ( | ) | [inline, virtual] |
Reimplemented from port_rep.
Definition at line 62 of file composite_port.cpp.
References mmx::busy(), and mmx::N().
| nat can_read | ( | ) | [inline, virtual] |
Reimplemented from port_rep.
Definition at line 75 of file composite_port.cpp.
References mmx::can_read(), mmx::is_input_port(), and mmx::N().
{
nat r= 0;
for (nat i=0; i<N(ps); i++)
if (mmx::is_input_port (ps[i]))
r += mmx::can_read (ps[i]);
return r;
}
| nat can_write | ( | ) | [inline, virtual] |
Reimplemented from port_rep.
Definition at line 68 of file composite_port.cpp.
References mmx::can_write(), mmx::is_output_port(), mmx::min(), and mmx::N().
{
nat r= (nat) (-1);
for (nat i=0; i<N(ps); i++)
if (mmx::is_output_port (ps[i]))
r= min (r, mmx::can_write (ps[i]));
return r;
}
| bool error_flag | ( | ) | [inline, virtual] |
Reimplemented from port_rep.
Definition at line 50 of file composite_port.cpp.
References mmx::error_flag(), and mmx::N().
{
for (nat i=0; i<N(ps); i++)
if (mmx::error_flag (ps[i]))
return true;
return false;
}
| string error_message | ( | ) | [inline, virtual] |
Reimplemented from port_rep.
Definition at line 56 of file composite_port.cpp.
References mmx::error_flag(), mmx::error_message(), and mmx::N().
{
for (nat i=0; i<N(ps); i++)
if (mmx::error_flag (ps[i]))
return mmx::error_message (ps[i]);
return "";
}
| syntactic expression | ( | ) | const [inline, virtual] |
Implements port_rep.
Definition at line 31 of file composite_port.cpp.
References mmx::flatten(), mmx::GEN_TYPE, mmx::N(), and mmx::syn().
| void flush | ( | ) | [inline, virtual] |
Reimplemented from port_rep.
Definition at line 98 of file composite_port.cpp.
References mmx::flush(), mmx::is_output_port(), and mmx::N().
{
for (nat i=0; i<N(ps); i++)
if (mmx::is_output_port (ps[i]))
mmx::flush (ps[i]);
}
| void format | ( | const print_format & | fm | ) | [virtual, inherited] |
Reimplemented in formatting_port_rep.
Definition at line 99 of file port.cpp.
References ERROR, port_rep::expression(), mmx::lf, and mmx::mmerr.
{
mmerr << "port= " << expression () << lf;
ERROR ("formatting port expected");
}
| bool is_input_port | ( | ) | [inline, virtual] |
Reimplemented from port_rep.
Definition at line 44 of file composite_port.cpp.
References mmx::is_input_port(), and mmx::N().
{
for (nat i=0; i<N(ps); i++)
if (mmx::is_input_port (ps[i]))
return true;
return false;
}
| bool is_output_port | ( | ) | [inline, virtual] |
Reimplemented from port_rep.
Definition at line 38 of file composite_port.cpp.
References mmx::is_output_port(), and mmx::N().
{
for (nat i=0; i<N(ps); i++)
if (mmx::is_output_port (ps[i]))
return true;
return false;
}
| void read | ( | char * | s, |
| nat | n | ||
| ) | [inline, virtual] |
Reimplemented from port_rep.
Definition at line 87 of file composite_port.cpp.
References ASSERT, mmx::can_read(), mmx::is_input_port(), mmx::min(), and mmx::N().
| bool wait | ( | int | msecs | ) | [inline, virtual] |
Reimplemented from port_rep.
Definition at line 103 of file composite_port.cpp.
References mmx::is_input_port(), mmx::min(), mmx::N(), and mmx::wait().
| void write | ( | const char * | s, |
| nat | n | ||
| ) | [inline, virtual] |
Reimplemented from port_rep.
Definition at line 82 of file composite_port.cpp.
References mmx::is_output_port(), mmx::N(), and mmx::write().
{
for (nat i=0; i<N(ps); i++)
if (mmx::is_output_port (ps[i]))
mmx::write (ps[i], s, n);
}