Panda3D

- Main Page
- Packages
- Classes

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Static Public Member Functions

# TypedWritable Class Reference

Base class for objects that can be written to and read from Bam files. More...

Inheritance diagram for TypedWritable:

List of all members.

## Public Member Functions
string | encodeToBamStream ()
| Converts the TypedWritable object into a single stream of data using a BamWriter, and returns that data as a string string.
bool | encodeToBamStream (basic_stringchar data)
| Converts the TypedWritable object into a single stream of data using a BamWriter, and stores that data in the indicated string.
bool | encodeToBamStream (basic_stringchar data, BamWriter writer)
| Converts the TypedWritable object into a single stream of data using a BamWriter, and stores that data in the indicated string.
UpdateSeq | getBamModified ()
| Returns the current bam_modified counter.
| markBamModified ()
| Increments the bam_modified counter, so that this object will be invalidated and retransmitted on any open bam streams.
PyObject | reduce (PyObject self)
| This special Python method is implement to provide support for the pickle module.
PyObject | reducePersist (PyObject self, PyObject pickler)
| This special Python method is implement to provide support for the pickle module.
## Static Public Member Functions
static TypeHandle | getClassType ()

## Detailed Description

Base class for objects that can be written to and read from Bam files.

See also TypedObject for detailed instructions.

## Member Function Documentation

string encodeToBamStream | ( |  | ) |

Converts the TypedWritable object into a single stream of data using a BamWriter, and returns that data as a string string.

Returns empty string on failure.

This is a convenience method particularly useful for cases when you are only serializing a single object. If you have many objects to process, it is more efficient to use the same BamWriter to serialize all of them together.

bool encodeToBamStream | ( | basic_stringchar | data,
|  | BamWriter | writer
| ) |  |

Converts the TypedWritable object into a single stream of data using a BamWriter, and stores that data in the indicated string.

Returns true on success, false on failure.

This is a convenience method particularly useful for cases when you are only serializing a single object. If you have many objects to process, it is more efficient to use the same BamWriter to serialize all of them together.

bool encodeToBamStream | ( | basic_stringchar | data | ) |

Converts the TypedWritable object into a single stream of data using a BamWriter, and stores that data in the indicated string.

Returns true on success, false on failure.

This is a convenience method particularly useful for cases when you are only serializing a single object. If you have many objects to process, it is more efficient to use the same BamWriter to serialize all of them together.

UpdateSeq getBamModified | ( |  | ) |

Returns the current bam_modified counter.

This counter is normally incremented automatically whenever the object is modified.

static TypeHandle getClassType | ( |  | ) | `[static]`

Reimplemented from TypedObject.

