mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-29 00:06:44 -04:00
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:
parent
e78ce78acf
commit
8222255b3b
@ -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();
|
||||
}
|
||||
|
@ -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();
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
|
@ -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;
|
||||
|
@ -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();
|
||||
}
|
||||
|
@ -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();
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
|
@ -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;
|
||||
|
@ -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
|
||||
*/
|
||||
|
@ -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.
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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();
|
||||
}
|
||||
|
@ -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();
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
|
@ -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;
|
||||
|
@ -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();
|
||||
}
|
||||
|
@ -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();
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user