Panda3D

fltUnsupportedRecord.cxx

00001 // Filename: fltUnsupportedRecord.cxx
00002 // Created by:  drose (24Aug00)
00003 //
00004 ////////////////////////////////////////////////////////////////////
00005 //
00006 // PANDA 3D SOFTWARE
00007 // Copyright (c) Carnegie Mellon University.  All rights reserved.
00008 //
00009 // All use of this software is subject to the terms of the revised BSD
00010 // license.  You should have received a copy of this license along
00011 // with this source code in a file named "LICENSE."
00012 //
00013 ////////////////////////////////////////////////////////////////////
00014 
00015 #include "fltUnsupportedRecord.h"
00016 #include "fltRecordReader.h"
00017 #include "fltRecordWriter.h"
00018 
00019 TypeHandle FltUnsupportedRecord::_type_handle;
00020 
00021 ////////////////////////////////////////////////////////////////////
00022 //     Function: FltUnsupportedRecord::Constructor
00023 //       Access: Public
00024 //  Description:
00025 ////////////////////////////////////////////////////////////////////
00026 FltUnsupportedRecord::
00027 FltUnsupportedRecord(FltHeader *header) : FltRecord(header) {
00028   _opcode = FO_none;
00029 }
00030 
00031 ////////////////////////////////////////////////////////////////////
00032 //     Function: FltUnsupportedRecord::output
00033 //       Access: Public
00034 //  Description: Writes a quick one-line description of the bead, but
00035 //               not its children.  This is a human-readable
00036 //               description, primarily for debugging; to write a flt
00037 //               file, use FltHeader::write_flt().
00038 ////////////////////////////////////////////////////////////////////
00039 void FltUnsupportedRecord::
00040 output(ostream &out) const {
00041   out << "Unsupported(" << _opcode << ")";
00042 }
00043 
00044 ////////////////////////////////////////////////////////////////////
00045 //     Function: FltUnsupportedRecord::extract_record
00046 //       Access: Protected, Virtual
00047 //  Description: Fills in the information in this bead based on the
00048 //               information given in the indicated datagram, whose
00049 //               opcode has already been read.  Returns true on
00050 //               success, false if the datagram is invalid.
00051 ////////////////////////////////////////////////////////////////////
00052 bool FltUnsupportedRecord::
00053 extract_record(FltRecordReader &reader) {
00054   _opcode = reader.get_opcode();
00055   _datagram = reader.get_datagram();
00056 
00057   return true;
00058 }
00059 
00060 ////////////////////////////////////////////////////////////////////
00061 //     Function: FltUnsupportedRecord::build_record
00062 //       Access: Protected, Virtual
00063 //  Description: Fills up the current record on the FltRecordWriter with
00064 //               data for this record, but does not advance the
00065 //               writer.  Returns true on success, false if there is
00066 //               some error.
00067 ////////////////////////////////////////////////////////////////////
00068 bool FltUnsupportedRecord::
00069 build_record(FltRecordWriter &writer) const {
00070   writer.set_opcode(_opcode);
00071   writer.set_datagram(_datagram);
00072   return true;
00073 }
 All Classes Functions Variables Enumerations