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.
This commit is contained in:
rdb 2020-01-21 14:45:27 +01:00
parent e78ce78acf
commit 8222255b3b
15 changed files with 60 additions and 61 deletions

View File

@ -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();
}

View File

@ -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();
}
/**
*
*/

View File

@ -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;

View File

@ -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();
}

View File

@ -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();
}
/**
*
*/

View File

@ -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;

View File

@ -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
*/

View File

@ -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.

View File

@ -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;

View File

@ -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();
}

View File

@ -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();
}
/**
*
*/

View File

@ -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;

View File

@ -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();
}

View File

@ -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();
}
/**
*
*/

View File

@ -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;