Panda3D
virtualFileComposite.I
1 // Filename: virtualFileComposite.I
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 
16 ////////////////////////////////////////////////////////////////////
17 // Function: VirtualFileComposite::Constructor
18 // Access: Public
19 // Description:
20 ////////////////////////////////////////////////////////////////////
21 INLINE VirtualFileComposite::
22 VirtualFileComposite(VirtualFileSystem *file_system, const Filename &filename) :
23  _file_system(file_system),
24  _filename(filename)
25 {
26 }
27 
28 ////////////////////////////////////////////////////////////////////
29 // Function: VirtualFileComposite::add_component
30 // Access: Public
31 // Description: Adds one more component to the composite directory.
32 // The component should be a directory and the file
33 // system and filename should match the composite.
34 ////////////////////////////////////////////////////////////////////
35 INLINE void VirtualFileComposite::
37  nassertv(file->is_directory());
38  nassertv(file->get_file_system() == _file_system);
39  nassertv(file->get_filename() == _filename);
40 
41  _components.push_back(file);
42 }
A hierarchy of directories and files that appears to be one continuous file system, even though the files may originate from several different sources that may not be related to the actual OS's file system.
void add_component(VirtualFile *file)
Adds one more component to the composite directory.
The abstract base class for a file or directory within the VirtualFileSystem.
Definition: virtualFile.h:37
The name of a file, such as a texture file or an Egg file.
Definition: filename.h:44
virtual bool is_directory() const
Returns true if this file represents a directory (and scan_directory() may be called), false otherwise.
Definition: virtualFile.cxx:41