Panda3D
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:
TypedObject MemoryBase PandaNode PNMFileType TypedWritableReferenceCount WritableConfigurable AnimBundleNode CallbackNode CollisionNode CollisionVisualizer DataNode Fog GeomNode LensNode LightNode LODNode ModelNode ParametricCurve PartBundleNode PGItem PGTop PlaneNode PolylightNode PortalNode RigidBodyCombiner RopeNode SelectiveChildNode SheetNode TextNode UvScrollNode AnimGroup BamCacheRecord CachedTypedWritableReferenceCount CollisionEntry EventStoreValueBase GeomVertexArrayFormat GeomVertexFormat GraphicsOutputBase GraphicsStateGuardianBase InternalName Lens Material MouseWatcherRegion MovieAudio MovieAudioCursor MovieVideo MovieVideoCursor PartGroup PGMouseWatcherParameter RenderAttrib RenderEffect RenderEffects ShaderInput SliderTable Texture TextureStage TransformTable VertexSlider VertexTransform

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, BamWriter writer)
 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)
 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.
TypeHandle getType ()
int getTypeIndex ()
 Returns the internal index number associated with this object's TypeHandle, a unique number for each different type.
bool isExactType (TypeHandle handle)
 Returns true if the current object is the indicated type exactly.
bool isOfType (TypeHandle handle)
 Returns true if the current object is or derives from the indicated type.
 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, PGMouseWatcherBackground, MouseWatcherRegion, PGMouseWatcherParameter, TypedWritableReferenceCount, 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, Material, Lens, OrthographicLens, MatrixLens, PerspectiveLens, UserVertexSlider, UserVertexTransform, VideoTexture, EventStoreValueBase, EventStoreTypedRefCount, PointerEventList, GraphicsStateGuardian, GraphicsOutput, GraphicsBuffer, GraphicsWindow, ParasiteBuffer, AnalogNode, ButtonNode, DialNode, MouseAndKeyboard, TrackerNode, VirtualMouse, CollisionSolid, CollisionNode, CollisionEntry, CollisionDSSolid, CollisionBox, CollisionSphere, CollisionInvSphere, CollisionRay, CollisionLine, CollisionPlane, CollisionPolygon, CollisionParabola, CollisionFloorMesh, CollisionSegment, CollisionTube, CollisionVisualizer, CharacterJoint, MovingPartMatrix, CharacterSlider, MovingPartScalar, CharacterVertexSlider, JointVertexTransform, Character, PartBundleNode, CharacterJointBundle, PartBundle, CharacterJointEffect, RenderEffect, AnimGroup, AnimBundle, AnimBundleNode, PartGroup, AnimChannelBase, AnimChannelACMatrixSwitchType, AnimChannelACScalarSwitchType, AnimChannelMatrixDynamic, AnimChannelMatrixXfmTable, AnimChannelScalarDynamic, AnimChannelScalarTable, AnimPreloadTable, MovingPartBase, MovingPartACMatrixSwitchType, MovingPartACScalarSwitchType, FFMpegTexture, FrameRateMeter, SceneGraphAnalyzerMeter, MovieTexture, NodeVertexTransform, RigidBodyCombiner, MovieVideo, MovieVideoCursor, MovieAudio, MovieAudioCursor, InkblotVideo, InkblotVideoCursor, FfmpegVideo, FfmpegVideoCursor, FfmpegAudio, FfmpegAudioCursor, 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, PolylightNode, PolylightEffect, ShaderInput, ShaderAttrib, ShowBoundsEffect, TexProjectorEffect, ScissorEffect, PortalNode, RescaleNormalAttrib, ScissorAttrib, ShadeModelAttrib, StencilAttrib, UvScrollNode, LightNode, AmbientLight, CallbackNode, LightLensNode, DirectionalLight, LODNode, FadeLODNode, PointLight, SelectiveChildNode, SequenceNode, Spotlight, SwitchNode, and MouseRecorder.

TypeHandle getType ( ) [inherited]

Reimplemented in AnimChannelBase.

int getTypeIndex ( ) [inherited]

Returns the internal index number associated with this object's TypeHandle, a unique number for each different type.

This is equivalent to get_type().get_index().

bool isExactType ( TypeHandle  handle) [inherited]

Returns true if the current object is the indicated type exactly.

bool isOfType ( TypeHandle  handle) [inherited]

Returns true if the current object is or derives from the indicated type.

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