Panda3D
Loading...
Searching...
No Matches
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 */
25class EXPCL_PANDA_EXPRESS VirtualFileList : public ReferenceCount {
26public:
27 INLINE VirtualFileList();
28
29PUBLISHED:
30 INLINE ~VirtualFileList();
31
32public:
33 INLINE void add_file(VirtualFile *file);
34
35PUBLISHED:
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
45private:
46 typedef pvector< PT(VirtualFile) > Files;
47 Files _files;
48};
49
50
51#include "virtualFileList.I"
52
53#endif
A base class for all things that want to be reference-counted.
A list of VirtualFiles, as returned by VirtualFile::scan_directory().
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
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.