|
|
|
A class to retrieve the individual data elements previously stored in a Datagram.
More...
#include "datagramIterator.h"
List of all members.
Public Member Functions |
|
| DatagramIterator (const Datagram &datagram, size_t offset=0) |
|
| DatagramIterator (const DatagramIterator ©) |
| void | assign (Datagram &datagram, size_t offset=0) |
| | direct Assignment to a Datagram
|
| string | extract_bytes (size_t size) |
| | Extracts the indicated number of bytes in the datagram and returns them as a string.
|
| PN_float32 | get_be_float32 () |
| | Extracts a 32-bit big-endian single-precision floating-point number.
|
| PN_float64 | get_be_float64 () |
| | Extracts a 64-bit big-endian floating-point number.
|
| PN_int16 | get_be_int16 () |
| | Extracts a signed 16-bit big-endian integer.
|
| PN_int32 | get_be_int32 () |
| | Extracts a signed 32-bit big-endian integer.
|
| PN_int64 | get_be_int64 () |
| | Extracts a signed 64-bit big-endian integer.
|
| PN_uint16 | get_be_uint16 () |
| | Extracts an unsigned 16-bit big-endian integer.
|
| PN_uint32 | get_be_uint32 () |
| | Extracts an unsigned 32-bit big-endian integer.
|
| PN_uint64 | get_be_uint64 () |
| | Extracts an unsigned 64-bit big-endian integer.
|
| bool | get_bool () |
| | Extracts a boolean value.
|
| size_t | get_current_index () const |
| | Returns the current position within the datagram of the next piece of data to extract.
|
| const Datagram & | get_datagram () const |
| | Return the datagram of this iterator.
|
| string | get_fixed_string (size_t size) |
| | Extracts a fixed-length string.
|
| PN_float32 | get_float32 () |
| | Extracts a 32-bit single-precision floating-point number.
|
| PN_float64 | get_float64 () |
| | Extracts a 64-bit floating-point number.
|
| PN_int16 | get_int16 () |
| | Extracts a signed 16-bit integer.
|
| PN_int32 | get_int32 () |
| | Extracts a signed 32-bit integer.
|
| PN_int64 | get_int64 () |
| | Extracts a signed 64-bit integer.
|
| PN_int8 | get_int8 () |
| | Extracts a signed 8-bit integer.
|
| string | get_remaining_bytes () const |
| | Returns the remaining bytes in the datagram as a string, but does not extract them from the iterator.
|
| int | get_remaining_size () const |
| | Return the bytes left in the datagram.
|
| PN_stdfloat | get_stdfloat () |
| | Extracts either a 32-bit or a 64-bit floating-point number, according to Datagram::set_stdfloat_double().
|
| string | get_string () |
| | Extracts a variable-length string.
|
| string | get_string32 () |
| | Extracts a variable-length string with a 32-bit length field.
|
| PN_uint16 | get_uint16 () |
| | Extracts an unsigned 16-bit integer.
|
| PN_uint32 | get_uint32 () |
| | Extracts an unsigned 32-bit integer.
|
| PN_uint64 | get_uint64 () |
| | Extracts an unsigned 64-bit integer.
|
| PN_uint8 | get_uint8 () |
| | Extracts an unsigned 8-bit integer.
|
| wstring | get_wstring () |
| | Extracts a variable-length wstring (with a 32-bit length field).
|
| string | get_z_string () |
| | Extracts a variable-length string, as a NULL-terminated string.
|
|
void | operator= (const DatagramIterator ©) |
| void | output (ostream &out) const |
| | Write a string representation of this instance to <out>.
|
| void | skip_bytes (size_t size) |
| | Skips over the indicated number of bytes in the datagram.
|
| void | write (ostream &out, unsigned int indent=0) const |
| | Write a string representation of this instance to <out>.
|
Detailed Description
A class to retrieve the individual data elements previously stored in a Datagram.
Elements may be retrieved one at a time; it is up to the caller to know the correct type and order of each element.
Definition at line 30 of file datagramIterator.h.
Member Function Documentation
Extracts a boolean value.
Definition at line 88 of file datagramIterator.I.
References get_uint8().
Referenced by Texture::do_fillin_body(), ShowBoundsEffect::fillin(), MovieVideo::fillin(), RecorderFrame::fillin(), AnimChannelScalarTable::fillin(), GeomVertexAnimationSpec::fillin(), LightLensNode::fillin(), AudioVolumeAttrib::fillin(), CullFaceAttrib::fillin(), ImageFile::fillin(), AnimChannelMatrixXfmTable::fillin(), ColorScaleAttrib::fillin(), ScissorEffect::fillin(), RenderModeAttrib::fillin(), BillboardEffect::fillin(), TextureProperties::fillin(), EggFile::fillin(), TextureReference::fillin(), Camera::fillin(), PaletteGroup::fillin(), CubicCurveseg::fillin(), PaletteImage::fillin(), TexturePlacement::fillin(), PartGroup::fillin(), ClipPlaneAttrib::fillin(), LightAttrib::fillin(), Palettizer::fillin(), TextureAttrib::fillin(), TextureImage::fillin(), PartBundle::fillin(), TextureStage::fillin(), BamReader::init(), TextureStage::make_TextureStage(), Texture::make_this_from_bam(), MouseRecorder::play_frame(), SparseArray::read_datagram(), Shader::ShaderFile::read_datagram(), and FFTCompressor::read_reals().
Extracts a 64-bit floating-point number.
Definition at line 282 of file datagramIterator.I.
References Datagram::get_data(), Datagram::get_length(), and NativeNumericData::store_value().
Referenced by TexturePosition::fillin(), RecorderFrame::fillin(), PiecewiseCurve::fillin(), TextureReference::fillin(), NurbsCurve::fillin(), Palettizer::fillin(), TextureImage::fillin(), get_stdfloat(), Shader::ShaderPtrData::read_datagram(), and FFTCompressor::read_header().
Extracts a signed 32-bit integer.
Definition at line 155 of file datagramIterator.I.
References Datagram::get_data(), and Datagram::get_length().
Referenced by NodePath::decode_from_bam_stream(), Texture::do_fillin_body(), RecorderHeader::fillin(), TexturePosition::fillin(), CullBinAttrib::fillin(), LightLensNode::fillin(), AnimPreloadTable::fillin(), ImageFile::fillin(), PaletteGroups::fillin(), DepthOffsetAttrib::fillin(), AuxBitplaneAttrib::fillin(), TextureProperties::fillin(), Material::fillin(), TexMatrixAttrib::fillin(), PlaneNode::fillin(), TextureReference::fillin(), PaletteGroup::fillin(), Light::fillin(), TexturePlacement::fillin(), AnimInterface::fillin(), Palettizer::fillin(), TextureAttrib::fillin(), StencilAttrib::fillin(), TextureStage::fillin(), RenderState::fillin(), DownloadDb::Db::parse_header(), DownloadDb::Db::parse_record_header(), SparseArray::read_datagram(), and FFTCompressor::read_reals().
Extracts a signed 8-bit integer.
Definition at line 98 of file datagramIterator.I.
References Datagram::get_data().
Referenced by FltGeometry::extract_record(), DepthTestAttrib::fillin(), AlphaTestAttrib::fillin(), DepthWriteAttrib::fillin(), HermiteCurveCV::fillin(), ShadeModelAttrib::fillin(), CullFaceAttrib::fillin(), ColorAttrib::fillin(), RescaleNormalAttrib::fillin(), TransparencyAttrib::fillin(), LightRampAttrib::fillin(), RenderModeAttrib::fillin(), Fog::fillin(), NurbsCurve::fillin(), ParametricCurve::fillin(), IffInputFile::get_int8(), IffInputFile::get_uint8(), and FFTCompressor::read_header().
Extracts either a 32-bit or a 64-bit floating-point number, according to Datagram::set_stdfloat_double().
Definition at line 305 of file datagramIterator.I.
References get_float32(), get_float64(), and Datagram::get_stdfloat_double().
Referenced by TimedCycle::fillin(), STTransform::fillin(), AnimBundle::fillin(), UvScrollNode::fillin(), AnimChannelScalarTable::fillin(), AlphaTestAttrib::fillin(), AnimChannelScalarDynamic::fillin(), AudioVolumeAttrib::fillin(), AnimPreloadTable::fillin(), AnimChannelMatrixXfmTable::fillin(), CollisionParabola::fillin(), LightRampAttrib::fillin(), BillboardEffect::fillin(), RenderModeAttrib::fillin(), CollisionFloorMesh::fillin(), DepthOffsetAttrib::fillin(), CollisionSphere::fillin(), Fog::fillin(), Material::fillin(), CollisionTube::fillin(), TransformBlend::fillin(), PolylightNode::fillin(), CollisionBox::fillin(), Lens::CData::fillin(), LODNode::Switch::read_datagram(), and FFTCompressor::read_reals().
Extracts a variable-length string.
Definition at line 25 of file datagramIterator.cxx.
References Datagram::get_data(), and get_uint16().
Referenced by PStatServerControlMessage::decode(), PStatClientControlMessage::decode(), MovieVideo::fillin(), RecorderTable::fillin(), CullBinAttrib::fillin(), HermiteCurveCV::fillin(), PalettePage::fillin(), AnimGroup::fillin(), AnimPreloadTable::fillin(), ImageFile::fillin(), SpeedTreeNode::InstanceList::fillin(), Material::fillin(), EggFile::fillin(), BamCacheRecord::fillin(), TextureReference::fillin(), PaletteGroup::fillin(), PaletteImage::fillin(), PartGroup::fillin(), Palettizer::fillin(), TextureImage::fillin(), TextureStage::fillin(), Lens::CData::fillin(), GeomVertexData::fillin(), PandaNode::fillin(), PandaNode::fillin_recorder(), InternalName::make_from_bam(), InternalName::make_texcoord_from_bam(), Texture::make_this_from_bam(), MayaToEggServer::poll(), PStatCollectorDef::read_datagram(), ButtonEvent::read_datagram(), Shader::ShaderFile::read_datagram(), and BamReader::read_handle().
Extracts an unsigned 16-bit integer.
Definition at line 197 of file datagramIterator.I.
References Datagram::get_data(), and Datagram::get_length().
Referenced by CConnectionRepository::check_datagram(), PStatServerControlMessage::decode(), PStatClientControlMessage::decode(), TimedCycle::fillin(), GeomPatches::fillin(), AnimChannelBase::fillin(), AnimBundle::fillin(), RecorderTable::fillin(), DataNodeTransmit::fillin(), ButtonEventList::fillin(), AnimChannelScalarTable::fillin(), GeomVertexAnimationSpec::fillin(), PartBundleNode::fillin(), OccluderEffect::fillin(), ModelNode::fillin(), AnimGroup::fillin(), AntialiasAttrib::fillin(), AnimPreloadTable::fillin(), AnimChannelMatrixXfmTable::fillin(), OccluderNode::fillin(), ScissorEffect::fillin(), GeomVertexColumn::fillin(), CharacterJoint::fillin(), CollisionFloorMesh::fillin(), CollisionNode::fillin(), TransformTable::fillin(), CompassEffect::fillin(), TexMatrixAttrib::fillin(), BamCacheRecord::fillin(), SliderTable::fillin(), TexProjectorEffect::fillin(), TransformBlend::fillin(), PartGroup::fillin(), TransformBlendTable::fillin(), PortalNode::fillin(), ClipPlaneAttrib::fillin(), TexGenAttrib::fillin(), CollisionPolygon::fillin(), CollisionBox::fillin(), LightAttrib::fillin(), Character::fillin(), TextureAttrib::fillin(), GeomVertexArrayFormat::fillin(), RenderEffects::fillin(), GeomVertexFormat::fillin(), Lens::CData::fillin(), RenderState::fillin(), DatagramUDPHeader::get_datagram_checksum(), DatagramTCPHeader::get_datagram_size(), get_string(), get_wstring(), BamReader::init(), PStatFrameData::read_datagram(), ButtonEvent::read_datagram(), and BamReader::read_handle().
Extracts an unsigned 32-bit integer.
Definition at line 218 of file datagramIterator.I.
References Datagram::get_data(), and Datagram::get_length().
Referenced by Texture::do_fillin_body(), Texture::do_fillin_rawdata(), RecorderHeader::fillin(), RecorderFrame::fillin(), BamCacheIndex::fillin(), PalettePage::fillin(), SpeedTreeNode::InstanceList::fillin(), PiecewiseCurve::fillin(), CollisionFloorMesh::fillin(), CollisionNode::fillin(), EggFile::fillin(), BamCacheRecord::fillin(), PaletteGroup::fillin(), NurbsCurve::fillin(), Camera::fillin(), PaletteImage::fillin(), HermiteCurve::fillin(), TextureImage::fillin(), SpeedTreeNode::fillin(), TransformState::fillin(), DatagramTCPHeader::get_datagram_size(), get_string32(), get_wstring(), DownloadDb::Db::parse_header(), BitArray::read_datagram(), SparseArray::read_datagram(), Shader::ShaderPtrData::read_datagram(), and GeomVertexArrayData::read_raw_data().
Extracts an unsigned 8-bit integer.
Definition at line 116 of file datagramIterator.I.
References Datagram::get_data().
Referenced by CConnectionRepository::check_datagram(), PStatServerControlMessage::decode(), PStatClientControlMessage::decode(), NodePath::decode_from_bam_stream(), Texture::do_fillin_body(), Texture::do_fillin_rawdata(), FltGeometry::extract_record(), AnimChannelScalarTable::fillin(), GeomVertexAnimationSpec::fillin(), ColorWriteAttrib::fillin(), ModelNode::fillin(), ImageFile::fillin(), GeomVertexColumn::fillin(), PlaneNode::fillin(), ColorBlendAttrib::fillin(), TexGenAttrib::fillin(), CollisionSolid::fillin(), Palettizer::fillin(), GeomVertexArrayFormat::fillin(), TextureImage::fillin(), TextureStage::fillin(), Lens::CData::fillin(), get_bool(), BamReader::init(), Texture::make_this_from_bam(), MayaToEggServer::poll(), ButtonEvent::read_datagram(), BitArray::read_datagram(), Shader::ShaderPtrData::read_datagram(), and BamReader::read_handle().
Skips over the indicated number of bytes in the datagram.
Definition at line 490 of file datagramIterator.I.
References Datagram::dump_hex(), and Datagram::get_length().
Referenced by FltMaterial::extract_14_record(), FltMesh::extract_record(), FltInstanceDefinition::extract_record(), FltTransformTranslate::extract_record(), FltInstanceRef::extract_record(), FltTransformScale::extract_record(), FltTransformRotateAboutEdge::extract_record(), FltTransformRotateAboutPoint::extract_record(), FltLOD::extract_record(), FltCurve::extract_record(), FltTransformRotateScale::extract_record(), FltTransformPut::extract_record(), FltVertex::extract_record(), FltGeometry::extract_record(), and GeomVertexArrayData::read_raw_data().
The documentation for this class was generated from the following files:
| | |