Sfoglia il codice sorgente

vrpn: make inline methods that call into VRPN non-inline

This prevents things that link with VRPN and use these VRPN functions from needing to link with VRPN directly.
rdb 5 anni fa
parent
commit
8222255b3b

+ 0 - 9
panda/src/vrpn/vrpnAnalog.I

@@ -28,12 +28,3 @@ INLINE bool VrpnAnalog::
 is_empty() const {
   return _devices.empty();
 }
-
-/**
- * Polls the connected device.  Normally you should not call this directly;
- * this will be called by the VrpnClient.
- */
-INLINE void VrpnAnalog::
-poll() {
-  _analog->mainloop();
-}

+ 9 - 0
panda/src/vrpn/vrpnAnalog.cxx

@@ -70,6 +70,15 @@ unmark(VrpnAnalogDevice *device) {
   }
 }
 
+/**
+ * Polls the connected device.  Normally you should not call this directly;
+ * this will be called by the VrpnClient.
+ */
+void VrpnAnalog::
+poll() {
+  _analog->mainloop();
+}
+
 /**
  *
  */

+ 1 - 1
panda/src/vrpn/vrpnAnalog.h

@@ -46,7 +46,7 @@ public:
   void mark(VrpnAnalogDevice *device);
   void unmark(VrpnAnalogDevice *device);
 
-  INLINE void poll();
+  void poll();
 
   void output(std::ostream &out) const;
   void write(std::ostream &out, int indent_level = 0) const;

+ 0 - 9
panda/src/vrpn/vrpnButton.I

@@ -28,12 +28,3 @@ INLINE bool VrpnButton::
 is_empty() const {
   return _devices.empty();
 }
-
-/**
- * Polls the connected device.  Normally you should not call this directly;
- * this will be called by the VrpnClient.
- */
-INLINE void VrpnButton::
-poll() {
-  _button->mainloop();
-}

+ 9 - 0
panda/src/vrpn/vrpnButton.cxx

@@ -70,6 +70,15 @@ unmark(VrpnButtonDevice *device) {
   }
 }
 
+/**
+ * Polls the connected device.  Normally you should not call this directly;
+ * this will be called by the VrpnClient.
+ */
+void VrpnButton::
+poll() {
+  _button->mainloop();
+}
+
 /**
  *
  */

+ 1 - 1
panda/src/vrpn/vrpnButton.h

@@ -45,7 +45,7 @@ public:
   void mark(VrpnButtonDevice *device);
   void unmark(VrpnButtonDevice *device);
 
-  INLINE void poll();
+  void poll();
 
   void output(std::ostream &out) const;
   void write(std::ostream &out, int indent_level = 0) const;

+ 0 - 19
panda/src/vrpn/vrpnClient.I

@@ -19,25 +19,6 @@ get_server_name() const {
   return _server_name;
 }
 
-/**
- * Returns true if everything seems to be kosher with the server (even if
- * there is no connection), or false otherwise.
- */
-INLINE bool VrpnClient::
-is_valid() const {
-  return (_connection->doing_okay() != 0);
-}
-
-/**
- * Returns true if the connection is established successfully, false
- * otherwise.
- */
-INLINE bool VrpnClient::
-is_connected() const {
-  return (_connection->connected() != 0);
-}
-
-
 /**
  * Little inline function to convert a struct timeval to only seconds
  */

+ 18 - 0
panda/src/vrpn/vrpnClient.cxx

@@ -60,6 +60,24 @@ VrpnClient::
   delete _connection;
 }
 
+/**
+ * Returns true if everything seems to be kosher with the server (even if
+ * there is no connection), or false otherwise.
+ */
+bool VrpnClient::
+is_valid() const {
+  return (_connection->doing_okay() != 0);
+}
+
+/**
+ * Returns true if the connection is established successfully, false
+ * otherwise.
+ */
+bool VrpnClient::
+is_connected() const {
+  return (_connection->connected() != 0);
+}
+
 /**
  * Writes a list of the active devices that the VrpnClient is currently
  * polling each frame.

+ 2 - 2
panda/src/vrpn/vrpnClient.h

@@ -38,8 +38,8 @@ PUBLISHED:
   ~VrpnClient();
 
   INLINE const std::string &get_server_name() const;
-  INLINE bool is_valid() const;
-  INLINE bool is_connected() const;
+  bool is_valid() const;
+  bool is_connected() const;
 
   void write(std::ostream &out, int indent_level = 0) const;
 

+ 0 - 9
panda/src/vrpn/vrpnDial.I

@@ -27,12 +27,3 @@ INLINE bool VrpnDial::
 is_empty() const {
   return _devices.empty();
 }
-
-/**
- * Polls the connected device.  Normally you should not call this directly;
- * this will be called by the VrpnClient.
- */
-INLINE void VrpnDial::
-poll() {
-  _dial->mainloop();
-}

+ 9 - 0
panda/src/vrpn/vrpnDial.cxx

@@ -70,6 +70,15 @@ unmark(VrpnDialDevice *device) {
   }
 }
 
+/**
+ * Polls the connected device.  Normally you should not call this directly;
+ * this will be called by the VrpnClient.
+ */
+void VrpnDial::
+poll() {
+  _dial->mainloop();
+}
+
 /**
  *
  */

+ 1 - 1
panda/src/vrpn/vrpnDial.h

@@ -45,7 +45,7 @@ public:
   void mark(VrpnDialDevice *device);
   void unmark(VrpnDialDevice *device);
 
-  INLINE void poll();
+  void poll();
 
   void output(std::ostream &out) const;
   void write(std::ostream &out, int indent_level = 0) const;

+ 0 - 9
panda/src/vrpn/vrpnTracker.I

@@ -28,12 +28,3 @@ INLINE bool VrpnTracker::
 is_empty() const {
   return _devices.empty();
 }
-
-/**
- * Polls the connected device.  Normally you should not call this directly;
- * this will be called by the VrpnClient.
- */
-INLINE void VrpnTracker::
-poll() {
-  _tracker->mainloop();
-}

+ 9 - 0
panda/src/vrpn/vrpnTracker.cxx

@@ -72,6 +72,15 @@ unmark(VrpnTrackerDevice *device) {
   }
 }
 
+/**
+ * Polls the connected device.  Normally you should not call this directly;
+ * this will be called by the VrpnClient.
+ */
+void VrpnTracker::
+poll() {
+  _tracker->mainloop();
+}
+
 /**
  *
  */

+ 1 - 1
panda/src/vrpn/vrpnTracker.h

@@ -45,7 +45,7 @@ public:
   void mark(VrpnTrackerDevice *device);
   void unmark(VrpnTrackerDevice *device);
 
-  INLINE void poll();
+  void poll();
 
   void output(std::ostream &out) const;
   void write(std::ostream &out, int indent_level = 0) const;