00001 // Filename: virtualFileList.I 00002 // Created by: drose (03Aug02) 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 00020 //////////////////////////////////////////////////////////////////// 00021 // Function: VirtualFileList::Constructor 00022 // Access: Public 00023 // Description: 00024 //////////////////////////////////////////////////////////////////// 00025 INLINE VirtualFileList:: 00026 VirtualFileList() { 00027 } 00028 00029 //////////////////////////////////////////////////////////////////// 00030 // Function: VirtualFileList::Destructor 00031 // Access: Published 00032 // Description: 00033 //////////////////////////////////////////////////////////////////// 00034 INLINE VirtualFileList:: 00035 ~VirtualFileList() { 00036 } 00037 00038 //////////////////////////////////////////////////////////////////// 00039 // Function: VirtualFileList::add_file 00040 // Access: Public 00041 // Description: Adds a new file to the list. 00042 //////////////////////////////////////////////////////////////////// 00043 INLINE void VirtualFileList:: 00044 add_file(VirtualFile *file) { 00045 _files.push_back(file); 00046 } 00047 00048 //////////////////////////////////////////////////////////////////// 00049 // Function: VirtualFileList::get_num_files 00050 // Access: Published 00051 // Description: Returns the number of files in the list. 00052 //////////////////////////////////////////////////////////////////// 00053 INLINE int VirtualFileList:: 00054 get_num_files() const { 00055 return _files.size(); 00056 } 00057 00058 //////////////////////////////////////////////////////////////////// 00059 // Function: VirtualFileList::get_file 00060 // Access: Published 00061 // Description: Returns the nth file in the list. 00062 //////////////////////////////////////////////////////////////////// 00063 INLINE VirtualFile *VirtualFileList:: 00064 get_file(int n) const { 00065 nassertr(n >= 0 && n < (int)_files.size(), NULL); 00066 return _files[n]; 00067 }