Author: wyoung
Date: Tue Mar  3 13:20:35 2009
New Revision: 2470

URL: http://svn.gna.org/viewcvs/mysqlpp?rev=2470&view=rev
Log:
Renamed mysqlpp::CommandLine to CommandLineBase, to avoid confusion with
its subclasses.  Previous idea was to call them CommandLine, relying only
on namespace differences to disambiguate them, but that's just a little
too cute.  Makes ctags harder to use, too.

Modified:
    trunk/lib/cmdline.cpp
    trunk/lib/cmdline.h

Modified: trunk/lib/cmdline.cpp
URL: 
http://svn.gna.org/viewcvs/mysqlpp/trunk/lib/cmdline.cpp?rev=2470&r1=2469&r2=2470&view=diff
==============================================================================
--- trunk/lib/cmdline.cpp (original)
+++ trunk/lib/cmdline.cpp Tue Mar  3 13:20:35 2009
@@ -122,10 +122,10 @@
 
 namespace mysqlpp {
 
-//// CommandLine::collect_unparsed_arguments ///////////////////////////
+//// CommandLineBase::collect_unparsed_arguments ///////////////////////
 
 void
-CommandLine::collect_unparsed_arguments()
+CommandLineBase::collect_unparsed_arguments()
 {
        const int nextras = argc_ - optind;
        if (nextras > 0) {
@@ -137,12 +137,12 @@
 }
 
 
-//// CommandLine::parse_next ///////////////////////////////////////////
+//// CommandLineBase::parse_next ///////////////////////////////////////
 // Wrapper around getopt(), using the stuff passed to our ctor to
 // construct its argument list.
 
 int
-CommandLine::parse_next() const
+CommandLineBase::parse_next() const
 {
        return getopt(argc_, argv_, opts_);
 }
@@ -160,7 +160,7 @@
 
 CommandLine::CommandLine(int argc, char* const argv[],
                const char* user, const char* pass, const char* usage_extra) :
-mysqlpp::CommandLine(argc, argv, "m:p:s:u:D"),
+CommandLineBase(argc, argv, "m:p:s:u:D"),
 successful_(false),
 dtest_mode_(false),
 run_mode_(0),

Modified: trunk/lib/cmdline.h
URL: 
http://svn.gna.org/viewcvs/mysqlpp/trunk/lib/cmdline.h?rev=2470&r1=2469&r2=2470&view=diff
==============================================================================
--- trunk/lib/cmdline.h (original)
+++ trunk/lib/cmdline.h Tue Mar  3 13:20:35 2009
@@ -40,7 +40,7 @@
        // Simple class for parsing a command line and holding the results.
        // Just contains common functionality and data structures; see
        // overrides below for instantiable classes.
-       class MYSQLPP_EXPORT CommandLine
+       class MYSQLPP_EXPORT CommandLineBase
        {
        public:
                //// Public types
@@ -56,14 +56,14 @@
        protected:
                //// Subclass interface
                // Hidden ctor and dtor to prevent instantiation
-               CommandLine(int argc, char* const argv[], const char* opts) :
+               CommandLineBase(int argc, char* const argv[], const char* opts) 
:
                argc_(argc),
                argv_(argv),
                opts_(opts)
                {
                        assert(argc > 0 && argv && opts);
                }
-               virtual ~CommandLine() { }
+               virtual ~CommandLineBase() { }
 
                // Save non-option arguments to extra_args_ list.  Subclass
                // ctor should call this after parse_next() loop gets EOF.
@@ -89,7 +89,7 @@
                extern const char* db_name;
 
                // Command line parsing mechanism for ../examples/*.cpp
-               class MYSQLPP_EXPORT CommandLine : public mysqlpp::CommandLine
+               class MYSQLPP_EXPORT CommandLine : public CommandLineBase
                {
                public:
                        //// Public interface


_______________________________________________
Mysqlpp-commits mailing list
[email protected]
https://mail.gna.org/listinfo/mysqlpp-commits

Reply via email to