mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-30 00:32:57 -04:00
parent
40b824bdcc
commit
655aa49d81
@ -1,86 +0,0 @@
|
||||
//FOR C Files
|
||||
#include <datagram.h>
|
||||
#include <datagramIterator.h>
|
||||
#include <bamReader.h>
|
||||
#include <bamWriter.h>
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: Generic::write_datagram
|
||||
// Access: Public
|
||||
// Description: Function to write the important information in
|
||||
// the particular object to a Datagram
|
||||
////////////////////////////////////////////////////////////////////
|
||||
void Generic::
|
||||
write_datagram(BamWriter *manager, Datagram &me)
|
||||
{
|
||||
GenericParent::write_datagram(manager, me);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: Generic::fillin
|
||||
// Access: Protected
|
||||
// Description: Function that reads out of the datagram (or asks
|
||||
// manager to read) all of the data that is needed to
|
||||
// re-create this object and stores it in the appropiate
|
||||
// place
|
||||
////////////////////////////////////////////////////////////////////
|
||||
void Generic::
|
||||
fillin(DatagramIterator& scan, BamReader* manager)
|
||||
{
|
||||
GenericParent::fillin(scan, manager);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: Generic::complete_pointers
|
||||
// Access: Public
|
||||
// Description: Takes in a vector of pointes to TypedWriteable
|
||||
// objects that correspond to all the requests for
|
||||
// pointers that this object made to BamReader.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
int Generic::
|
||||
complete_pointers(vector_typedWriteable &p_list, BamReader *manager)
|
||||
{
|
||||
int start = GenericParent::complete_pointers(p_list, manager);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: Generic::finalize
|
||||
// Access: Public
|
||||
// Description: Method to ensure that any necessary clean up tasks
|
||||
// that have to be performed by this object are performed
|
||||
////////////////////////////////////////////////////////////////////
|
||||
void Generic::
|
||||
finalize()
|
||||
{
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: Generic::make_Generic
|
||||
// Access: Protected
|
||||
// Description: Factory method to generate a Generic object
|
||||
////////////////////////////////////////////////////////////////////
|
||||
TypedWriteable* Generic::
|
||||
make_Generic(const FactoryParams ¶ms)
|
||||
{
|
||||
Generic *me = new Generic;
|
||||
BamReader *manager;
|
||||
Datagram packet;
|
||||
|
||||
parse_params(params, manager, packet);
|
||||
DatagramIterator scan(packet);
|
||||
|
||||
me->fillin(scan, manager);
|
||||
return me;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: Generic::register_with_factory
|
||||
// Access: Public, Static
|
||||
// Description: Factory method to generate a Generic object
|
||||
////////////////////////////////////////////////////////////////////
|
||||
void Generic::
|
||||
register_with_read_factory()
|
||||
{
|
||||
BamReader::get_factory()->register_factory(get_class_type(), make_Generic);
|
||||
}
|
@ -1,20 +0,0 @@
|
||||
//FOR H File of files derived from TypedWriteable, WriteableConfigurable
|
||||
//or TypedWriteableReferenceCount
|
||||
class BamReader;
|
||||
|
||||
//FOR H FILES
|
||||
|
||||
public:
|
||||
static void register_with_read_factory();
|
||||
virtual void write_datagram(BamWriter* manager, Datagram &me);
|
||||
virtual int complete_pointers(vector_typedWriteable &p_list,
|
||||
BamReader *manager);
|
||||
virtual void finalize();
|
||||
|
||||
static TypedWriteable *make_Generic(const FactoryParams ¶ms);
|
||||
|
||||
protected:
|
||||
void fillin(DatagramIterator& scan, BamReader* manager);
|
||||
|
||||
private:
|
||||
int _num_GenericPointers;
|
Loading…
x
Reference in New Issue
Block a user