#include <jdxtypes.h>

Public Member Functions | |
| JDXfileName () | |
| JDXfileName (const STD_string &filename, const STD_string &name="", bool userParameter=true, compatMode mode=notBroken, parameterMode parameter_mode=edit) | |
| JDXfileName (const JDXfileName &jf) | |
| JDXfileName & | operator= (const STD_string &filename) |
| JDXfileName & | operator= (const JDXfileName &jf) |
| bool | exists () const |
| STD_string | get_basename () const |
| STD_string | get_basename_nosuffix () const |
| STD_string | get_dirname () const |
| STD_string | get_suffix () const |
| JDXfileName & | set_suffix (const STD_string &suff) |
| STD_string | get_defaultdir () const |
| JDXfileName & | set_defaultdir (const STD_string &defdir) |
| bool | is_dir () const |
| JDXfileName & | set_dir (bool flag) |
| bool | parsevalstring (const STD_string &parstring) |
| const char * | get_typeInfo () const |
| JcampDxClass * | create_copy () const |
STD_string myfile="/somedir/anotherdir/file.txt";
STD_string myfile_base=JDXfileName(myfile).get_basename();
STD_cout << "myfile_base=" << myfile_base << STD_endl;
STD_string myfile_base_nosuffix=JDXfileName(myfile).get_basename_nosuffix();
STD_cout << "myfile_base_nosuffix=" << myfile_base_nosuffix << STD_endl;
STD_string myfile_dir= JDXfileName(myfile).get_dirname();
STD_cout << "myfile_dir=" << myfile_dir << STD_endl;
Definition at line 421 of file jdxtypes.h.
| JDXfileName::JDXfileName | ( | ) | [inline] |
Default constructor
Definition at line 428 of file jdxtypes.h.
| JDXfileName::JDXfileName | ( | const STD_string & | filename, | |
| const STD_string & | name = "", |
|||
| bool | userParameter = true, |
|||
| compatMode | mode = notBroken, |
|||
| parameterMode | parameter_mode = edit | |||
| ) |
Constructor with the following arguments:
| JDXfileName::JDXfileName | ( | const JDXfileName & | jf | ) |
Copy constructor
| JDXfileName& JDXfileName::operator= | ( | const STD_string & | filename | ) |
Assignment from a string
Reimplemented from JDXstring.
| JDXfileName& JDXfileName::operator= | ( | const JDXfileName & | jf | ) |
Assignment operator
| bool JDXfileName::exists | ( | ) | const |
Returns 'true' only if the file/directory exists
| STD_string JDXfileName::get_basename | ( | ) | const [inline] |
Returns the filename without preceeding directories
Definition at line 465 of file jdxtypes.h.
| STD_string JDXfileName::get_basename_nosuffix | ( | ) | const |
Returns the filename without preceeding directories and without a previously specified suffix (file extension)
| STD_string JDXfileName::get_dirname | ( | ) | const [inline] |
Returns the directory of the filename
Definition at line 476 of file jdxtypes.h.
| STD_string JDXfileName::get_suffix | ( | ) | const [inline] |
Returns the suffix (file extension) of the filename
Definition at line 481 of file jdxtypes.h.
| JDXfileName& JDXfileName::set_suffix | ( | const STD_string & | suff | ) | [inline] |
Sets/overwrites the suffix (file extension) of the filename
Definition at line 486 of file jdxtypes.h.
| STD_string JDXfileName::get_defaultdir | ( | ) | const [inline] |
Returns the default location of the filename
Definition at line 491 of file jdxtypes.h.
| JDXfileName& JDXfileName::set_defaultdir | ( | const STD_string & | defdir | ) |
Sets the default location of the filename
| bool JDXfileName::is_dir | ( | ) | const [inline] |
Returns whether used exclusively for directory names
Definition at line 502 of file jdxtypes.h.
| JDXfileName& JDXfileName::set_dir | ( | bool | flag | ) | [inline] |
Specifies whether used exclusively for directory names
Definition at line 507 of file jdxtypes.h.
| bool JDXfileName::parsevalstring | ( | const STD_string & | ) | [virtual] |
Parses and assigns the value in the given string
Reimplemented from JDXstring.
| const char* JDXfileName::get_typeInfo | ( | ) | const [inline, virtual] |
Returns a string describing the type of the parameter
Reimplemented from JDXstring.
Definition at line 512 of file jdxtypes.h.
| JcampDxClass* JDXfileName::create_copy | ( | ) | const [inline, virtual] |
Returns a deep copy of the parameter
Reimplemented from JDXstring.
Definition at line 513 of file jdxtypes.h.
1.5.6