40 #ifndef INCLUDED_FILE_PATH_CLASS_H
41 #define INCLUDED_FILE_PATH_CLASS_H
80 GLS_EXPORT
bool IsValid()
const;
113 GLS_EXPORT std::string
Directory()
const;
117 GLS_EXPORT std::string
FileName()
const;
133 inline bool operator!=(
const FilePathClass& path )
const {
return !( *
this == path ); }
135 friend std::ostream& operator<<( std::ostream& outstr,
const FilePathClass& path )
137 outstr << path.Path();
141 friend std::istream& operator>>( std::istream& instr,
FilePathClass& path )
194 static GLS_EXPORT
const char _emptyTag[];
207 , _attribPtr( attribPtr )
208 , _basePath( basePath )
209 , _useEmptyTag( useEmptyTag )
223 , _attribPtr( &_localStoragePath )
224 , _localStoragePath( initialValue )
225 , _basePath( basePath )
226 , _useEmptyTag( useEmptyTag )
230 static const char* GetEmptyTag() {
return _emptyTag; }
238 *_attribPtr = *( ptr->_attribPtr );
248 virtual GLS_EXPORT std::ostream&
WriteValue( std::ostream& outstr )
254 if( _useEmptyTag && _attribPtr->
FileName().empty() )
268 virtual GLS_EXPORT std::istream&
ReadValue( std::istream& instr )
271 GetToEnd( instr, strPath,
true );
277 if( strPath == _emptyTag )
307 virtual GLS_EXPORT std::ostream&
WriteValue( std::ostream& outstr )
315 virtual GLS_EXPORT std::istream&
ReadValue( std::istream& instr )
327 #endif //_PATH_CLASS_H
std::string FileName() const
FilePathClass & operator=(const FilePathClass &path)
virtual std::istream & ReadValue(std::istream &instr)
Definition: file_path_class.h:315
static bool StringIsValidPath(const std::string &strPath)
void WritePathString(const FilePathClass &basePath, std::string *strPath)
static bool StringIsAbsolutePath(const std::string &strPath)
virtual DistiAttributeBase & operator=(const DistiAttributeBase &oldClass)
virtual DistiAttributeBase & operator=(const DistiAttributeBase &oldClass)
Definition: file_path_class.h:232
const std::string & Path() const
Definition: file_path_class.h:109
virtual std::ostream & WriteValue(std::ostream &outstr)
Definition: file_path_class.h:307
bool ReadPathString(const FilePathClass &basePath, const std::string &strPath)
std::string FileExtension() const
DistiAttributeCWDRelativePath(CallbackMethodCallerBase *callback, const AttributeName &name, FilePathClass *attribPtr, bool useEmptyTag=false)
Definition: file_path_class.h:296
virtual std::istream & ReadValue(std::istream &instr)
Definition: file_path_class.h:268
virtual void CallCallback()
DistiAttributeCWDRelativePath(CallbackMethodCallerBase *callback, const AttributeName &name, FilePathClass initialValue, bool useEmptyTag=false)
Definition: file_path_class.h:302
static const std::string & InvalidPathChars()
virtual std::ostream & WriteValue(std::ostream &outstr)
Definition: file_path_class.h:248
Generally useful defines, macros, enumerations and function prototypes.
static bool StringIsRelativePath(const std::string &strPath)
DistiAttributeFilePathClass(const FilePathClass &basePath, CallbackMethodCallerBase *callback, const AttributeName &name, FilePathClass initialValue, bool useEmptyTag=false)
Definition: file_path_class.h:221
Definition: disti_metadata.h:182
std::string Directory() const
Definition: file_path_class.h:60
Definition: callback_caller_base.h:55
std::string PathRelativeTo(const FilePathClass &basePath) const
Definition: file_path_class.h:291
bool _writeAsAbsolutePath
Definition: file_path_class.h:69
bool operator==(const FilePathClass &path) const
DistiAttributeFilePathClass(const FilePathClass &basePath, CallbackMethodCallerBase *callback, const AttributeName &name, FilePathClass *attribPtr, bool useEmptyTag=false)
Definition: file_path_class.h:205
bool _useEmptyTag
Definition: file_path_class.h:193
Definition: file_path_class.h:187
Definition: disti_metadata.h:84
Definition: bmpimage.h:46
void WriteAsAbsolutePath(bool value)
Definition: file_path_class.h:164
std::string _path
Definition: file_path_class.h:65