Each Glish client constructs one instance of the Client class by passing the Client constructor the program's argc and argv. When a Glish client is executed by a Glish script argv contains special arguments telling the Client object how to connect the Glish interpreter. So usually the beginning of a Glish client looks like:
int main( int argc, char** argv ) { Client c( argc, argv ); ...The Client constructor removes these special arguments from argv (and correspondingly updates argc) so after the Client object is constructed the program will no longer ``see" the arguments.
The Client class provides four main member functions:
The class also provides variants on PostEvent for sending events
with simple string values (see § 13.5, page , below, for details).
In addition, the class provides access to
the file descriptors from which it reads events, so the program can
use select() to multiplex between different input sources (see
§ 13.5.2, page
).