#include <filenameUnifier.h>
Static Public Member Functions | |
void | set_txa_filename (const Filename &txa_filename) |
Notes the filename the .txa file was found in. | |
void | set_rel_dirname (const Filename &rel_dirname) |
Sets the name of the directory that texture filenames will be written relative to, when generating egg files. | |
Filename | make_bam_filename (Filename filename) |
Returns a new filename that's made relative to the bam file itself, suitable for writing to the bam file. | |
Filename | get_bam_filename (Filename filename) |
Returns an absolute pathname based on the given relative pathname, presumably read from the bam file and relative to the bam file. | |
Filename | make_egg_filename (Filename filename) |
Returns a new filename that's made relative to the rel_directory, suitable for writing out within egg files. | |
Filename | make_user_filename (Filename filename) |
Returns a new filename that's made relative to the current directory, suitable for reporting to the user. | |
Private Types | |
typedef pmap< string, string > | CanonicalFilenames |
Static Private Member Functions | |
void | make_canonical (Filename &filename) |
Does the same thing as Filename::make_canonical()--it converts the filename to its canonical form--but caches the operation so that repeated calls to filenames in the same directory will tend to be faster. | |
Static Private Attributes | |
Filename | _txa_filename |
Filename | _txa_dir |
Filename | _rel_dirname |
CanonicalFilenames | _canonical_filenames |
Its main purpose is to allow us to write relative pathnames to the bam file and turn them back into absolute pathnames on read, so that a given bam file does not get tied to absolute pathnames.
Definition at line 50 of file filenameUnifier.h.
|
Definition at line 67 of file filenameUnifier.h. |
|
Returns an absolute pathname based on the given relative pathname, presumably read from the bam file and relative to the bam file.
Definition at line 120 of file filenameUnifier.cxx. References Filename::empty(), ExecutionEnvironment::get_cwd(), make_canonical(), and Filename::make_relative_to(). Referenced by Palettizer::write_datagram(). |
|
Returns a new filename that's made relative to the bam file itself, suitable for writing to the bam file.
Definition at line 101 of file filenameUnifier.cxx. References _rel_dirname, Filename::empty(), make_canonical(), and Filename::make_relative_to(). |
|
Does the same thing as Filename::make_canonical()--it converts the filename to its canonical form--but caches the operation so that repeated calls to filenames in the same directory will tend to be faster. Also guarantees that the directory containing the filename exists by making it if it does not. Definition at line 192 of file filenameUnifier.cxx. Referenced by get_bam_filename(), make_bam_filename(), and set_txa_filename(). |
|
Returns a new filename that's made relative to the rel_directory, suitable for writing out within egg files.
Definition at line 140 of file filenameUnifier.cxx. References _canonical_filenames, Filename::empty(), Filename::get_dirname(), Filename::make_canonical(), Filename::make_dir(), and Filename::set_dirname(). |
|
Returns a new filename that's made relative to the current directory, suitable for reporting to the user.
Definition at line 161 of file filenameUnifier.cxx. Referenced by ImageFile::exists(), TextureImage::is_newer_than(), and PaletteImage::unplace(). |
|
Sets the name of the directory that texture filenames will be written relative to, when generating egg files. This is not the directory the textures are actually written to (see set_map_dirname()), but rather is the name of some directory above that, which will be the starting point for the pathnames written to the egg files. If this is empty, the full pathnames will be written to the egg files. Definition at line 83 of file filenameUnifier.cxx. References _txa_dir, Filename::empty(), and Filename::make_absolute(). Referenced by Palettizer::write_datagram(). |
|
Notes the filename the .txa file was found in. This may have come from the command line, or it may have been implicitly located. This has other implications for the FilenameUnifier, particularly in locating the bam file that saves the filenameUnifier state from last session. Definition at line 51 of file filenameUnifier.cxx. References _rel_dirname, Filename::empty(), and make_canonical(). |
|
Definition at line 30 of file filenameUnifier.cxx. Referenced by make_egg_filename(). |
|
Definition at line 28 of file filenameUnifier.cxx. Referenced by make_bam_filename(), and set_txa_filename(). |
|
Definition at line 27 of file filenameUnifier.cxx. Referenced by set_rel_dirname(). |
|
Definition at line 26 of file filenameUnifier.cxx. |