17 INLINE ConfigVariableFilename::
18 ConfigVariableFilename(
const std::string &name) :
20 _local_modified(initial_invalid_cache())
28 INLINE ConfigVariableFilename::
29 ConfigVariableFilename(
const std::string &name,
const Filename &default_value,
30 const std::string &description,
int flags) :
31 #ifdef PRC_SAVE_DESCRIPTIONS
36 _local_modified(initial_invalid_cache())
38 _core->set_default_value(default_value);
53 INLINE ConfigVariableFilename::
55 return get_ref_value();
61 INLINE
const char *ConfigVariableFilename::
63 return get_ref_value().c_str();
69 INLINE
bool ConfigVariableFilename::
71 return get_ref_value().empty();
77 INLINE
size_t ConfigVariableFilename::
79 return get_ref_value().length();
85 INLINE
char ConfigVariableFilename::
86 operator [] (
size_t n)
const {
87 return get_ref_value()[n];
151 INLINE
bool ConfigVariableFilename::
152 operator == (
const Filename &other)
const {
153 return get_ref_value() == other;
159 INLINE
bool ConfigVariableFilename::
160 operator != (
const Filename &other)
const {
161 return get_ref_value() != other;
167 INLINE
bool ConfigVariableFilename::
168 operator < (
const Filename &other)
const {
169 return get_ref_value() < other;
183 INLINE
Filename ConfigVariableFilename::
189 return get_ref_value();
195 INLINE
Filename ConfigVariableFilename::
196 get_default_value()
const {
198 if (decl !=
nullptr) {
218 set_string_word(n, value);
226 INLINE
const Filename &ConfigVariableFilename::
227 get_ref_value()
const {
228 TAU_PROFILE(
"const Filename &ConfigVariableFilename::get_ref_value() const",
" ", TAU_USER);
229 if (!is_cache_valid(_local_modified)) {
std::string get_dirname() const
Returns the directory part of the filename.
const std::string & get_string_value() const
Returns the value assigned to this variable.
std::string get_extension() const
Returns the file extension.
This is a convenience class to specialize ConfigVariable as a Filename type.
static Filename expand_from(const std::string &user_string, Type type=T_general)
Returns the same thing as from_os_specific(), but embedded environment variable references (e....
void set_string_value(const std::string &value)
Changes the value assigned to this variable.
std::string get_basename_wo_extension() const
Returns the basename part of the filename, without the file extension.
std::string get_basename() const
Returns the basename part of the filename.
set_value
Reassigns the variable's local value.
Filename get_word(size_t n) const
Returns the variable's nth value.
std::string get_dirname() const
Returns the directory part of the filename.
This is a generic, untyped ConfigVariable.
The name of a file, such as a texture file or an Egg file.
std::string get_basename_wo_extension() const
Returns the basename part of the filename, without the file extension.
std::string get_fullpath() const
Returns the entire filename: directory, basename, extension.
std::string get_fullpath() const
Returns the entire filename: directory, basename, extension.
void set_word(size_t n, const Filename &value)
Reassigns the variable's nth value.
std::string get_fullpath_wo_extension() const
Returns the full filename–directory and basename parts–except for the extension.
std::string get_extension() const
Returns the file extension.
std::string get_basename() const
Returns the basename part of the filename.
A single declaration of a config variable, typically defined as one line in a .prc file,...
void operator=(const Filename &value)
Reassigns the variable's local value.
std::string get_fullpath_wo_extension() const
Returns the full filename–directory and basename parts–except for the extension.