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
UrcProtocol Class Reference

#include <UrcProtocol.hpp>

Inheritance diagram for UrcProtocol:
RecItem RecDef SerialThis UrcClient UrcServer UrcDB1Client UrcDB1Server

Public Member Functions

 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

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

Protocol is a class which defines number of named atoms and supplies methods for changing their values and querying changes.

Constructor & Destructor Documentation

UrcProtocol::UrcProtocol ( Display *  xdisplay,
const RecDef protodef,
const short  version[2] = NULL 
)

Create protocol instance for given X display connection. Verion of the protocol is set by default to 1.0 == version.

UrcProtocol::UrcProtocol ( const UrcProtocol proto)

Create copy of given protocol

Member Function Documentation

virtual void UrcProtocol::flush_changes ( Window  wid,
Logic  bForce = FALSE 
)
virtual

Update only changed values in given window. In case of bForce==FALSE values are published anyway.

virtual Logic UrcProtocol::implements_protocol ( Window  wid) const
virtual

Returns TRUE in case of given window implements the protocol as a set of atoms and FALSE otherwise.

virtual AnyValue UrcProtocol::read_atom ( Window  wid,
int  atom_i 
)
virtual

Read value of the atom addressed by its index.

virtual Logic UrcProtocol::update_atom ( Window  wid,
Atom  atom 
)
virtual

Update given atom from pointed window and return TRUE in case of real changes. If atom does not belong to protocol exception ERROR__X_BAD_ATOM will be excited.

virtual void UrcProtocol::version ( short  version[2]) const
virtual

Returns version info for this protocol.

virtual Logic UrcProtocol::version ( Window  wid,
short  version[2] 
) const
virtual

Returns version info for given Window if possible. Returns TRUE if the Window has version information for this protocol and FALSE otherwise. Allows to pass version==NULL to get answer TRUE or FALSE.

Member Data Documentation

AtomAr UrcProtocol::atoms
protected

Array of atoms. They provides the protocol implementation.

Display* UrcProtocol::dpy
protected

X display connection.

Atom UrcProtocol::proto_atom
protected

Special atom for protocol name.

short UrcProtocol::proto_version[2]
protected

Version info for this protocol in form MAJOR.MINOR


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