Panda3D
|
Encapsulates the data generated from (or sent into) any particular DataNode. More...
#include "dataNodeTransmit.h"
Public Member Functions | |
DataNodeTransmit (const DataNodeTransmit ©) | |
virtual int | complete_pointers (TypedWritable **plist, BamReader *manager) |
Receives an array of pointers, one for each time manager->read_pointer() was called in fillin(). | |
virtual TypeHandle | force_init_type () |
const EventParameter & | get_data (int index) const |
Extracts the data for the indicated index, if it has been stored, or the empty parameter if it has not. | |
virtual TypeHandle | get_type () const |
bool | has_data (int index) const |
Returns true if the indicated parameter has been stored, false otherwise. | |
void | operator= (const DataNodeTransmit ©) |
void | reserve (int num_wires) |
Tells the DataNodeTransmit object how many wires it is expected to store data for. | |
void | set_data (int index, const EventParameter &data) |
Sets the data for the indicated 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 () |
This function is declared non-inline to work around a compiler bug in g++ 2.96. | |
static void | register_with_read_factory () |
Tells the BamReader how to create objects of type Lens. | |
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. |
Encapsulates the data generated from (or sent into) any particular DataNode.
This is basically just an array of EventParameters, one for each registered input or output wire.
Definition at line 35 of file dataNodeTransmit.h.
int DataNodeTransmit::complete_pointers | ( | TypedWritable ** | p_list, |
BamReader * | manager | ||
) | [virtual] |
Receives an array of pointers, one for each time manager->read_pointer() was called in fillin().
Returns the number of pointers processed.
Reimplemented from TypedWritable.
Definition at line 82 of file dataNodeTransmit.cxx.
void DataNodeTransmit::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 121 of file dataNodeTransmit.cxx.
References DatagramIterator::get_uint16(), and BamReader::read_pointer().
Referenced by make_from_bam().
const EventParameter & DataNodeTransmit::get_data | ( | int | index | ) | const [inline] |
Extracts the data for the indicated index, if it has been stored, or the empty parameter if it has not.
Definition at line 64 of file dataNodeTransmit.I.
Referenced by MouseInterfaceNode::check_button_events(), AwMouseAndKeyboard::do_transmit_data(), Transform2SG::do_transmit_data(), RocketInputHandler::do_transmit_data(), MouseSubregion::do_transmit_data(), MouseRecorder::do_transmit_data(), ButtonThrower::do_transmit_data(), Trackball::do_transmit_data(), DriveInterface::do_transmit_data(), MouseWatcher::do_transmit_data(), and DataNode::transmit_data().
bool DataNodeTransmit::has_data | ( | int | index | ) | const [inline] |
Returns true if the indicated parameter has been stored, false otherwise.
Definition at line 79 of file dataNodeTransmit.I.
Referenced by MouseInterfaceNode::check_button_events(), AwMouseAndKeyboard::do_transmit_data(), Transform2SG::do_transmit_data(), RocketInputHandler::do_transmit_data(), MouseSubregion::do_transmit_data(), MouseRecorder::do_transmit_data(), ButtonThrower::do_transmit_data(), Trackball::do_transmit_data(), DriveInterface::do_transmit_data(), MouseWatcher::do_transmit_data(), and DataNode::transmit_data().
static void DataNodeTransmit::init_type | ( | ) | [inline, static] |
This function is declared non-inline to work around a compiler bug in g++ 2.96.
Making it inline seems to cause problems in the optimizer.
Reimplemented from TypedWritable.
Definition at line 69 of file dataNodeTransmit.h.
References TypedWritable::init_type().
TypedWritable * DataNodeTransmit::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 102 of file dataNodeTransmit.cxx.
References fillin().
Referenced by register_with_read_factory().
void DataNodeTransmit::register_with_read_factory | ( | ) | [static] |
Tells the BamReader how to create objects of type Lens.
Definition at line 51 of file dataNodeTransmit.cxx.
References BamReader::get_factory(), make_from_bam(), and Factory< Type >::register_factory().
void DataNodeTransmit::reserve | ( | int | num_wires | ) | [inline] |
Tells the DataNodeTransmit object how many wires it is expected to store data for.
Definition at line 53 of file dataNodeTransmit.I.
Referenced by DriveInterface::force_dgraph(), and DataNode::transmit_data().
void DataNodeTransmit::set_data | ( | int | index, |
const EventParameter & | data | ||
) | [inline] |
Sets the data for the indicated parameter.
Definition at line 92 of file dataNodeTransmit.I.
Referenced by MouseSubregion::do_transmit_data(), MouseRecorder::do_transmit_data(), VirtualMouse::do_transmit_data(), MouseAndKeyboard::do_transmit_data(), TrackerNode::do_transmit_data(), ButtonNode::do_transmit_data(), AnalogNode::do_transmit_data(), ButtonThrower::do_transmit_data(), Trackball::do_transmit_data(), DriveInterface::do_transmit_data(), MouseWatcher::do_transmit_data(), DriveInterface::force_dgraph(), and DataNode::transmit_data().
void DataNodeTransmit::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 62 of file dataNodeTransmit.cxx.
References Datagram::add_uint16(), EventParameter::get_ptr(), and BamWriter::write_pointer().