Panda3D
 All Classes Functions Variables Enumerations
virtualFileList.h
1 // Filename: virtualFileList.h
2 // Created by: drose (03Aug02)
3 //
4 ////////////////////////////////////////////////////////////////////
5 //
6 // PANDA 3D SOFTWARE
7 // Copyright (c) Carnegie Mellon University. All rights reserved.
8 //
9 // All use of this software is subject to the terms of the revised BSD
10 // license. You should have received a copy of this license along
11 // with this source code in a file named "LICENSE."
12 //
13 ////////////////////////////////////////////////////////////////////
14 
15 #ifndef VIRTUALFILELIST_H
16 #define VIRTUALFILELIST_H
17 
18 #include "pandabase.h"
19 
20 #include "virtualFile.h"
21 #include "pointerTo.h"
22 
23 ////////////////////////////////////////////////////////////////////
24 // Class : VirtualFileList
25 // Description : A list of VirtualFiles, as returned by
26 // VirtualFile::scan_directory().
27 ////////////////////////////////////////////////////////////////////
28 class EXPCL_PANDAEXPRESS VirtualFileList : public ReferenceCount {
29 public:
30  INLINE VirtualFileList();
31 
32 PUBLISHED:
33  INLINE ~VirtualFileList();
34 
35 public:
36  INLINE void add_file(VirtualFile *file);
37 
38 PUBLISHED:
39  INLINE int get_num_files() const;
40  INLINE VirtualFile *get_file(int n) const;
41  MAKE_SEQ(get_files, get_num_files, get_file);
42 
43  INLINE VirtualFile *operator [](int n) const;
44  INLINE int size() const;
45  INLINE void operator += (const VirtualFileList &other);
46  INLINE VirtualFileList operator + (const VirtualFileList &other) const;
47 
48 private:
50  Files _files;
51 };
52 
53 
54 #include "virtualFileList.I"
55 
56 #endif
The abstract base class for a file or directory within the VirtualFileSystem.
Definition: virtualFile.h:37
This is our own Panda specialization on the default STL vector.
Definition: pvector.h:39
A list of VirtualFiles, as returned by VirtualFile::scan_directory().
A base class for all things that want to be reference-counted.