UNIVERS  15.3
UNIVERS base processing software API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Member Functions | Protected Attributes | List of all members
UrcClient Class Reference

#include <UrcClient.hpp>

Inheritance diagram for UrcClient:
UrcProtocol RecItem RecDef SerialThis UrcDB1Client

Public Member Functions

 UrcClient (Display *xdisplay, Window wid, const RecDef &protodef)
 
 UrcClient (Display *xdisplay, const RecDef &protodef)
 
virtual Logic select_for_broadcast (Window wid)
 
virtual void broadcast_flush_changes ()
 
virtual void address_flush_changes ()
 
virtual void flush_changes ()
 
- Public Member Functions inherited from UrcProtocol
 UrcProtocol (Display *xdisplay, const RecDef &protodef, const short version[2]=NULL)
 
 UrcProtocol (const UrcProtocol &proto)
 
virtual void flush_changes (Window wid, Logic bForce=FALSE)
 
virtual Logic update_atom (Window wid, Atom atom)
 
virtual AnyValue read_atom (Window wid, int atom_i)
 
virtual Logic implements_protocol (Window wid) const
 
virtual void version (short version[2]) const
 
virtual Logic version (Window wid, short version[2]) const
 
- Public Member Functions inherited from RecItem
 RecItem (const RecDef &rdef)
 
 RecItem (const RecItem &r)
 
 RecItem (InputStream &ist)
 
 RecItem (RecDef *prdef, void *recdata)
 
void attach (void *recdata)
 
virtual ~RecItem ()
 
RecItemoperator= (const RecItem &r)
 
virtual AnyValuevalue (int dmn_i)
 
AnyValuevalue (const char *dname)
 
virtual const AnyValueget_value (int dmn_i) const
 
const AnyValueget_value (const char *dname) const
 
virtual void get_value (int dmn_i, AnyValue &av) const
 
void get_value (const char *dname, AnyValue &av) const
 
virtual void set_value (int dmn_i, const AnyValue &av)
 
void set_value (const char *dname, const AnyValue &av)
 
virtual void set_row_data (const void *row_data)
 
virtual void * get_row_data () const
 
virtual void copy_row_data (const RecDef &rdef, void *row_data) const
 
virtual void add_domain (const DomainDef &dmn)
 
virtual void serialize (OutputStream &ost) const
 
virtual void deserialize (InputStream &ist)
 
- Public Member Functions inherited from RecDef
 RecDef (const char *rtname, const DomainAr &dmns)
 
 RecDef (const char *rtname, int dmns_n, const DomainDef *dmns)
 
 RecDef (const RecDef &rdef)
 
 RecDef (const char *rtname, const RecDef &rdef1, const RecDef &rdef2)
 
 RecDef (InputStream &ist)
 
virtual ~RecDef ()
 
const char * record_name () const
 
size_t record_size () const
 
unsigned domain_count () const
 
int n2i (const char *dname) const
 
void * offset (int dmn_i, const void *base) const
 
const DomainDefdomain_def (int dmn_i) const
 
DomainDefdomain_defs () const
 
void set_options (int dmn_i, void *options)
 
bool operator== (const RecDef &rdef) const
 
bool operator!= (const RecDef &rdef) const
 
bool check_domain (const char *dname) const
 
bool check_domain (const char *dname, AtomType atype, unsigned dim=1) const
 
- Public Member Functions inherited from SerialThis
 SerialThis ()
 
 SerialThis (InputStream &ist)
 

Protected Attributes

Window widServer
 
- Protected Attributes inherited from UrcProtocol
Display * dpy
 
AtomAr atoms
 
Atom proto_atom
 
short proto_version [2]
 
- Protected Attributes inherited from RecItem
bool own_memory
 
void * ptr_rec
 
AnyValue ** av
 

Additional Inherited Members

- Protected Member Functions inherited from RecDef
 RecDef (RecDef *rdef)
 
 RecDef ()
 
void constructor (const char *rtname, const DomainAr &dmns)
 

Detailed Description

Client side of remote control protocol implementation. Client can ask one or many applications to do some actions caused by atoms which were sent from the client. One server application is selected by its window id. Many servers can be addressed by custom complicated rules. This class implements broadcast selection among all top level windows on the display which supports needed protocol.

Constructor & Destructor Documentation

UrcClient::UrcClient ( Display *  xdisplay,
Window  wid,
const RecDef protodef 
)

Creates client linked with given window only.

UrcClient::UrcClient ( Display *  xdisplay,
const RecDef protodef 
)

Create broadcasting client.

Member Function Documentation

virtual void UrcClient::address_flush_changes ( )
virtual

Send changes for given window only with check for its existence.

virtual void UrcClient::broadcast_flush_changes ( )
virtual

Send changes in broadcast manner (see select_for_broadcast()).

virtual void UrcClient::flush_changes ( )
virtual

Uniform method for flushing changes depending broadcasting or address mode of creation.

virtual Logic UrcClient::select_for_broadcast ( Window  wid)
virtual

Implements selection of window for broadcast sending. May be overriden in inherited classes. Here it selects windows which implements given protocol.

Reimplemented in UrcDB1Client.

Member Data Documentation

Window UrcClient::widServer
protected

Window id of the server or None in case of broadcasting client.


The documentation for this class was generated from the following file: