Replaced InOrder with Inorder.

pull/1/head
Tatsuhiro Tsujikawa 2011-06-11 21:49:09 +09:00
parent 8566fde624
commit 65ec9e98df
11 changed files with 34 additions and 34 deletions

View File

@ -57,7 +57,7 @@
#include "fmt.h"
#include "RarestPieceSelector.h"
#include "DefaultStreamPieceSelector.h"
#include "InOrderStreamPieceSelector.h"
#include "InorderStreamPieceSelector.h"
#include "array_fun.h"
#include "PieceStatMan.h"
#include "wallclock.h"

View File

@ -32,17 +32,17 @@
* files in the program, then also delete it here.
*/
/* copyright --> */
#include "InOrderURISelector.h"
#include "InorderURISelector.h"
#include "A2STR.h"
#include "FileEntry.h"
namespace aria2 {
InOrderURISelector::InOrderURISelector() {}
InorderURISelector::InorderURISelector() {}
InOrderURISelector::~InOrderURISelector() {}
InorderURISelector::~InorderURISelector() {}
std::string InOrderURISelector::select
std::string InorderURISelector::select
(FileEntry* fileEntry,
const std::vector<std::pair<size_t, std::string> >& usedHosts)
{

View File

@ -32,17 +32,17 @@
* files in the program, then also delete it here.
*/
/* copyright --> */
#ifndef D_IN_ORDER_URI_SELECTOR_H
#define D_IN_ORDER_URI_SELECTOR_H
#ifndef D_INORDER_URI_SELECTOR_H
#define D_INORDER_URI_SELECTOR_H
#include "URISelector.h"
namespace aria2 {
class InOrderURISelector:public URISelector {
class InorderURISelector:public URISelector {
public:
InOrderURISelector();
InorderURISelector();
virtual ~InOrderURISelector();
virtual ~InorderURISelector();
virtual std::string select
(FileEntry* fileEntry,
@ -50,4 +50,4 @@ public:
};
} // namespace aria2
#endif // D_IN_ORDER_URI_SELECTOR_H
#endif // D_INORDER_URI_SELECTOR_H

View File

@ -177,7 +177,7 @@ SRCS = Socket.h\
ServerStatMan.cc ServerStatMan.h\
URISelector.h\
AdaptiveURISelector.cc AdaptiveURISelector.h\
InOrderURISelector.cc InOrderURISelector.h\
InorderURISelector.cc InorderURISelector.h\
FeedbackURISelector.cc FeedbackURISelector.h\
NsCookieParser.cc NsCookieParser.h\
CookieStorage.cc CookieStorage.h\

View File

@ -71,7 +71,7 @@
#include "fmt.h"
#include "A2STR.h"
#include "URISelector.h"
#include "InOrderURISelector.h"
#include "InorderURISelector.h"
#include "PieceSelector.h"
#include "a2functional.h"
#include "SocketCore.h"
@ -136,7 +136,7 @@ RequestGroup::RequestGroup(const SharedHandle<Option>& option)
forceHaltRequested_(false),
haltReason_(RequestGroup::NONE),
pauseRequested_(false),
uriSelector_(new InOrderURISelector()),
uriSelector_(new InorderURISelector()),
lastModifiedTime_(Time::null()),
fileNotFoundCount_(0),
timeout_(option->getAsInt(PREF_TIMEOUT)),

View File

@ -59,7 +59,7 @@
#include "PeerStat.h"
#include "SegmentMan.h"
#include "FeedbackURISelector.h"
#include "InOrderURISelector.h"
#include "InorderURISelector.h"
#include "AdaptiveURISelector.h"
#include "Option.h"
#include "prefs.h"
@ -468,7 +468,7 @@ void RequestGroupMan::configureRequestGroup
SharedHandle<URISelector> sel(new FeedbackURISelector(serverStatMan_));
requestGroup->setURISelector(sel);
} else if(uriSelectorValue == V_INORDER) {
SharedHandle<URISelector> sel(new InOrderURISelector());
SharedHandle<URISelector> sel(new InorderURISelector());
requestGroup->setURISelector(sel);
} else if(uriSelectorValue == V_ADAPTIVE) {
SharedHandle<URISelector> sel(new AdaptiveURISelector(serverStatMan_,

View File

@ -9,7 +9,7 @@
#include "Option.h"
#include "FileEntry.h"
#include "RarestPieceSelector.h"
#include "InOrderPieceSelector.h"
#include "InorderPieceSelector.h"
#include "DownloadContext.h"
#include "bittorrent_helper.h"
#include "DiskAdaptor.h"
@ -53,7 +53,7 @@ public:
peer.reset(new Peer("192.168.0.1", 6889));
peer->allocateSessionResource(dctx_->getPieceLength(),
dctx_->getTotalLength());
pieceSelector_.reset(new InOrderPieceSelector());
pieceSelector_.reset(new InorderPieceSelector());
}
void testGetTotalLength();

View File

@ -2,7 +2,7 @@
#include <cppunit/extensions/HelperMacros.h>
#include "InOrderURISelector.h"
#include "InorderURISelector.h"
#include "util.h"
namespace aria2 {
@ -91,7 +91,7 @@ void FileEntryTest::testExtractURIResult()
void FileEntryTest::testGetRequest()
{
SharedHandle<FileEntry> fileEntry = createFileEntry();
SharedHandle<InOrderURISelector> selector(new InOrderURISelector());
SharedHandle<InorderURISelector> selector(new InorderURISelector());
std::vector<std::pair<size_t, std::string> > usedHosts;
SharedHandle<Request> req =
fileEntry->getRequest(selector, true, usedHosts);
@ -135,7 +135,7 @@ void FileEntryTest::testGetRequest_withoutUriReuse()
std::vector<std::pair<size_t, std::string> > usedHosts;
SharedHandle<FileEntry> fileEntry = createFileEntry();
fileEntry->setMaxConnectionPerServer(2);
SharedHandle<InOrderURISelector> selector(new InOrderURISelector());
SharedHandle<InorderURISelector> selector(new InorderURISelector());
SharedHandle<Request> req = fileEntry->getRequest(selector, false, usedHosts);
CPPUNIT_ASSERT_EQUAL(std::string("localhost"), req->getHost());
CPPUNIT_ASSERT_EQUAL(std::string("http"), req->getProtocol());
@ -160,7 +160,7 @@ void FileEntryTest::testGetRequest_withUniqueProtocol()
std::vector<std::pair<size_t, std::string> > usedHosts;
SharedHandle<FileEntry> fileEntry = createFileEntry();
fileEntry->setUniqueProtocol(true);
SharedHandle<InOrderURISelector> selector(new InOrderURISelector());
SharedHandle<InorderURISelector> selector(new InorderURISelector());
SharedHandle<Request> req =
fileEntry->getRequest(selector, true, usedHosts);
CPPUNIT_ASSERT_EQUAL(std::string("localhost"), req->getHost());
@ -184,7 +184,7 @@ void FileEntryTest::testGetRequest_withUniqueProtocol()
void FileEntryTest::testReuseUri()
{
SharedHandle<InOrderURISelector> selector(new InOrderURISelector());
SharedHandle<InorderURISelector> selector(new InorderURISelector());
SharedHandle<FileEntry> fileEntry = createFileEntry();
fileEntry->setMaxConnectionPerServer(3);
size_t numUris = fileEntry->getRemainingUris().size();
@ -244,7 +244,7 @@ void FileEntryTest::testInsertUri()
void FileEntryTest::testRemoveUri()
{
std::vector<std::pair<size_t, std::string> > usedHosts;
SharedHandle<InOrderURISelector> selector(new InOrderURISelector());
SharedHandle<InorderURISelector> selector(new InorderURISelector());
FileEntry file;
file.addUri("http://example.org/");
CPPUNIT_ASSERT(file.removeUri("http://example.org/"));

View File

@ -6,7 +6,7 @@
namespace aria2 {
class InOrderPieceSelector:public PieceSelector {
class InorderPieceSelector:public PieceSelector {
public:
virtual bool select
(size_t& index, const unsigned char* bitfield, size_t nbits) const

View File

@ -1,4 +1,4 @@
#include "InOrderURISelector.h"
#include "InorderURISelector.h"
#include <cppunit/extensions/HelperMacros.h>
@ -9,15 +9,15 @@
namespace aria2 {
class InOrderURISelectorTest:public CppUnit::TestFixture {
class InorderURISelectorTest:public CppUnit::TestFixture {
CPPUNIT_TEST_SUITE(InOrderURISelectorTest);
CPPUNIT_TEST_SUITE(InorderURISelectorTest);
CPPUNIT_TEST(testSelect);
CPPUNIT_TEST_SUITE_END();
private:
FileEntry fileEntry_;
SharedHandle<InOrderURISelector> sel;
SharedHandle<InorderURISelector> sel;
public:
void setUp()
@ -32,7 +32,7 @@ public:
fileEntry_.setUris(uris);
sel.reset(new InOrderURISelector());
sel.reset(new InorderURISelector());
}
void tearDown() {}
@ -41,9 +41,9 @@ public:
};
CPPUNIT_TEST_SUITE_REGISTRATION(InOrderURISelectorTest);
CPPUNIT_TEST_SUITE_REGISTRATION(InorderURISelectorTest);
void InOrderURISelectorTest::testSelect()
void InorderURISelectorTest::testSelect()
{
std::vector<std::pair<size_t, std::string> > usedHosts;
CPPUNIT_ASSERT_EQUAL(std::string("http://alpha/file"),

View File

@ -51,7 +51,7 @@ aria2c_SOURCES = AllTest.cc\
SignatureTest.cc\
ServerStatManTest.cc\
FeedbackURISelectorTest.cc\
InOrderURISelectorTest.cc\
InorderURISelectorTest.cc\
ServerStatTest.cc\
NsCookieParserTest.cc\
DirectDiskAdaptorTest.cc\
@ -65,7 +65,7 @@ aria2c_SOURCES = AllTest.cc\
SequentialPickerTest.cc\
RarestPieceSelectorTest.cc\
PieceStatManTest.cc\
InOrderPieceSelector.h\
InorderPieceSelector.h\
LongestSequencePieceSelectorTest.cc\
a2algoTest.cc\
bitfieldTest.cc\