6#ifndef __WVPROTOSTREAM_H
7#define __WVPROTOSTREAM_H
9#include "wvstreamclone.h"
29 Token(
const unsigned char *_data,
size_t _length);
30 void fill(
const unsigned char *_data,
size_t _length);
43 virtual size_t uwrite(
const void *buffer,
size_t size);
46 virtual Token *next_token();
49 virtual TokenList *tokenize();
50 size_t list_to_array(TokenList *tl,
Token **array);
51 Token *tokline(
const char *line);
55 bool case_sensitive =
false);
59 virtual void do_state(
Token &t1);
60 virtual void switch_state(
int newstate);
69 const char *wstype()
const {
return "WvProtoStream"; }
A WvLog stream accepts log messages from applications and forwards them to all registered WvLogRcv's.
WvProtoStream is a framework that makes it easy to communicate using common command-response driven p...
virtual void execute()
pass input through to the state machine, one line at a time
virtual size_t uwrite(const void *buffer, size_t size)
override uwrite() so we can log all output
int tokanal(const Token &t, const char **lookup, bool case_sensitive=false)
Convert token strings to enum values.
WvStreamClone simply forwards all requests to the "cloned" stream.
Unified support for streams, that is, sequences of bytes that may or may not be ready for read/write ...
WvString is an implementation of a simple and efficient printable-string class.
int lookup(const char *str, const char *const *table, bool case_sensitive=false)
Finds a string in an array and returns its index.