14#ifndef TYPEDWRITABLE_H
15#define TYPEDWRITABLE_H
35class EXPCL_PANDA_PUTIL TypedWritable :
public TypedObject {
37 static TypedWritable*
const Null;
39 INLINE TypedWritable();
40 INLINE TypedWritable(
const TypedWritable ©);
41 INLINE
void operator = (
const TypedWritable ©);
43 virtual ~TypedWritable();
63 EXTENSION(PyObject *__reduce__(PyObject *self)
const);
64 EXTENSION(PyObject *__reduce_persist__(PyObject *self, PyObject *pickler)
const);
74 void add_bam_writer(BamWriter *writer);
75 void remove_bam_writer(BamWriter *writer);
80 struct BamWriterLink {
84 AtomicAdjust::Pointer _bam_writers;
95 TypedObject::get_class_type());
99 return get_class_type();
103 return get_class_type();
109 friend class BamWriter;
This is the fundamental interface for extracting binary objects from a Bam file, as generated by a Ba...
This is the fundamental interface for writing binary objects to a Bam file, to be extracted later by ...
A class to retrieve the individual data elements previously stored in a Datagram.
An ordered list of data elements, formatted in memory for transmission over a socket or writing to a ...
A base class for all things that want to be reference-counted.
TypeHandle is the identifier used to differentiate C++ class types.
void record_alternate_name(TypeHandle type, const std::string &name)
Indicates an alternate name for the same type.
static TypeRegistry * ptr()
Returns the pointer to the global TypeRegistry object.
static void init_type()
This function is declared non-inline to work around a compiler bug in g++ 2.96.
virtual void finalize(BamReader *manager)
Called by the BamReader to perform any final actions needed for setting up the object after all objec...
virtual bool require_fully_complete() const
Some objects require all of their nested pointers to have been completed before the objects themselve...
virtual void fillin(DatagramIterator &scan, BamReader *manager)
This internal function is intended to be called by each class's make_from_bam() method to read in all...
virtual ReferenceCount * as_reference_count()
Returns the pointer cast to a ReferenceCount pointer, if it is in fact of that type.
static bool decode_raw_from_bam_stream(TypedWritable *&ptr, ReferenceCount *&ref_ptr, vector_uchar data, BamReader *reader=nullptr)
Reads the bytes created by a previous call to encode_to_bam_stream(), and extracts the single object ...
void mark_bam_modified()
Increments the bam_modified counter, so that this object will be invalidated and retransmitted on any...
UpdateSeq get_bam_modified() const
Returns the current bam_modified counter.
virtual void update_bam_nested(BamWriter *manager)
Called by the BamWriter when this object has not itself been modified recently, but it should check i...
vector_uchar encode_to_bam_stream() const
Converts the TypedWritable object into a single stream of data using a BamWriter, and returns that da...
virtual void write_datagram(BamWriter *manager, Datagram &dg)
Writes the contents of this object to the datagram for shipping out to a Bam file.
virtual int complete_pointers(TypedWritable **p_list, BamReader *manager)
Receives an array of pointers, one for each time manager->read_pointer() was called in fillin().
This is a sequence number that increments monotonically.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void register_type(TypeHandle &type_handle, const std::string &name)
This inline function is just a convenient way to call TypeRegistry::register_type(),...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.