17INLINE ConfigVariableFilename::
18ConfigVariableFilename(
const std::string &name) :
20 _local_modified(initial_invalid_cache())
28INLINE ConfigVariableFilename::
29ConfigVariableFilename(
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);
53INLINE ConfigVariableFilename::
55 return get_ref_value();
61INLINE
const char *ConfigVariableFilename::
63 return get_ref_value().c_str();
69INLINE
bool ConfigVariableFilename::
71 return get_ref_value().empty();
77INLINE
size_t ConfigVariableFilename::
79 return get_ref_value().length();
85INLINE
char ConfigVariableFilename::
86operator [] (
size_t n)
const {
87 return get_ref_value()[n];
151INLINE
bool ConfigVariableFilename::
152operator == (
const Filename &other)
const {
153 return get_ref_value() == other;
159INLINE
bool ConfigVariableFilename::
160operator != (
const Filename &other)
const {
161 return get_ref_value() != other;
167INLINE
bool ConfigVariableFilename::
168operator < (
const Filename &other)
const {
169 return get_ref_value() < other;
189 return get_ref_value();
198 if (decl !=
nullptr) {
209 return Filename::expand_from(get_string_word(n));
218 set_string_word(n, value);
237INLINE
const Filename &ConfigVariableFilename::
238get_ref_value()
const {
239 TAU_PROFILE(
"const Filename &ConfigVariableFilename::get_ref_value() const",
" ", TAU_USER);
240 if (!is_cache_valid(_local_modified)) {
A single declaration of a config variable, typically defined as one line in a .prc file,...
const std::string & get_string_value() const
Returns the value assigned to this variable.
This is a convenience class to specialize ConfigVariable as a Filename type.
std::wstring __fspath__() const
Allows a ConfigVariableFilename object to be passed to any Python function that accepts an os....
std::string get_basename() const
Returns the basename part of the filename.
set_value
Reassigns the variable's local value.
void operator=(const Filename &value)
Reassigns the variable's local value.
std::string get_fullpath() const
Returns the entire filename: directory, basename, extension.
std::string get_dirname() const
Returns the directory part of the filename.
Filename get_word(size_t n) const
Returns the variable's nth value.
get_default_value
Returns the variable's default 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.
void set_word(size_t n, const Filename &value)
Reassigns the variable's nth value.
get_value
Returns the variable's value.
std::string get_basename_wo_extension() const
Returns the basename part of the filename, without the file extension.
This is a generic, untyped ConfigVariable.
void set_string_value(const std::string &value)
Changes the value assigned to this variable.
The name of a file, such as a texture file or an Egg file.
std::string get_basename() const
Returns the basename part of the filename.
std::string get_fullpath_wo_extension() const
Returns the full filename–directory and basename parts–except for the extension.
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....
std::wstring to_os_specific_w() const
The wide-string variant on to_os_specific().
std::string get_fullpath() const
Returns the entire filename: directory, basename, extension.
std::string get_extension() const
Returns the file extension.
std::string get_basename_wo_extension() const
Returns the basename part of the filename, without the file extension.
std::string get_dirname() const
Returns the directory part of the filename.