Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

panda/src/putil/test_bamRead.cxx

Go to the documentation of this file.
00001 // Filename: test_bamRead.cxx
00002 // Created by:  jason (13Jun00)
00003 //
00004 ////////////////////////////////////////////////////////////////////
00005 //
00006 // PANDA 3D SOFTWARE
00007 // Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
00008 //
00009 // All use of this software is subject to the terms of the Panda 3d
00010 // Software license.  You should have received a copy of this license
00011 // along with this source code; you will also find a current copy of
00012 // the license at http://www.panda3d.org/license.txt .
00013 //
00014 // To contact the maintainers of this program write to
00015 // panda3d@yahoogroups.com .
00016 //
00017 ////////////////////////////////////////////////////////////////////
00018 
00019 #include <pandabase.h>
00020 #include <notify.h>
00021 
00022 #include <ipc_file.h>
00023 #include "test_bam.h"
00024 #include "bamReader.h"
00025 
00026 int main(int argc, char* argv[])
00027 {
00028   string test_file = "bamTest.out";
00029   datagram_file stream(test_file);
00030 
00031   stream.open(file::FILE_READ);
00032   BamReader manager(&stream);
00033 
00034   manager.init();
00035 
00036   PointerTo<Parent> dad = DCAST(Parent, manager.read_object());
00037   PointerTo<Parent> mom = DCAST(Parent, manager.read_object());
00038   PointerTo<Child> bro = DCAST(Child, manager.read_object());
00039   PointerTo<Child> sis = DCAST(Child, manager.read_object());
00040 
00041   manager.resolve();
00042 
00043   dad->print_relationships();
00044   nout << endl;
00045   mom->print_relationships();
00046   nout << endl;
00047   bro->print_relationships();
00048   nout << endl;
00049   sis->print_relationships();
00050 
00051   return 1;
00052 }

Generated on Fri May 2 00:43:45 2003 for Panda by doxygen1.3