Reimplemented in PGItem, PandaNode, PGButton, PGTop, PGEntry, PGMouseWatcherParameter, TypedWritableReferenceCount, PGMouseWatcherBackground, MouseWatcherRegion, PGVirtualFrame, PGSliderBar, PGScrollFrame, PGWaitBar, BamCacheRecord, CachedTypedWritableReferenceCount, CopyOnWriteObject, NodeCachedReferenceCount, WritableConfigurable, ButtonThrower, DataNode, MouseInterfaceNode, DriveInterface, MouseSubregion, MouseWatcher, Trackball, Transform2SG, DynamicTextPage, Texture, GeomTextGlyph, Geom, TextNode, PNMFileType, ParametricCurve, CubicCurveseg, PiecewiseCurve, HermiteCurve, NurbsCurve, RopeNode, SheetNode, GraphicsOutputBase, GraphicsStateGuardianBase, InternalName, GeomVertexArrayFormat, GeomVertexFormat, GeomVertexArrayData, VertexTransform, TransformTable, TransformBlendTable, VertexSlider, SliderTable, GeomVertexData, GeomPrimitive, TextureStage, GeomLines, GeomLinestrips, GeomPoints, GeomTriangles, GeomTrifans, GeomTristrips, Lens, Material, MatrixLens, OrthographicLens, PerspectiveLens, UserVertexSlider, UserVertexTransform, VideoTexture, EventStoreValueBase, EventStoreTypedRefCount, PointerEventList, GraphicsStateGuardian, GraphicsOutput, GraphicsWindow, CallbackGraphicsWindow, GraphicsBuffer, ParasiteBuffer, AnalogNode, ButtonNode, DialNode, MouseAndKeyboard, TrackerNode, VirtualMouse, CollisionSolid, CollisionBox, CollisionNode, CollisionEntry, CollisionPlane, CollisionFloorMesh, CollisionPolygon, CollisionSphere, CollisionInvSphere, CollisionRay, CollisionLine, CollisionParabola, CollisionSegment, CollisionTube, CollisionVisualizer, CharacterJoint, MovingPartMatrix, CharacterSlider, MovingPartScalar, CharacterVertexSlider, JointVertexTransform, Character, PartBundleNode, CharacterJointBundle, PartBundle, CharacterJointEffect, RenderEffect, AnimGroup, AnimBundle, AnimBundleNode, PartGroup, AnimChannelBase, AnimChannelMatrix, AnimChannelScalar, AnimChannelMatrixDynamic, AnimChannelMatrixXfmTable, AnimChannelScalarDynamic, AnimChannelScalarTable, AnimPreloadTable, MovingPartBase, MovingPartACMatrixSwitchType, MovingPartACScalarSwitchType, FrameRateMeter, MovieTexture, NodeVertexTransform, SceneGraphAnalyzerMeter, RigidBodyCombiner, MovieAudio, MovieAudioCursor, FfmpegAudio, FfmpegAudioCursor, MovieVideo, MovieVideoCursor, FfmpegVideo, FfmpegVideoCursor, InkblotVideo, InkblotVideoCursor, MicrophoneAudio, UserDataAudio, UserDataAudioCursor, TransformState, RenderAttrib, RenderModeAttrib, TexMatrixAttrib, RenderState, AlphaTestAttrib, AntialiasAttrib, RenderEffects, TransparencyAttrib, AudioVolumeAttrib, AuxBitplaneAttrib, BillboardEffect, LensNode, Camera, PlaneNode, ClipPlaneAttrib, ColorAttrib, ColorBlendAttrib, ColorScaleAttrib, ColorWriteAttrib, CompassEffect, CullBinAttrib, CullFaceAttrib, GeomNode, DecalEffect, DepthOffsetAttrib, DepthTestAttrib, DepthWriteAttrib, EventStorePandaNode, Fog, FogAttrib, LightAttrib, LightRampAttrib, MaterialAttrib, ModelNode, ModelRoot, TextureAttrib, TexGenAttrib, OccluderNode, OccluderEffect, PolylightNode, PolylightEffect, ShaderInput, ShaderAttrib, ShowBoundsEffect, TexProjectorEffect, ScissorEffect, PortalNode, RescaleNormalAttrib, ScissorAttrib, ShadeModelAttrib, StencilAttrib, LightNode, AmbientLight, CallbackNode, LightLensNode, DirectionalLight, LODNode, FadeLODNode, PointLight, SelectiveChildNode, SequenceNode, Spotlight, SwitchNode, UvScrollNode, and MouseRecorder.

markBamModified | ( |  | ) |

Increments the bam_modified counter, so that this object will be invalidated and retransmitted on any open bam streams.

This should normally not need to be called by user code; it should be called internally when the object has been changed in a way that legitimately requires its retransmission to any connected clients.

PyObject reduce | ( | PyObject | self | ) |

This special Python method is implement to provide support for the pickle module.

This hooks into the native pickle and cPickle modules, but it cannot properly handle self-referential BAM objects.

PyObject reducePersist | ( | PyObject | self,
|  | PyObject | pickler
| ) |  |

This special Python method is implement to provide support for the pickle module.

This is similar to __reduce__, but it provides additional support for the missing persistent-state object needed to properly support self-referential BAM objects written to the pickle stream. This hooks into the pickle and cPickle modules implemented in direct/src/stdpy.

All Classes Namespaces Functions Variables Enumerations Enumerator Properties