diff options
author | Dimitri van Heesch <doxygen@gmail.com> | 2020-04-06 17:19:07 (GMT) |
---|---|---|
committer | Dimitri van Heesch <doxygen@gmail.com> | 2020-04-06 17:19:07 (GMT) |
commit | 4bc2355373979726c7ed4e8351639123daf808cb (patch) | |
tree | 920279c4bfbff5531fd2e1b4eca1eb142a7b7fb6 /src/filename.h | |
parent | b4b47b3919650d7350acc9fe59becaee4a3d5ff5 (diff) | |
download | Doxygen-4bc2355373979726c7ed4e8351639123daf808cb.zip Doxygen-4bc2355373979726c7ed4e8351639123daf808cb.tar.gz Doxygen-4bc2355373979726c7ed4e8351639123daf808cb.tar.bz2 |
Replaced FileNameDict/FileNameList by FileNameLinkedMap
Diffstat (limited to 'src/filename.h')
-rw-r--r-- | src/filename.h | 64 |
1 files changed, 18 insertions, 46 deletions
diff --git a/src/filename.h b/src/filename.h index fbee0e1..c3a0d3e 100644 --- a/src/filename.h +++ b/src/filename.h @@ -1,12 +1,10 @@ /****************************************************************************** * - * - * - * Copyright (C) 1997-2015 by Dimitri van Heesch. + * Copyright (C) 1997-2020 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its - * documentation under the terms of the GNU General Public License is hereby - * granted. No representations are made about the suitability of this software + * documentation under the terms of the GNU General Public License is hereby + * granted. No representations are made about the suitability of this software * for any purpose. It is provided "as is" without express or implied warranty. * See the GNU General Public License for more details. * @@ -18,57 +16,31 @@ #ifndef FILENAME_H #define FILENAME_H -#include <qdict.h> -#include <qlist.h> -#include "filedef.h" +#include <memory> +#include <vector> -/** Class representing all files with a certain base name */ -class FileName : public FileList -{ - public: - FileName(const char *fn,const char *name); - ~FileName(); - const char *fileName() const { return name; } - const char *fullName() const { return fName; } - void generateDiskNames(); +#include "linkedmap.h" - private: - int compareValues(const FileDef *item1,const FileDef *item2) const; - QCString name; - QCString fName; -}; +class FileDef; -/** Iterator for FileDef objects in a FileName list. */ -class FileNameIterator : public QListIterator<FileDef> +/** Class representing all files with a certain base name */ +class FileName : public std::vector< std::unique_ptr<FileDef> > { public: - FileNameIterator(const FileName &list); -}; + FileName(const char *nm,const char *fn) : m_name(nm), m_fName(fn), m_pathName("tmp") {} + const char *fileName() const { return m_name; } + const char *fullName() const { return m_fName; } + const char *path() const { return m_pathName; } -/** Class representing a list of FileName objects. */ -class FileNameList : public QList<FileName> -{ - public: - FileNameList(); - ~FileNameList(); - void generateDiskNames(); private: - int compareValues(const FileName *item1,const FileName *item2) const; + QCString m_name; + QCString m_fName; + QCString m_pathName; }; -/** Iterator for FileName objects in a FileNameList. */ -class FileNameListIterator : public QListIterator<FileName> +/** Ordered dictionary of FileName objects. */ +class FileNameLinkedMap : public LinkedMap<FileName> { - public: - FileNameListIterator( const FileNameList &list ); -}; - -/** Unsorted dictionary of FileName objects. */ -class FileNameDict : public QDict<FileName> -{ - public: - FileNameDict(uint size); - ~FileNameDict() {} }; #endif |