Panda3D
pathStore.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 pathStore.h
10  * @author drose
11  * @date 2003-02-10
12  */
13 
14 #ifndef PATHSTORE_H
15 #define PATHSTORE_H
16 
17 #include "pandatoolbase.h"
18 
19 /**
20  * This enumerated type lists the methods by which a filename path might be
21  * mangled before storing in a destination file.
22  */
23 enum PathStore {
24  PS_invalid, // Never use this.
25  PS_relative, // Make relative to a user-specified directory.
26  PS_absolute, // Make absolute.
27  PS_rel_abs, // Make relative if within the directory, otherwise absolute.
28  PS_strip, // Strip prefix and just store the basename.
29  PS_keep, // Don't change the filename at all.
30 };
31 
32 std::string format_path_store(PathStore unit);
33 
34 std::ostream &operator << (std::ostream &out, PathStore unit);
35 PathStore string_path_store(const std::string &str);
36 
37 #endif
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PathStore string_path_store(const std::string &str)
Stores from a string, as might be input by the user, to one of the known PathStore types.
Definition: pathStore.cxx:60
PathStore
This enumerated type lists the methods by which a filename path might be mangled before storing in a ...
Definition: pathStore.h:23
std::string format_path_store(PathStore unit)
Returns the string corresponding to this method.
Definition: pathStore.cxx:23