Panda3D
Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions
DataNodeTransmit Class Reference

Encapsulates the data generated from (or sent into) any particular DataNode. More...

#include "dataNodeTransmit.h"

Inheritance diagram for DataNodeTransmit:
TypedWritable TypedObject MemoryBase

List of all members.

Public Member Functions

 DataNodeTransmit (const DataNodeTransmit &copy)
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 EventParameterget_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 &copy)
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 TypedWritablemake_from_bam (const FactoryParams &params)
 This function is called by the BamReader's factory when a new object of type Lens is encountered in the Bam file.

Detailed Description

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.


Member Function Documentation

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]
bool DataNodeTransmit::has_data ( int  index) const [inline]
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().

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]
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().


The documentation for this class was generated from the following files:
 All Classes Functions Variables Enumerations