00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef CONFIGVARIABLEFILENAME_H
00016 #define CONFIGVARIABLEFILENAME_H
00017
00018 #include "dtoolbase.h"
00019 #include "configVariable.h"
00020 #include "filename.h"
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030 class EXPCL_DTOOLCONFIG ConfigVariableFilename : public ConfigVariable {
00031 PUBLISHED:
00032 INLINE ConfigVariableFilename(const string &name);
00033 INLINE ConfigVariableFilename(const string &name, const Filename &default_value,
00034 const string &description = string(), int flags = 0);
00035
00036 INLINE void operator = (const Filename &value);
00037 INLINE operator const Filename &() const;
00038
00039
00040
00041 INLINE const char *c_str() const;
00042 INLINE bool empty() const;
00043 INLINE size_t length() const;
00044 INLINE char operator [] (int n) const;
00045
00046 INLINE string get_fullpath() const;
00047 INLINE string get_dirname() const;
00048 INLINE string get_basename() const;
00049 INLINE string get_fullpath_wo_extension() const;
00050 INLINE string get_basename_wo_extension() const;
00051 INLINE string get_extension() const;
00052
00053
00054 INLINE bool operator == (const Filename &other) const;
00055 INLINE bool operator != (const Filename &other) const;
00056 INLINE bool operator < (const Filename &other) const;
00057
00058 INLINE void set_value(const Filename &value);
00059 INLINE Filename get_value() const;
00060 INLINE Filename get_default_value() const;
00061
00062 INLINE Filename get_word(int n) const;
00063 INLINE void set_word(int n, const Filename &value);
00064
00065 private:
00066 void reload_cache();
00067 INLINE const Filename &get_ref_value() const;
00068
00069 private:
00070 AtomicAdjust::Integer _local_modified;
00071 Filename _cache;
00072 };
00073
00074 #include "configVariableFilename.I"
00075
00076 #endif