diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2010-06-20 11:42:33 +0000 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2010-06-20 11:42:33 +0000 |
| commit | 237f15b491fe98768ec2e04fa9a69ca6411dd99e (patch) | |
| tree | 5f6dd8ae8249437a516d916e25aa3fc998001085 /src/FileEntry.h | |
| parent | b352b97bc666b51c2fa9cd9e129f407c621b280e (diff) | |
2010-06-20 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Moved non-trivial functions to *.cc file
* src/DownloadContext.cc
* src/DownloadContext.h
* src/FileEntry.cc
* src/FileEntry.h
Diffstat (limited to 'src/FileEntry.h')
| -rw-r--r-- | src/FileEntry.h | 37 |
1 files changed, 5 insertions, 32 deletions
diff --git a/src/FileEntry.h b/src/FileEntry.h index 529a7bc2..8e5e2687 100644 --- a/src/FileEntry.h +++ b/src/FileEntry.h @@ -84,15 +84,9 @@ public: FileEntry& operator=(const FileEntry& entry); - std::string getBasename() const - { - return File(_path).getBasename(); - } + std::string getBasename() const; - std::string getDirname() const - { - return File(_path).getDirname(); - } + std::string getDirname() const; const std::string& getPath() const { return _path; } @@ -129,11 +123,7 @@ public: return _spentUris; } - size_t setUris(const std::vector<std::string>& uris) - { - _uris.clear(); - return addUris(uris.begin(), uris.end()); - } + size_t setUris(const std::vector<std::string>& uris); template<typename InputIterator> size_t addUris(InputIterator first, InputIterator last) @@ -147,26 +137,9 @@ public: return count; } - bool addUri(const std::string& uri) - { - if(Request().setUri(uri)) { - _uris.push_back(uri); - return true; - } else { - return false; - } - } + bool addUri(const std::string& uri); - bool insertUri(const std::string& uri, size_t pos) - { - if(Request().setUri(uri)) { - pos = std::min(pos, _uris.size()); - _uris.insert(_uris.begin()+pos, uri); - return true; - } else { - return false; - } - } + bool insertUri(const std::string& uri, size_t pos); // Inserts _uris and _spentUris into uris. void getUris(std::vector<std::string>& uris) const; |
