Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

ClientButtonDevice Class Reference

#include <clientButtonDevice.h>

Inheritance diagram for ClientButtonDevice:

ClientDevice TypedReferenceCount TypedObject ReferenceCount VrpnButtonDevice List of all members.

Public Member Functions

INLINE int get_num_buttons () const
INLINE void set_button_map (int index, ButtonHandle button)
INLINE ButtonHandle get_button_map (int index) const
void set_button_state (int index, bool down)
INLINE bool get_button_state (int index) const
INLINE bool is_button_known (int index) const
INLINE ButtonEventListget_button_events () const
virtual void output (ostream &out) const
virtual void write (ostream &out, int indent_level=0) const
void output_buttons (ostream &out) const
void write_buttons (ostream &out, int indent_level) const
virtual TypeHandle get_type () const
virtual TypeHandle force_init_type ()

Static Public Member Functions

TypeHandle get_class_type ()
void init_type ()

Protected Types

typedef pvector< ButtonStateButtons
enum  State { S_unknown, S_up, S_down }

Protected Member Functions

 ClientButtonDevice (ClientBase *client, const string &device_name)
 PT (ButtonEventList) _button_events

Protected Attributes

Buttons _buttons

Private Member Functions

void ensure_button_index (int index)

Static Private Attributes

TypeHandle _type_handle

Friends

class ButtonState

Member Typedef Documentation

typedef pvector<ButtonState> ClientButtonDevice::Buttons [protected]
 

Definition at line 81 of file clientButtonDevice.h.


Member Enumeration Documentation

enum ClientButtonDevice::State [protected]
 

Enumeration values:
S_unknown 
S_up 
S_down 

Definition at line 67 of file clientButtonDevice.h.


Constructor & Destructor Documentation

ClientButtonDevice::ClientButtonDevice ClientBase client,
const string &  device_name
[protected]
 

Definition at line 32 of file clientButtonDevice.cxx.


Member Function Documentation

void ClientButtonDevice::ensure_button_index int  index  )  [private]
 

Definition at line 69 of file clientButtonDevice.cxx.

References _buttons, ButtonState, and index.

Referenced by set_button_state().

virtual TypeHandle ClientButtonDevice::force_init_type void   )  [inline, virtual]
 

Reimplemented from ClientDevice.

Reimplemented in VrpnButtonDevice.

Definition at line 98 of file clientButtonDevice.h.

References ClientDevice::get_class_type(), and ClientDevice::init_type().

INLINE ButtonEventList* ClientButtonDevice::get_button_events  )  const
 

INLINE ButtonHandle ClientButtonDevice::get_button_map int  index  )  const
 

INLINE bool ClientButtonDevice::get_button_state int  index  )  const
 

TypeHandle ClientButtonDevice::get_class_type void   )  [inline, static]
 

Reimplemented from ClientDevice.

Reimplemented in VrpnButtonDevice.

Definition at line 87 of file clientButtonDevice.h.

Referenced by VrpnButtonDevice::init_type(), and PT().

INLINE int ClientButtonDevice::get_num_buttons  )  const
 

virtual TypeHandle ClientButtonDevice::get_type void   )  const [inline, virtual]
 

Reimplemented from ClientDevice.

Reimplemented in VrpnButtonDevice.

Definition at line 95 of file clientButtonDevice.h.

References ClientDevice::get_class_type().

Referenced by output(), and write().

void ClientButtonDevice::init_type void   )  [inline, static]
 

Reimplemented from ClientDevice.

Reimplemented in VrpnButtonDevice.

Definition at line 90 of file clientButtonDevice.h.

References ClientDevice::get_class_type(), ClientDevice::init_type(), and register_type().

Referenced by init_libdevice(), and VrpnButtonDevice::init_type().

INLINE bool ClientButtonDevice::is_button_known int  index  )  const
 

void ClientButtonDevice::output ostream &  out  )  const [virtual]
 

Reimplemented from ClientDevice.

Definition at line 84 of file clientButtonDevice.cxx.

References ClientDevice::get_device_name(), get_type(), and output_buttons().

void ClientButtonDevice::output_buttons ostream &  out  )  const
 

Definition at line 108 of file clientButtonDevice.cxx.

References _buttons, ClientButtonDevice::ButtonState::_state, S_unknown, and S_up.

Referenced by output().

ClientButtonDevice::PT ButtonEventList   )  [protected]
 

INLINE void ClientButtonDevice::set_button_map int  index,
ButtonHandle  button
 

void ClientButtonDevice::set_button_state int  index,
bool  down
 

Definition at line 49 of file clientButtonDevice.cxx.

References _buttons, ensure_button_index(), index, ButtonHandle::none(), S_down, S_up, ButtonEvent::T_down, and ButtonEvent::T_up.

Referenced by VrpnButton::vrpn_button_callback().

void ClientButtonDevice::write ostream &  out,
int  indent_level = 0
const [virtual]
 

Reimplemented from ClientDevice.

Definition at line 96 of file clientButtonDevice.cxx.

References ClientDevice::get_device_name(), get_type(), indent(), and write_buttons().

void ClientButtonDevice::write_buttons ostream &  out,
int  indent_level
const
 

Definition at line 139 of file clientButtonDevice.cxx.

References _buttons, ClientButtonDevice::ButtonState::_handle, ClientButtonDevice::ButtonState::_state, indent(), ButtonHandle::none(), S_unknown, and S_up.

Referenced by write().


Friends And Related Function Documentation

friend class ButtonState [friend]
 

Definition at line 102 of file clientButtonDevice.h.

Referenced by ensure_button_index().


Member Data Documentation

Buttons ClientButtonDevice::_buttons [protected]
 

Definition at line 82 of file clientButtonDevice.h.

Referenced by ensure_button_index(), output_buttons(), set_button_state(), and write_buttons().

TypeHandle ClientButtonDevice::_type_handle [static, private]
 

Reimplemented from ClientDevice.

Reimplemented in VrpnButtonDevice.

Definition at line 24 of file clientButtonDevice.cxx.


The documentation for this class was generated from the following files:
Generated on Fri Apr 18 00:11:33 2003 for Panda by doxygen1.3