Panda3D
|
00001 // Filename: virtualFileList.h 00002 // Created by: drose (03Aug02) 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 #ifndef VIRTUALFILELIST_H 00016 #define VIRTUALFILELIST_H 00017 00018 #include "pandabase.h" 00019 00020 #include "virtualFile.h" 00021 #include "pointerTo.h" 00022 00023 //////////////////////////////////////////////////////////////////// 00024 // Class : VirtualFileList 00025 // Description : A list of VirtualFiles, as returned by 00026 // VirtualFile::scan_directory(). 00027 //////////////////////////////////////////////////////////////////// 00028 class EXPCL_PANDAEXPRESS VirtualFileList : public ReferenceCount { 00029 public: 00030 INLINE VirtualFileList(); 00031 00032 PUBLISHED: 00033 INLINE ~VirtualFileList(); 00034 00035 public: 00036 INLINE void add_file(VirtualFile *file); 00037 00038 PUBLISHED: 00039 INLINE int get_num_files() const; 00040 INLINE VirtualFile *get_file(int n) const; 00041 MAKE_SEQ(get_files, get_num_files, get_file); 00042 00043 INLINE VirtualFile *operator [](int n) const; 00044 INLINE int size() const; 00045 INLINE void operator += (const VirtualFileList &other); 00046 INLINE VirtualFileList operator + (const VirtualFileList &other) const; 00047 00048 private: 00049 typedef pvector< PT(VirtualFile) > Files; 00050 Files _files; 00051 }; 00052 00053 00054 #include "virtualFileList.I" 00055 00056 #endif