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

panda/src/linmath/ioPtaDatagramLinMath.h

Go to the documentation of this file.
00001 // Filename: ioPtaDatagramLinMath.h
00002 // Created by:  jason (26Jun00)
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 #ifndef _IO_PTA_DATAGRAM_LINMATH
00020 #define _IO_PTA_DATAGRAM_LINMATH
00021 
00022 #include <pandabase.h>
00023 
00024 #include "luse.h"
00025 #include "pta_Vertexf.h"
00026 #include "pta_Colorf.h"
00027 #include "pta_Normalf.h"
00028 #include "pta_TexCoordf.h"
00029 
00030 #include <pointerToArray.h>
00031 
00032 class Datagram;
00033 class DatagramIterator;
00034 
00035 ///////////////////////////////////////////////////////////////////
00036 //       Class : IoPtaDatagramLinMath
00037 // Description : This class is used to read and write a PTA_something
00038 //               (where something is some kind of LinMath object like
00039 //               LMatrix4f or LVector3f) from a Datagram, in support
00040 //               of Bam.  It's not intended to be constructed; it's
00041 //               just a convenient place to scope these static methods
00042 //               which should be called directly.
00043 ////////////////////////////////////////////////////////////////////
00044 template<class LinMathElement>
00045 class IoPtaDatagramLinMath {
00046 public:
00047   static void write_datagram(Datagram &dest, CPTA(LinMathElement) array);
00048   static PTA(LinMathElement) read_datagram(DatagramIterator &source);
00049 };
00050 
00051 #include "ioPtaDatagramLinMath.I"
00052 
00053 // Now export all of the likely template classes for Windows' benefit.
00054 // This must be done in this file, and not in the individual pta_*
00055 // files, because it's important that this export command be the first
00056 // appearance of a particular template instantiation.
00057 
00058 EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, IoPtaDatagramLinMath<Colorf>)
00059 EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, IoPtaDatagramLinMath<Normalf>)
00060 EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, IoPtaDatagramLinMath<TexCoordf>)
00061 EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, IoPtaDatagramLinMath<Vertexf>)
00062 
00063 
00064 typedef IoPtaDatagramLinMath<Colorf> IPD_Colorf;
00065 typedef IoPtaDatagramLinMath<Normalf> IPD_Normalf;
00066 typedef IoPtaDatagramLinMath<TexCoordf> IPD_TexCoordf;
00067 typedef IoPtaDatagramLinMath<Vertexf> IPD_Vertexf;
00068 
00069 
00070 // Tell GCC that we'll take care of the instantiation explicitly here.
00071 #ifdef __GNUC__
00072 #pragma interface
00073 #endif
00074 
00075 #endif

Generated on Fri May 2 00:40:03 2003 for Panda by doxygen1.3