Panda3D
|
A handy class object for storing simple values (like integers or strings) passed along with an Event. More...
#include "eventParameter.h"
Public Member Functions | |
EventStoreValue (const Type &value) | |
virtual TypeHandle | force_init_type () |
virtual TypeHandle | get_type () const |
const Type & | get_value () const |
Retrieves the value stored in the parameter. | |
virtual void | output (ostream &out) const |
void | set_value (const Type &value) |
Changes the value stored in the parameter. | |
virtual void | write_datagram (BamWriter *manager, Datagram &dg) |
Writes the contents of this object to the datagram for shipping out to a Bam file. | |
Static Public Member Functions | |
static TypeHandle | get_class_type () |
static void | init_type (const string &type_name="UndefinedEventStoreValue") |
static void | register_with_read_factory () |
Tells the BamReader how to create objects of type Lens. | |
Public Attributes | |
Type | _value |
Protected Member Functions | |
void | fillin (DatagramIterator &scan, BamReader *manager) |
This internal function is called by make_from_bam to read in all of the relevant data from the BamFile for the new Lens. | |
Static Protected Member Functions | |
static TypedWritable * | make_from_bam (const FactoryParams ¶ms) |
This function is called by the BamReader's factory when a new object of type Lens is encountered in the Bam file. |
A handy class object for storing simple values (like integers or strings) passed along with an Event.
This is essentially just a wrapper around whatever data type you like, to make it a TypedWritableReferenceCount object which can be passed along inside an EventParameter.
Definition at line 159 of file eventParameter.h.
void EventStoreValue< Type >::fillin | ( | DatagramIterator & | scan, |
BamReader * | manager | ||
) | [protected, virtual] |
This internal function is called by make_from_bam to read in all of the relevant data from the BamFile for the new Lens.
Reimplemented from TypedWritable.
Definition at line 470 of file eventParameter.I.
References TypedWritable::fillin().
Referenced by EventStoreValue< Type >::make_from_bam().
const Type & EventStoreValue< Type >::get_value | ( | ) | const [inline] |
Retrieves the value stored in the parameter.
Definition at line 400 of file eventParameter.I.
Referenced by Trackball::do_transmit_data(), MouseWatcher::do_transmit_data(), MouseSubregion::do_transmit_data(), DriveInterface::do_transmit_data(), RocketInputHandler::do_transmit_data(), and MouseRecorder::do_transmit_data().
TypedWritable * EventStoreValue< Type >::make_from_bam | ( | const FactoryParams & | params | ) | [static, protected] |
This function is called by the BamReader's factory when a new object of type Lens is encountered in the Bam file.
It should create the Lens and extract its information from the file.
Definition at line 450 of file eventParameter.I.
References EventStoreValue< Type >::fillin().
void EventStoreValue< Type >::register_with_read_factory | ( | ) | [static] |
Tells the BamReader how to create objects of type Lens.
Definition at line 423 of file eventParameter.I.
References BamReader::get_factory(), and Factory< Type >::register_factory().
void EventStoreValue< Type >::set_value | ( | const Type & | value | ) | [inline] |
Changes the value stored in the parameter.
It is dangerous to do this for a parameter already added to an event, since the parameters may be shared.
Definition at line 388 of file eventParameter.I.
void EventStoreValue< Type >::write_datagram | ( | BamWriter * | manager, |
Datagram & | dg | ||
) | [virtual] |
Writes the contents of this object to the datagram for shipping out to a Bam file.
Reimplemented from TypedWritable.
Definition at line 435 of file eventParameter.I.
References TypedWritable::write_datagram().