Commit Graph

19 Commits (1e4f301ec1d64ada5926facb0115d029c2995c38)

Author SHA1 Message Date
Tatsuhiro Tsujikawa ae2e4cb7ff Handle OptionHandlers as raw pointer 2012-09-27 22:45:31 +09:00
Tatsuhiro Tsujikawa 295a62f538 Rewritten help tags and various internal flag handling in OptionHandler
Now help tags are defined as enum values to avoid vector of strings.
The internal flags are represented by bitmask to shrink size.
2012-09-23 14:59:05 +09:00
Tatsuhiro Tsujikawa dd8824ab11 Don't compare c-strng using CPPUNIT_ASSERT_EQUAL 2011-12-02 00:30:11 +09:00
Tatsuhiro Tsujikawa 35a3f41346 Made Pref::k_, OptionHandler::getName() and getDescription() const char*. 2011-11-11 01:59:23 +09:00
Tatsuhiro Tsujikawa d5c8d048ef Rewritten OptionParser. Made it simpler and efficient. 2011-10-22 01:03:14 +09:00
Tatsuhiro Tsujikawa 3832ed97c6 Rewritten Option. Introduced Pref.
Now preference key is Pref instead of just string.  It has Option
ID. Now option lookup and setting takes O(1) using Pref object.
2011-10-21 21:56:42 +09:00
Tatsuhiro Tsujikawa 0f9b59cdce Fixed compile error with g++-4.6.1 2011-05-21 00:04:25 +09:00
Tatsuhiro Tsujikawa 3941c72219 Added test for OptionParser::getEraseAfterParse() 2011-04-22 23:45:30 +09:00
Tatsuhiro Tsujikawa 93e5dbed32 2010-11-12 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Removed SharedHandle::isNull(). Instead we added operator* and
	operator unspecified_bool_type. Removed use of WeakHandle and
	replaced with raw pointer.
2010-11-12 12:48:48 +00:00
Tatsuhiro Tsujikawa ca4940622c 2010-06-21 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Changed naming standards for class member variable: now it looks
	like var_ instead of _var.
2010-06-21 13:51:56 +00:00
Tatsuhiro Tsujikawa 886f8ee58e 2010-03-25 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Removed arrayLength. Defined A2_ARRAY_LEN as macro to calculate
	size of array at compile time.
	* src/array_fun.h
	* test/BitfieldManTest.cc
	* test/BtPortMessageTest.cc
	* test/DHTRoutingTableDeserializerTest.cc
	* test/DHTRoutingTableSerializerTest.cc
	* test/DownloadHelperTest.cc
	* test/LongestSequencePieceSelectorTest.cc
	* test/MultiDiskAdaptorTest.cc
	* test/OptionParserTest.cc
	* test/PriorityPieceSelectorTest.cc
	* test/array_funTest.cc
2010-03-25 14:22:43 +00:00
Tatsuhiro Tsujikawa c342bde962 2010-02-28 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Use vector instead of deque for containers which is used for
	mostly read-only purpose.
2010-02-28 12:30:11 +00:00
Tatsuhiro Tsujikawa 89982bb10f 2010-01-23 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Fixed broken OptionParser::findByName().
	* src/OptionParser.cc
	* test/OptionParserTest.cc
2010-01-23 12:10:43 +00:00
Tatsuhiro Tsujikawa d56459bb88 2010-01-09 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Fixed the bug that causes segmentation fault if unknown option is
	put in aria2.conf file. BUG#2928303
	* src/OptionParser.cc
	* src/OptionParser.h
	* src/option_processing.cc
	* test/OptionParserTest.cc
2010-01-09 09:35:18 +00:00
Tatsuhiro Tsujikawa 4db349c1f3 2010-01-06 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Untabify. Fixed one line in copyright which is longer than 80
	columns.
	* src
	* test
2010-01-05 16:01:46 +00:00
Tatsuhiro Tsujikawa e77e1ec24d 2009-12-20 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Sort _optionHandlers in OptionParser by name in ascending order.
	Use vector instead of deque for efficiency.
	* src/OptionHandler.h
	* src/OptionHandlerFactory.h
	* src/OptionParser.cc
	* src/OptionParser.h
	* src/version_usage.cc
	* test/OptionParserTest.cc
2009-12-20 14:25:51 +00:00
Tatsuhiro Tsujikawa e976b23728 2009-10-23 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Renamed Util.{cc,h} as util.{cc,h}
	* src/Util.cc
	* src/Util.h
	* src/util.cc
	* src/util.h
2009-10-22 15:35:33 +00:00
Tatsuhiro Tsujikawa 2881dbe025 2009-02-07 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Added OptionParser::parseArg() which internally uses getopt_long
	to parse command-line options. All command-line options are now
	configured by OptionHandler. No manual editing of struct option*
	is required any more.
	* src/NameMatchOptionHandler.h
	* src/OptionHandler.h
	* src/OptionHandlerFactory.cc
	* src/OptionHandlerImpl.h
	* src/OptionParser.cc
	* src/OptionParser.h
	* src/array_fun.h
	* src/main.cc
	* src/option_processing.cc
	* test/OptionHandlerTest.cc
	* test/OptionParserTest.cc
2009-02-07 11:00:34 +00:00
Tatsuhiro Tsujikawa f66ed483fa 2008-09-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Integrated HelpItem into OptionParser to ease the workload for 
adding
	new options. Removed default value from usage text.
	* src/HelpItem.cc: Removed.
	* src/HelpItem.h: Removed.
	* src/HelpItemFactory.cc: Removed.
	* src/HelpItemFactory.h: Removed.
	* src/Makefile.am
	* src/Makefile.in
	* src/NameMatchOptionHandler.h
	* src/OptionHandler.cc
	* src/OptionHandler.h
	* src/OptionHandlerFactory.cc
	* src/OptionHandlerImpl.h
	* src/OptionParser.cc
	* src/OptionParser.h
	* src/TagContainer.cc: Removed.
	* src/TagContainer.h: Removed.
	* src/TaggedItem.cc: Removed.
	* src/TaggedItem.h: Removed.
	* src/main.cc
	* src/option_processing.cc
	* src/usage_text.h
	* src/version_usage.cc
	* test/HelpItemTest.cc: Removed.
	* test/Makefile.am
	* test/Makefile.in
	* test/OptionHandlerTest.cc
	* test/OptionParserTest.cc
	* test/TagContainerTest.cc: Removed.
2008-09-22 09:26:57 +00:00