21 INLINE ConfigVariableFilename::
22 ConfigVariableFilename(
const string &name) :
24 _local_modified(initial_invalid_cache())
34 INLINE ConfigVariableFilename::
35 ConfigVariableFilename(
const string &name,
const Filename &default_value,
36 const string &description,
int flags) :
37 #ifdef PRC_SAVE_DESCRIPTIONS
42 _local_modified(initial_invalid_cache())
44 _core->set_default_value(default_value);
63 INLINE ConfigVariableFilename::
65 return get_ref_value();
73 INLINE
const char *ConfigVariableFilename::
75 return get_ref_value().c_str();
83 INLINE
bool ConfigVariableFilename::
85 return get_ref_value().empty();
93 INLINE
size_t ConfigVariableFilename::
95 return get_ref_value().length();
103 INLINE
char ConfigVariableFilename::
104 operator [] (
int n)
const {
105 return get_ref_value()[n];
188 INLINE
bool ConfigVariableFilename::
189 operator == (
const Filename &other)
const {
190 return get_ref_value() == other;
198 INLINE
bool ConfigVariableFilename::
199 operator != (
const Filename &other)
const {
200 return get_ref_value() != other;
208 INLINE
bool ConfigVariableFilename::
209 operator < (
const Filename &other)
const {
210 return get_ref_value() < other;
234 return get_ref_value();
280 INLINE
const Filename &ConfigVariableFilename::
281 get_ref_value()
const {
282 TAU_PROFILE(
"const Filename &ConfigVariableFilename::get_ref_value() const",
" ", TAU_USER);
283 if (!is_cache_valid(_local_modified)) {
string get_fullpath() const
Returns the entire filename: directory, basename, extension.
string get_fullpath_wo_extension() const
Returns the full filename–directory and basename parts–except for the extension.
void set_word(int n, const Filename &value)
Reassigns the variable's nth value.
string get_extension() const
Returns the file extension.
const string & get_string_value() const
Returns the value assigned to this variable.
This is a convenience class to specialize ConfigVariable as a Filename type.
string get_string_word(int n) const
Returns the string value of the nth word of the variable's value, or empty string if there is no nth ...
Filename get_default_value() const
Returns the variable's default value.
string get_dirname() const
Returns the directory part of the filename.
static Filename expand_from(const string &user_string, Type type=T_general)
Returns the same thing as from_os_specific(), but embedded environment variable references (e...
Filename get_value() const
Returns the variable's value.
const ConfigDeclaration * get_default_value() const
Returns the default variable specified for this variable.
This is a generic, untyped ConfigVariable.
The name of a file, such as a texture file or an Egg file.
void set_value(const Filename &value)
Reassigns the variable's local value.
string get_basename() const
Returns the basename part of the filename.
string get_dirname() const
Returns the directory part of the filename.
string get_basename_wo_extension() const
Returns the basename part of the filename, without the file extension.
string get_fullpath() const
Returns the entire filename: directory, basename, extension.
Filename get_word(int n) const
Returns the variable's nth value.
string get_basename() const
Returns the basename part of the filename.
void set_string_value(const string &value)
Changes the value assigned to this variable.
string get_fullpath_wo_extension() const
Returns the full filename–directory and basename parts–except for the extension.
string get_extension() const
Returns the file extension.
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.
void set_string_word(int n, const string &value)
Changes the nth word to the indicated value without affecting the other words.
string get_basename_wo_extension() const
Returns the basename part of the filename, without the file extension.