WebLVC 1.7d API Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
pVrvMouseEvent.h
Go to the documentation of this file.
1 /****************************************************************************
2  * Copyright (c) 2016 VT MAK
3  * All rights reserved.
4  ****************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <portal/dllExport.h>
13 #include <portal/pInteraction.h>
14 
15 namespace MAKVrExchange
16 {
17 
18  class DtPortalConnection;
19 
23  : public DtPortalInteraction
24  {
25  public:
26 
28  typedef void (*functionCallback_type) (
29  const DtPortalVrvMouseEventInteraction &interaction, void *userData);
30 
33 
36 
38  static void addCallback( DtPortalConnection* connection,
39  functionCallback_type callbackFunction, void* userData );
40 
42  static void removeCallback( DtPortalConnection* connection,
43  functionCallback_type callbackFunction, void* userData );
44 
47 
48  DtDEC_ATTRIBUTE( DtString, ObserverName, observerName )
49  DtDEC_ATTRIBUTE( DtString, EventType, eventType );
50  DtDEC_ATTRIBUTE( double, X, x );
51  DtDEC_ATTRIBUTE( double, Y, y );
52  DtDEC_ATTRIBUTE( double, Wheel, wheel );
53  DtDEC_ATTRIBUTE( bool, Left, left );
54  DtDEC_ATTRIBUTE( bool, Middle, middle );
55  DtDEC_ATTRIBUTE( bool, Right, right );
56  DtDEC_ATTRIBUTE( bool, Shift, shift );
57  DtDEC_ATTRIBUTE( bool, Ctrl, ctrl );
58  DtDEC_ATTRIBUTE( bool, Alt, alt );
60 
62  public:
63 
64  static const DtPortalMessageKind theKind;
65 
66  static DtPortalMessage* create();
67 
68  virtual unsigned int netSize() const;
69  virtual void writeSelfToBuffer( void* buffer, int bufferSize ) const;
70  virtual void readSelfFromBuffer( const void* buffer, int bufferSize );
71 
72  virtual std::ostream& printDataToStream( std::ostream& stream ) const;
73 
74  private:
75 
78 
80  bool operator == ( const DtPortalVrvMouseEventInteraction& ) const;
81 
83  bool operator != ( const DtPortalVrvMouseEventInteraction& ) const;
84 
85  };
86 
87 
88  inline DtPortalMessage* DtPortalVrvMouseEventInteraction::create()
89  {
90  return new DtPortalVrvMouseEventInteraction();
91  }
92 
93 }
#define DT_DLL_LIBPORTAL
Definition: include/portal/dllExport.h:20
#define DtDEC_ATTRIBUTE(T, N, n)
A Macro to define an attribute; as well as make an accessor and mutator for that attribute.
Definition: addAttribute.h:49
The base class for all messages passed through the portal.
Definition: pMessage.h:65
Contains the DtPortalInteraction class declaration.
DtPortalInteractions are a special type of DtPortalMessages which are used to transmit simulation dat...
Definition: pInteraction.h:21
Vrv MouseEvent Interaction class.
Definition: pVrvMouseEvent.h:22
Connects a broker to the Portal Data Exchange.
Definition: pConnection.h:49
DtPortalMessageKind
A List of message kinds distributed with the Portal.
Definition: pMessageKinds.h:23

Document ID: Generated on Wed Jun 21 15:05:44 EDT 2023 from SVN revision 256253
Copyright © 2005-2023 MAK Technologies. All Rights Reserved (www.mak.com)