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