|
|
|
An optional parameter associated with an event.
More...
#include "eventParameter.h"
List of all members.
Detailed Description
An optional parameter associated with an event.
Each event may have zero or more of these. Each parameter stores a pointer to a TypedWritableReferenceCount object, which of course could be pretty much anything. To store a simple value like a double or a string, the EventParameter constructors transparently use the EventStoreValue template class, defined below.
Definition at line 38 of file eventParameter.h.
Constructor & Destructor Documentation
| EventParameter::EventParameter |
( |
| ) |
[inline] |
Defines an EventParameter that stores a pointer to any kind of TypedWritableReferenceCount object.
This is the most general constructor.
This accepts a const pointer, even though it stores (and eventually returns) a non-const pointer. This is just the simplest way to allow both const and non-const pointers to be stored, but it does lose the constness. Be careful.
Definition at line 44 of file eventParameter.I.
Defines an EventParameter that stores a pointer to a TypedReferenceCount object.
Note that a TypedReferenceCount is not the same kind of pointer as a TypedWritableReferenceCount, hence we require both constructors.
This accepts a const pointer, even though it stores (and eventually returns) a non-const pointer. This is just the simplest way to allow both const and non-const pointers to be stored, but it does lose the constness. Be careful.
Definition at line 62 of file eventParameter.I.
| EventParameter::EventParameter |
( |
int |
value | ) |
[inline] |
| EventParameter::EventParameter |
( |
double |
value | ) |
[inline] |
| EventParameter::EventParameter |
( |
const string & |
value | ) |
[inline] |
| EventParameter::EventParameter |
( |
const wstring & |
value | ) |
[inline] |
Member Function Documentation
| double EventParameter::get_double_value |
( |
| ) |
const [inline] |
| int EventParameter::get_int_value |
( |
| ) |
const [inline] |
Retrieves a pointer to the actual value stored in the parameter.
The TypeHandle of this pointer may be examined to determine the actual type of parameter it contains. This is the only way to retrieve the value when it is not one of the above predefined types.
Definition at line 293 of file eventParameter.I.
Referenced by MouseInterfaceNode::check_button_events(), Transform2SG::do_transmit_data(), Trackball::do_transmit_data(), MouseWatcher::do_transmit_data(), MouseSubregion::do_transmit_data(), DriveInterface::do_transmit_data(), ButtonThrower::do_transmit_data(), MouseRecorder::do_transmit_data(), AwMouseAndKeyboard::do_transmit_data(), PandaFramework::event_a(), PandaFramework::event_b(), PandaFramework::event_c(), PandaFramework::event_comma(), PandaFramework::event_esc(), PandaFramework::event_f9(), PandaFramework::event_i(), PandaFramework::event_l(), PandaFramework::event_p(), PandaFramework::event_question(), PandaFramework::event_t(), PandaFramework::event_w(), PandaFramework::event_window_event(), and DataNodeTransmit::write_datagram().
| string EventParameter::get_string_value |
( |
| ) |
const [inline] |
| wstring EventParameter::get_wstring_value |
( |
| ) |
const [inline] |
| bool EventParameter::is_double |
( |
| ) |
const [inline] |
| bool EventParameter::is_empty |
( |
| ) |
const [inline] |
| bool EventParameter::is_int |
( |
| ) |
const [inline] |
| bool EventParameter::is_string |
( |
| ) |
const [inline] |
| bool EventParameter::is_typed_ref_count |
( |
| ) |
const [inline] |
| bool EventParameter::is_wstring |
( |
| ) |
const [inline] |
The documentation for this class was generated from the following files:
| | |