Author: wyoung
Date: Tue Nov 6 18:09:00 2007
New Revision: 1822
URL: http://svn.gna.org/viewcvs/mysqlpp?rev=1822&view=rev
Log:
- Removed many #include statements in lib/*.h, being unneeded on at least
CentOS 5. Some may come back after testing on other platforms.
- Moved some function implementations from .h to .cpp files to make some
of the #include removals possible. There's a corresponding #include
addition in these cases in the .cpp file, but it localizes the
dependency this way.
Removed:
trunk/lib/const_string.h
Modified:
trunk/Wishlist
trunk/lib/coldata.cpp
trunk/lib/coldata.h
trunk/lib/custom.pl
trunk/lib/datetime.h
trunk/lib/field_names.cpp
trunk/lib/field_names.h
trunk/lib/myset.h
trunk/lib/noexceptions.h
trunk/lib/query.h
trunk/lib/result.h
trunk/lib/row.h
trunk/lib/sql_string.h
trunk/lib/sql_types.h
trunk/lib/string_util.h
trunk/lib/tiny_int.h
Modified: trunk/Wishlist
URL:
http://svn.gna.org/viewcvs/mysqlpp/trunk/Wishlist?rev=1822&r1=1821&r2=1822&view=diff
==============================================================================
--- trunk/Wishlist (original)
+++ trunk/Wishlist Tue Nov 6 18:09:00 2007
@@ -18,8 +18,6 @@
results in x spaces, not x - strlen(whatevercamebefore).
o Add ColData::compare(const char*, int). Ditto for SQLString?
-
- o Audit use of headers in lib/*.h, to reduce dependencies.
o Go back over mailing list thread to fold in any other changes
suggested for RefCountedPointer. Most especially, use
Modified: trunk/lib/coldata.cpp
URL:
http://svn.gna.org/viewcvs/mysqlpp/trunk/lib/coldata.cpp?rev=1822&r1=1821&r2=1822&view=diff
==============================================================================
--- trunk/lib/coldata.cpp (original)
+++ trunk/lib/coldata.cpp Tue Nov 6 18:09:00 2007
@@ -26,6 +26,7 @@
#include "coldata.h"
+#include <stdexcept>
#include <string>
namespace mysqlpp {
Modified: trunk/lib/coldata.h
URL:
http://svn.gna.org/viewcvs/mysqlpp/trunk/lib/coldata.h?rev=1822&r1=1821&r2=1822&view=diff
==============================================================================
--- trunk/lib/coldata.h (original)
+++ trunk/lib/coldata.h Tue Nov 6 18:09:00 2007
@@ -41,12 +41,7 @@
#include "string_util.h"
#include "type_info.h"
-#include <sstream>
-#include <stdexcept>
#include <string>
-#include <typeinfo>
-
-#include <stdlib.h>
namespace mysqlpp {
Removed: trunk/lib/const_string.h
URL:
http://svn.gna.org/viewcvs/mysqlpp/trunk/lib/const_string.h?rev=1821&view=auto
==============================================================================
(empty)
Modified: trunk/lib/custom.pl
URL:
http://svn.gna.org/viewcvs/mysqlpp/trunk/lib/custom.pl?rev=1822&r1=1821&r2=1822&view=diff
==============================================================================
--- trunk/lib/custom.pl (original)
+++ trunk/lib/custom.pl Tue Nov 6 18:09:00 2007
@@ -5,10 +5,10 @@
# contain many near-duplicate classes, varying only in the number of
# SQL table columns they support.
#
-# Copyright (c) 1998 by Kevin Atkinson, (c) 1999, 2000 and 2001 by
-# MySQL AB, and (c) 2004, 2005 by Educational Technology Resources, Inc.
-# Others may also hold copyrights on code in this file. See the CREDITS
-# file in the top directory of the distribution for details.
+# Copyright (c) 1998 by Kevin Atkinson, (c) 1999-2001 by MySQL AB, and
+# (c) 2004-2007 by Educational Technology Resources, Inc. Others may
+# also hold copyrights on code in this file. See the CREDITS file in
+# the top directory of the distribution for details.
#
# This file is part of MySQL++.
#
@@ -57,7 +57,6 @@
#ifndef MYSQLPP_CUSTOM_H
#define MYSQLPP_CUSTOM_H
-#include "common.h"
#include "tiny_int.h"
#include <string>
Modified: trunk/lib/datetime.h
URL:
http://svn.gna.org/viewcvs/mysqlpp/trunk/lib/datetime.h?rev=1822&r1=1821&r2=1822&view=diff
==============================================================================
--- trunk/lib/datetime.h (original)
+++ trunk/lib/datetime.h Tue Nov 6 18:09:00 2007
@@ -35,7 +35,6 @@
#include "tiny_int.h"
#include <string>
-#include <sstream>
#include <iostream>
namespace mysqlpp {
Modified: trunk/lib/field_names.cpp
URL:
http://svn.gna.org/viewcvs/mysqlpp/trunk/lib/field_names.cpp?rev=1822&r1=1821&r2=1822&view=diff
==============================================================================
--- trunk/lib/field_names.cpp (original)
+++ trunk/lib/field_names.cpp Tue Nov 6 18:09:00 2007
@@ -1,10 +1,10 @@
/***********************************************************************
field_names.cpp - Implements the FieldNames class.
- Copyright (c) 1998 by Kevin Atkinson, (c) 1999, 2000 and 2001 by
- MySQL AB, and (c) 2004, 2005 by Educational Technology Resources, Inc.
- Others may also hold copyrights on code in this file. See the CREDITS
- file in the top directory of the distribution for details.
+ Copyright (c) 1998 by Kevin Atkinson, (c) 1999-2001 by MySQL AB, and
+ (c) 2004-2007 by Educational Technology Resources, Inc. Others may
+ also hold copyrights on code in this file. See the CREDITS file in
+ the top directory of the distribution for details.
This file is part of MySQL++.
@@ -28,12 +28,14 @@
#include "common.h"
#include "field_names.h"
+#include "string_util.h"
#include "result.h"
namespace mysqlpp {
-void FieldNames::init(const ResUse * res)
+void
+FieldNames::init(const ResUse * res)
{
int num = res->num_fields();
reserve(num);
@@ -45,4 +47,13 @@
}
}
+
+uint
+FieldNames::operator [](const std::string& s) const
+{
+ std::string temp(s);
+ str_to_lwr(temp);
+ return uint(std::find(begin(), end(), temp) - begin());
+}
+
} // end namespace mysqlpp
Modified: trunk/lib/field_names.h
URL:
http://svn.gna.org/viewcvs/mysqlpp/trunk/lib/field_names.h?rev=1822&r1=1821&r2=1822&view=diff
==============================================================================
--- trunk/lib/field_names.h (original)
+++ trunk/lib/field_names.h Tue Nov 6 18:09:00 2007
@@ -2,10 +2,10 @@
/// \brief Declares a class to hold a list of field names.
/***********************************************************************
- Copyright (c) 1998 by Kevin Atkinson, (c) 1999, 2000 and 2001 by
- MySQL AB, and (c) 2004-2007 by Educational Technology Resources, Inc.
- Others may also hold copyrights on code in this file. See the CREDITS
- file in the top directory of the distribution for details.
+ Copyright (c) 1998 by Kevin Atkinson, (c) 1999-2001 by MySQL AB, and
+ (c) 2004-2007 by Educational Technology Resources, Inc. Others may
+ also hold copyrights on code in this file. See the CREDITS file in
+ the top directory of the distribution for details.
This file is part of MySQL++.
@@ -28,10 +28,7 @@
#ifndef MYSQLPP_FIELD_NAMES_H
#define MYSQLPP_FIELD_NAMES_H
-#include "coldata.h"
-#include "string_util.h"
-
-#include <algorithm>
+#include <string>
#include <vector>
namespace mysqlpp {
@@ -95,12 +92,7 @@
}
/// \brief Get the index number of a field given its name
- uint operator [](const std::string& s) const
- {
- std::string temp(s);
- str_to_lwr(temp);
- return uint(std::find(begin(), end(), temp) - begin());
- }
+ uint operator [](const std::string& s) const;
private:
void init(const ResUse* res);
Modified: trunk/lib/myset.h
URL:
http://svn.gna.org/viewcvs/mysqlpp/trunk/lib/myset.h?rev=1822&r1=1821&r2=1822&view=diff
==============================================================================
--- trunk/lib/myset.h (original)
+++ trunk/lib/myset.h Tue Nov 6 18:09:00 2007
@@ -3,10 +3,10 @@
/// elsewhere in the library.
/***********************************************************************
- Copyright (c) 1998 by Kevin Atkinson, (c) 1999, 2000 and 2001 by
- MySQL AB, and (c) 2004, 2005 by Educational Technology Resources, Inc.
- Others may also hold copyrights on code in this file. See the CREDITS
- file in the top directory of the distribution for details.
+ Copyright (c) 1998 by Kevin Atkinson, (c) 1999-2001 by MySQL AB, and
+ (c) 2004-2007 by Educational Technology Resources, Inc. Others may
+ also hold copyrights on code in this file. See the CREDITS file in
+ the top directory of the distribution for details.
This file is part of MySQL++.
@@ -36,7 +36,6 @@
#include <iostream>
#include <set>
-#include <vector>
namespace mysqlpp {
Modified: trunk/lib/noexceptions.h
URL:
http://svn.gna.org/viewcvs/mysqlpp/trunk/lib/noexceptions.h?rev=1822&r1=1821&r2=1822&view=diff
==============================================================================
--- trunk/lib/noexceptions.h (original)
+++ trunk/lib/noexceptions.h Tue Nov 6 18:09:00 2007
@@ -13,9 +13,9 @@
/// the block exits.
/***********************************************************************
- Copyright (c) 2005 by Educational Technology Resources, Inc.
- Others may also hold copyrights on code in this file. See the CREDITS
- file in the top directory of the distribution for details.
+ Copyright (c) 2005-2007 by Educational Technology Resources, Inc.
+ Others may also hold copyrights on code in this file. See the
+ CREDITS file in the top directory of the distribution for details.
This file is part of MySQL++.
@@ -37,6 +37,8 @@
#ifndef MYSQLPP_NOEXCEPTIONS_H
#define MYSQLPP_NOEXCEPTIONS_H
+
+#include "common.h"
namespace mysqlpp {
Modified: trunk/lib/query.h
URL:
http://svn.gna.org/viewcvs/mysqlpp/trunk/lib/query.h?rev=1822&r1=1821&r2=1822&view=diff
==============================================================================
--- trunk/lib/query.h (original)
+++ trunk/lib/query.h Tue Nov 6 18:09:00 2007
@@ -2,10 +2,10 @@
/// \brief Defines a class for building and executing SQL queries.
/***********************************************************************
- Copyright (c) 1998 by Kevin Atkinson, (c) 1999, 2000 and 2001 by
- MySQL AB, and (c) 2004-2007 by Educational Technology Resources, Inc.
- Others may also hold copyrights on code in this file. See the CREDITS
- file in the top directory of the distribution for details.
+ Copyright (c) 1998 by Kevin Atkinson, (c) 1999-2001 by MySQL AB, and
+ (c) 2004-2007 by Educational Technology Resources, Inc. Others may
+ also hold copyrights on code in this file. See the CREDITS file in
+ the top directory of the distribution for details.
This file is part of MySQL++.
@@ -42,7 +42,6 @@
#include <list>
#include <map>
#include <set>
-#include <sstream>
#include <vector>
#ifdef HAVE_EXT_SLIST
Modified: trunk/lib/result.h
URL:
http://svn.gna.org/viewcvs/mysqlpp/trunk/lib/result.h?rev=1822&r1=1821&r2=1822&view=diff
==============================================================================
--- trunk/lib/result.h (original)
+++ trunk/lib/result.h Tue Nov 6 18:09:00 2007
@@ -38,10 +38,6 @@
#include "refcounted.h"
#include "row.h"
#include "subiter.h"
-
-#include <map>
-#include <set>
-#include <string>
namespace mysqlpp {
Modified: trunk/lib/row.h
URL:
http://svn.gna.org/viewcvs/mysqlpp/trunk/lib/row.h?rev=1822&r1=1821&r2=1822&view=diff
==============================================================================
--- trunk/lib/row.h (original)
+++ trunk/lib/row.h Tue Nov 6 18:09:00 2007
@@ -28,6 +28,8 @@
#ifndef MYSQLPP_ROW_H
#define MYSQLPP_ROW_H
+#include "common.h"
+
#include "coldata.h"
#include "noexceptions.h"
#include "refcounted.h"
@@ -36,8 +38,6 @@
#include <vector>
#include <string>
-
-#include <string.h>
namespace mysqlpp {
Modified: trunk/lib/sql_string.h
URL:
http://svn.gna.org/viewcvs/mysqlpp/trunk/lib/sql_string.h?rev=1822&r1=1821&r2=1822&view=diff
==============================================================================
--- trunk/lib/sql_string.h (original)
+++ trunk/lib/sql_string.h Tue Nov 6 18:09:00 2007
@@ -8,10 +8,10 @@
/// everything in string form to build SQL queries.
/***********************************************************************
- Copyright (c) 1998 by Kevin Atkinson, (c) 1999, 2000 and 2001 by
- MySQL AB, and (c) 2004, 2005 by Educational Technology Resources, Inc.
- Others may also hold copyrights on code in this file. See the CREDITS
- file in the top directory of the distribution for details.
+ Copyright (c) 1998 by Kevin Atkinson, (c) 1999-2001 by MySQL AB, and
+ (c) 2004-2007 by Educational Technology Resources, Inc. Others may
+ also hold copyrights on code in this file. See the CREDITS file in
+ the top directory of the distribution for details.
This file is part of MySQL++.
@@ -35,9 +35,9 @@
#define MYSQLPP_SQL_STRING_H
#include "common.h"
+
#include "null.h"
-#include <stdio.h>
#include <string>
namespace mysqlpp {
Modified: trunk/lib/sql_types.h
URL:
http://svn.gna.org/viewcvs/mysqlpp/trunk/lib/sql_types.h?rev=1822&r1=1821&r2=1822&view=diff
==============================================================================
--- trunk/lib/sql_types.h (original)
+++ trunk/lib/sql_types.h Tue Nov 6 18:09:00 2007
@@ -2,9 +2,9 @@
/// \brief Declares the closest C++ equivalent of each MySQL column type
/***********************************************************************
- Copyright (c) 2006 by Educational Technology Resources, Inc. Others
- may also hold copyrights on code in this file. See the CREDITS file in
- the top directory of the distribution for details.
+ Copyright (c) 2006-2007 by Educational Technology Resources, Inc.
+ Others may also hold copyrights on code in this file. See the
+ CREDITS file in the top directory of the distribution for details.
This file is part of MySQL++.
@@ -26,8 +26,6 @@
#if !defined(MYSQLPP_SQL_TYPES_H)
#define MYSQLPP_SQL_TYPES_H
-
-#include "common.h"
#include <string>
Modified: trunk/lib/string_util.h
URL:
http://svn.gna.org/viewcvs/mysqlpp/trunk/lib/string_util.h?rev=1822&r1=1821&r2=1822&view=diff
==============================================================================
--- trunk/lib/string_util.h (original)
+++ trunk/lib/string_util.h Tue Nov 6 18:09:00 2007
@@ -3,10 +3,10 @@
/// the library.
/***********************************************************************
- Copyright (c) 1998 by Kevin Atkinson, (c) 1999, 2000 and 2001 by
- MySQL AB, and (c) 2004, 2005 by Educational Technology Resources, Inc.
- Others may also hold copyrights on code in this file. See the CREDITS
- file in the top directory of the distribution for details.
+ Copyright (c) 1998 by Kevin Atkinson, (c) 1999-2001 by MySQL AB, and
+ (c) 2004-2007 by Educational Technology Resources, Inc. Others may
+ also hold copyrights on code in this file. See the CREDITS file in
+ the top directory of the distribution for details.
This file is part of MySQL++.
@@ -30,8 +30,6 @@
#define MYSQLPP_STRING_UTIL_H
#include "common.h"
-
-#include <ctype.h>
#include <string>
Modified: trunk/lib/tiny_int.h
URL:
http://svn.gna.org/viewcvs/mysqlpp/trunk/lib/tiny_int.h?rev=1822&r1=1821&r2=1822&view=diff
==============================================================================
--- trunk/lib/tiny_int.h (original)
+++ trunk/lib/tiny_int.h Tue Nov 6 18:09:00 2007
@@ -2,10 +2,10 @@
/// \brief Declares class for holding a SQL tiny_int
/***********************************************************************
- Copyright (c) 1998 by Kevin Atkinson, (c) 1999, 2000 and 2001 by
- MySQL AB, and (c) 2004, 2005 by Educational Technology Resources, Inc.
- Others may also hold copyrights on code in this file. See the CREDITS
- file in the top directory of the distribution for details.
+ Copyright (c) 1998 by Kevin Atkinson, (c) 1999-2001 by MySQL AB, and
+ (c) 2004-2007 by Educational Technology Resources, Inc. Others may
+ also hold copyrights on code in this file. See the CREDITS file in
+ the top directory of the distribution for details.
This file is part of MySQL++.
@@ -27,6 +27,8 @@
#ifndef MYSQLPP_TINY_INT_H
#define MYSQLPP_TINY_INT_H
+
+#include "common.h"
namespace mysqlpp {
_______________________________________________
Mysqlpp-commits mailing list
[email protected]
https://mail.gna.org/listinfo/mysqlpp-commits