2008-02-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>

Removed "using namespace std;" from all sources. Appended std:: 
prefix to c++
	standard classes.
	Included string.h where mem* function are used.
This commit is contained in:
Tatsuhiro Tsujikawa 2008-02-08 15:53:45 +00:00
parent d82e183d34
commit 1b7c198289
801 changed files with 12024 additions and 8627 deletions

View file

@ -36,16 +36,20 @@
#define _D_ABSTRACT_SINGLE_DISK_ADAPTOR_H_
#include "DiskAdaptor.h"
#include "DiskWriter.h"
namespace aria2 {
class DiskWriter;
class FileAllocationIterator;
class AbstractSingleDiskAdaptor : public DiskAdaptor {
protected:
DiskWriterHandle diskWriter;
SharedHandle<DiskWriter> diskWriter;
int64_t totalLength;
public:
AbstractSingleDiskAdaptor():diskWriter(0), totalLength(0) {}
AbstractSingleDiskAdaptor();
virtual ~AbstractSingleDiskAdaptor() {}
virtual ~AbstractSingleDiskAdaptor();
virtual void initAndOpenFile();
@ -62,38 +66,27 @@ public:
virtual bool fileExists();
virtual int64_t size() const
{
return diskWriter->size();
}
virtual int64_t size() const;
virtual void truncate(int64_t length)
{
diskWriter->truncate(length);
}
virtual void truncate(int64_t length);
virtual FileAllocationIteratorHandle fileAllocationIterator();
virtual SharedHandle<FileAllocationIterator> fileAllocationIterator();
virtual void enableDirectIO();
virtual void disableDirectIO();
virtual bool directIOAllowed() const
{
return diskWriter->directIOAllowed();
}
virtual bool directIOAllowed() const;
void setDiskWriter(const DiskWriterHandle diskWriter) {
this->diskWriter = diskWriter;
}
void setDiskWriter(const SharedHandle<DiskWriter>& diskWriter);
DiskWriterHandle getDiskWriter() const { return diskWriter; }
SharedHandle<DiskWriter> getDiskWriter() const;
void setTotalLength(const int64_t& totalLength) {
this->totalLength = totalLength;
}
void setTotalLength(const int64_t& totalLength);
int64_t getTotalLength() const { return totalLength; }
int64_t getTotalLength() const;
};
} // namespace aria2
#endif // _D_ABSTRACT_SINGLE_DISK_ADAPTOR_H_