Panda3D
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties
Public Member Functions
ConfigVariableFilename Class Reference

This is a convenience class to specialize ConfigVariable as a Filename type. More...

Inheritance diagram for ConfigVariableFilename:
ConfigVariable ConfigVariableBase ConfigFlags

List of all members.

Public Member Functions

 ConfigVariableFilename (string name)
 ConfigVariableFilename (string name, Filename const default_value, string description, int flags)
 ConfigVariableFilename (string name, Filename const default_value, string description)
 ConfigVariableFilename (string name, Filename const default_value)
string cStr ()
bool empty ()
string getBasename ()
 Returns the basename part of the filename.
string getBasenameWoExtension ()
 Returns the basename part of the filename, without the file extension.
Filename getDefaultValue ()
 Returns the variable's default value.
string getDirname ()
 Returns the directory part of the filename.
string getExtension ()
 Returns the file extension.
string getFullpath ()
 Returns the entire filename: directory, basename, extension.
string getFullpathWoExtension ()
 Returns the full filename--directory and basename parts--except for the extension.
Filename getValue ()
 Returns the variable's value.
Filename getWord (int n)
 Returns the variable's nth value.
unsigned int length ()
bool operator!= (Filename const other)
bool operator< (Filename const other)
ConfigVariableFilename operator= (Filename const value)
 Reassigns the variable's local value.
bool operator== (Filename const other)
char operator[] (int n)
 setValue (Filename const value)
 Reassigns the variable's local value.
 setWord (int n, Filename const value)
 Reassigns the variable's nth value.

Detailed Description

This is a convenience class to specialize ConfigVariable as a Filename type.

It is almost the same thing as ConfigVariableString, except it handles an implicit Filename::expand_from() operation so that the user may put OS-specific filenames, or filenames based on environment variables, in the prc file.


Constructor & Destructor Documentation

ConfigVariableFilename ( string  name)
ConfigVariableFilename ( string  name,
Filename const  default_value,
string  description,
int  flags 
)
ConfigVariableFilename ( string  name,
Filename const  default_value,
string  description 
)
ConfigVariableFilename ( string  name,
Filename const  default_value 
)

Member Function Documentation

string cStr ( )
bool empty ( )
string getBasename ( )

Returns the basename part of the filename.

This is everything in the filename after the rightmost slash, including any extensions.

Returns the basename part of the filename, without the file extension.

Returns the variable's default value.

Reimplemented from ConfigVariable.

string getDirname ( )

Returns the directory part of the filename.

This is everything in the filename up to, but not including the rightmost slash.

string getExtension ( )

Returns the file extension.

This is everything after the rightmost dot, if there is one, or the empty string if there is not.

string getFullpath ( )

Returns the entire filename: directory, basename, extension.

This is the same thing returned by the string typecast operator, so this function is a little redundant.

Returns the full filename--directory and basename parts--except for the extension.

Returns the variable's value.

Returns the variable's nth value.

unsigned int length ( )
bool operator!= ( Filename const  other)
bool operator< ( Filename const  other)
ConfigVariableFilename operator= ( Filename const  value)

Reassigns the variable's local value.

bool operator== ( Filename const  other)
char operator[] ( int  n)
setValue ( Filename const  value)

Reassigns the variable's local value.

setWord ( int  n,
Filename const  value 
)

Reassigns the variable's nth value.

This makes a local copy of the variable's overall value.

 All Classes Namespaces Functions Variables Enumerations Enumerator Properties