#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 |
Public Member Functions inherited from JDXstring | |
| JDXstring () | |
| JDXstring (const STD_string &ss, const STD_string &name="", bool userParameter=true, compatMode mode=notBroken, parameterMode parameter_mode=edit, const STD_string &parx_equivalent="") | |
| JDXstring (int i, const char c=' ') | |
| JDXstring (const char *charptr) | |
| JDXstring (const JDXstring &str) | |
| JDXstring & | operator= (const char *charptr) |
| JDXstring & | operator= (const JDXstring &ss) |
| STD_string | printvalstring () const |
| STD_string | get_parx_code (parxCodeType type, const ParxEquiv &equiv) const |
| ParxEquiv | get_parx_equiv () const |
Public Member Functions inherited from JcampDxClass | |
| virtual STD_string | print () const |
| virtual STD_ostream & | print2stream (STD_ostream &os) const |
| virtual bool | parse (STD_string &parstring) |
| virtual int | load (const STD_string &filename) |
| virtual int | write (const STD_string &filename) const |
| virtual JcampDxClass & | set_compatmode (compatMode compat_mode) |
| virtual compatMode | get_compatmode () const |
| virtual double | get_minval () const |
| virtual double | get_maxval () const |
| bool | has_minmax () const |
| JcampDxClass & | set_userDefParameter (bool userDef) |
| bool | isUserDefParameter () const |
| const STD_string & | get_description () const |
| JcampDxClass & | set_description (const STD_string &descr) |
| virtual svector | get_alternatives () const |
| const STD_string & | get_unit () const |
| JcampDxClass & | set_unit (const STD_string &un) |
| virtual parameterMode | get_parmode () const |
| virtual JcampDxClass & | set_parmode (parameterMode parameter_mode) |
| virtual fileMode | get_filemode () const |
| virtual JcampDxClass & | set_filemode (fileMode file_mode) |
| virtual GuiProps | get_gui_props () const |
| virtual JcampDxClass & | set_gui_props (const GuiProps &) |
Public Member Functions inherited from Labeled | |
| Labeled (const STD_string &label="unnamed") | |
| Labeled & | set_label (const STD_string &label) |
| const STD_string & | get_label () const |
| Labeled & | operator= (const Labeled &l) |
JCAMP-DX class for representing file names. Besides using JDXfileName as a convenient way within the UI to display/retrieve/browse file names, it can be used to analyze file paths, for example in the following way:
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.
|
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
|
inlinevirtual |
Returns a deep copy of the parameter
Reimplemented from JDXstring.
Definition at line 513 of file jdxtypes.h.
| bool JDXfileName::exists | ( | ) | const |
Returns 'true' only if the file/directory exists
|
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)
|
inline |
Returns the default location of the filename
Definition at line 491 of file jdxtypes.h.
|
inline |
Returns the directory of the filename
Definition at line 476 of file jdxtypes.h.
|
inline |
Returns the suffix (file extension) of the filename
Definition at line 481 of file jdxtypes.h.
|
inlinevirtual |
Returns a string describing the type of the parameter
Reimplemented from JDXstring.
Definition at line 512 of file jdxtypes.h.
|
inline |
Returns whether used exclusively for directory names
Definition at line 502 of file jdxtypes.h.
| JDXfileName& JDXfileName::operator= | ( | const STD_string & | filename | ) |
Assignment from a string
Reimplemented from JDXstring.
| JDXfileName& JDXfileName::operator= | ( | const JDXfileName & | jf | ) |
Assignment operator
|
virtual |
Parses and assigns the value in the given string
Reimplemented from JDXstring.
| JDXfileName& JDXfileName::set_defaultdir | ( | const STD_string & | defdir | ) |
Sets the default location of the filename
|
inline |
Specifies whether used exclusively for directory names
Definition at line 507 of file jdxtypes.h.
|
inline |
Sets/overwrites the suffix (file extension) of the filename
Definition at line 486 of file jdxtypes.h.
1.8.1.2