14#ifndef EVENTPARAMETER_H
15#define EVENTPARAMETER_H
35class EXPCL_PANDA_EVENT EventParameter {
37 INLINE EventParameter() =
default;
38 INLINE EventParameter(std::nullptr_t) {};
41 INLINE EventParameter(
int value);
42 INLINE EventParameter(
double value);
43 INLINE EventParameter(
const std::string &value);
44 INLINE EventParameter(
const std::wstring &value);
46 INLINE EventParameter(
const EventParameter ©);
47 INLINE EventParameter &operator = (
const EventParameter ©);
48 INLINE ~EventParameter();
55 INLINE
bool is_int()
const;
69 void output(std::ostream &out)
const;
75INLINE std::ostream &operator << (std::ostream &out,
const EventParameter ¶m);
79EXPORT_TEMPLATE_CLASS(EXPCL_PANDA_EVENT, EXPTP_PANDA_EVENT,
ParamValue<int>);
84typedef ParamString EventStoreString;
85typedef ParamWstring EventStoreWstring;
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
An optional parameter associated with an event.
int get_int_value() const
Retrieves the value stored in the EventParameter.
bool is_double() const
Returns true if the EventParameter stores a double floating-point value, false otherwise.
std::wstring get_wstring_value() const
Retrieves the value stored in the EventParameter.
bool is_empty() const
Returns true if the EventParameter is the empty parameter, storing nothing, or false otherwise.
bool is_string() const
Returns true if the EventParameter stores a string value, false otherwise.
TypedReferenceCount * get_typed_ref_count_value() const
Retrieves the value stored in the EventParameter.
TypedWritableReferenceCount * get_ptr() const
Retrieves a pointer to the actual value stored in the parameter.
bool is_typed_ref_count() const
Returns true if the EventParameter stores a TypedReferenceCount pointer, false otherwise.
bool is_int() const
Returns true if the EventParameter stores an integer value, false otherwise.
std::string get_string_value() const
Retrieves the value stored in the EventParameter.
bool is_wstring() const
Returns true if the EventParameter stores a wstring value, false otherwise.
double get_double_value() const
Retrieves the value stored in the EventParameter.
A class object for storing specifically objects of type TypedReferenceCount, which is different than ...
A handy class object for storing simple values (like integers or strings) passed along with an Event ...
A base class for things which need to inherit from both TypedObject and from ReferenceCount.
A base class for things which need to inherit from both TypedWritable and from ReferenceCount.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.