00001 // Filename: buffer.h 00002 // Created by: mike (09Jan97) 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 #ifndef BUFFER_H 00019 #define BUFFER_H 00020 // 00021 //////////////////////////////////////////////////////////////////// 00022 // Includes 00023 //////////////////////////////////////////////////////////////////// 00024 #include <pandabase.h> 00025 #include "typedef.h" 00026 #include "referenceCount.h" 00027 00028 //////////////////////////////////////////////////////////////////// 00029 // Class : Buffer 00030 // Description : 00031 //////////////////////////////////////////////////////////////////// 00032 class EXPCL_PANDAEXPRESS Buffer : public ReferenceCount { 00033 public: 00034 Buffer(int size); 00035 ~Buffer(); 00036 00037 INLINE int get_length(void) const; 00038 00039 #ifndef CPPPARSER 00040 // hidden from interrogate 00041 public: 00042 char *_buffer; 00043 #endif 00044 00045 private: 00046 int _length; 00047 }; 00048 00049 //////////////////////////////////////////////////////////////////// 00050 // Class : Ramfile 00051 // Description : 00052 //////////////////////////////////////////////////////////////////// 00053 class EXPCL_PANDAEXPRESS Ramfile { 00054 PUBLISHED: 00055 INLINE Ramfile(); 00056 00057 string readline(); 00058 00059 public: 00060 size_t _pos; 00061 string _data; 00062 }; 00063 00064 #include "buffer.I" 00065 00066 #endif