22 #ifndef __libmidi_port_base_h__
23 #define __libmidi_port_base_h__
31 #ifndef PLATFORM_WINDOWS
73 virtual int read (
byte *buf,
size_t bufsize) = 0;
81 virtual void drain (
int ,
int ) {}
88 return !(write (msg, len, timestamp) == (int) len);
103 return _channel[chn&0x7F];
110 const char *
name ()
const {
return _tagname.c_str(); }
111 bool ok ()
const {
return _ok; }
virtual bool centrally_parsed() const
virtual void parse(samplecnt_t timestamp)=0
virtual int read(byte *buf, size_t bufsize)=0
Channel * channel(channel_t chn)
bool receives_input() const
void init(std::string const &, Flags)
virtual XMLNode & get_state() const
int midimsg(byte *msg, size_t len, timestamp_t timestamp)
const char * name() const
virtual void drain(int, int)
virtual void set_state(const XMLNode &)
Port(std::string const &, Flags)
bool clock(timestamp_t timestamp)
virtual int write(const byte *msg, size_t msglen, timestamp_t timestamp)=0
bool sends_output() const
virtual int selectable() const =0
static std::string state_node_name
void set_centrally_parsed(bool yn)
std::ostream & operator<<(std::ostream &os, const Port &port)
std::list< XMLNode > ports
Descriptor(const XMLNode &)
XMLNode & get_state() const