virtualFileComposite.I 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. // Filename: virtualFileComposite.I
  2. // Created by: drose (03Aug02)
  3. //
  4. ////////////////////////////////////////////////////////////////////
  5. //
  6. // PANDA 3D SOFTWARE
  7. // Copyright (c) 2001 - 2004, Disney Enterprises, Inc. All rights reserved
  8. //
  9. // All use of this software is subject to the terms of the Panda 3d
  10. // Software license. You should have received a copy of this license
  11. // along with this source code; you will also find a current copy of
  12. // the license at http://etc.cmu.edu/panda3d/docs/license/ .
  13. //
  14. // To contact the maintainers of this program write to
  15. // [email protected] .
  16. //
  17. ////////////////////////////////////////////////////////////////////
  18. ////////////////////////////////////////////////////////////////////
  19. // Function: VirtualFileComposite::Constructor
  20. // Access: Public
  21. // Description:
  22. ////////////////////////////////////////////////////////////////////
  23. INLINE VirtualFileComposite::
  24. VirtualFileComposite(VirtualFileSystem *file_system, const Filename &filename) :
  25. _file_system(file_system),
  26. _filename(filename)
  27. {
  28. }
  29. ////////////////////////////////////////////////////////////////////
  30. // Function: VirtualFileComposite::add_component
  31. // Access: Public
  32. // Description: Adds one more component to the composite directory.
  33. // The component should be a directory and the file
  34. // system and filename should match the composite.
  35. ////////////////////////////////////////////////////////////////////
  36. INLINE void VirtualFileComposite::
  37. add_component(VirtualFile *file) {
  38. nassertv(file->is_directory());
  39. nassertv(file->get_file_system() == _file_system);
  40. nassertv(file->get_filename() == _filename);
  41. _components.push_back(file);
  42. }