00001 // Filename: fltUnsupportedRecord.cxx 00002 // Created by: drose (24Aug00) 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 "fltUnsupportedRecord.h" 00020 #include "fltRecordReader.h" 00021 #include "fltRecordWriter.h" 00022 00023 TypeHandle FltUnsupportedRecord::_type_handle; 00024 00025 //////////////////////////////////////////////////////////////////// 00026 // Function: FltUnsupportedRecord::Constructor 00027 // Access: Public 00028 // Description: 00029 //////////////////////////////////////////////////////////////////// 00030 FltUnsupportedRecord:: 00031 FltUnsupportedRecord(FltHeader *header) : FltRecord(header) { 00032 _opcode = FO_none; 00033 } 00034 00035 //////////////////////////////////////////////////////////////////// 00036 // Function: FltUnsupportedRecord::output 00037 // Access: Public 00038 // Description: Writes a quick one-line description of the bead, but 00039 // not its children. This is a human-readable 00040 // description, primarily for debugging; to write a flt 00041 // file, use FltHeader::write_flt(). 00042 //////////////////////////////////////////////////////////////////// 00043 void FltUnsupportedRecord:: 00044 output(ostream &out) const { 00045 out << "Unsupported(" << _opcode << ")"; 00046 } 00047 00048 //////////////////////////////////////////////////////////////////// 00049 // Function: FltUnsupportedRecord::extract_record 00050 // Access: Protected, Virtual 00051 // Description: Fills in the information in this bead based on the 00052 // information given in the indicated datagram, whose 00053 // opcode has already been read. Returns true on 00054 // success, false if the datagram is invalid. 00055 //////////////////////////////////////////////////////////////////// 00056 bool FltUnsupportedRecord:: 00057 extract_record(FltRecordReader &reader) { 00058 _opcode = reader.get_opcode(); 00059 _datagram = reader.get_datagram(); 00060 00061 return true; 00062 } 00063 00064 //////////////////////////////////////////////////////////////////// 00065 // Function: FltUnsupportedRecord::build_record 00066 // Access: Protected, Virtual 00067 // Description: Fills up the current record on the FltRecordWriter with 00068 // data for this record, but does not advance the 00069 // writer. Returns true on success, false if there is 00070 // some error. 00071 //////////////////////////////////////////////////////////////////// 00072 bool FltUnsupportedRecord:: 00073 build_record(FltRecordWriter &writer) const { 00074 writer.set_opcode(_opcode); 00075 writer.set_datagram(_datagram); 00076 return true; 00077 }