Author: wyoung
Date: Thu Mar 19 01:40:32 2015
New Revision: 2775

URL: http://svn.gna.org/viewcvs/mysqlpp?rev=2775&view=rev
Log:
The ifdef hackery for making sure the InsertPolicy templates only showed
up as members of class Query wasn't fooling Doxygen, leading them to be
separately documented as global-level symbols.  As with the previous
checkin, this is mostly a documentation change, not an API change.

Modified:
    trunk/lib/insertpolicy.h
    trunk/lib/query.h

Modified: trunk/lib/insertpolicy.h
URL: 
http://svn.gna.org/viewcvs/mysqlpp/trunk/lib/insertpolicy.h?rev=2775&r1=2774&r2=2775&view=diff
==============================================================================
--- trunk/lib/insertpolicy.h    (original)
+++ trunk/lib/insertpolicy.h    Thu Mar 19 01:40:32 2015
@@ -30,7 +30,7 @@
 /// Query::insertfrom().  You access it as Query::InsertPolicy<T>
 
 /***********************************************************************
- Copyright (c) 2008-2009 by AboveNet, Inc., and (c) 2009 by Educational
+ Copyright © 2008-2009 by AboveNet, Inc., and © 2009 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.
@@ -55,6 +55,17 @@
 
 #if !defined(MYSQLPP_INSERTPOLICY_H)
 #define MYSQLPP_INSERTPOLICY_H
+
+// Only allow these templates to be defined if they're being bodily
+// included into class Query's definition.  They're in this separate
+// file only for claity, so they don't get lost among the other
+// definitions in class Query.  Without this, Doxygen will pick them
+// up and treat them as a) outside namespace mysqlpp; and b) not member
+// templates of class Query.  We also don't want end-users of the
+// library to #include this file in their own code; these templates
+// should only be used as mysqlpp::Query::*.
+#if defined(MYSQLPP_DEFINE_INSERT_POLICY_TEMPLATES)
+
 
 /// \brief An insert policy object that triggers a new INSERT
 /// statement after a given number of rows have been inserted.
@@ -210,5 +221,7 @@
        int size_;
 };
 
+#endif // defined(MYSQLPP_DEFINE_INSERT_POLICY_TEMPLATES)
+
 #endif // !defined(MYSQLPP_INSERTPOLICY_H)
 

Modified: trunk/lib/query.h
URL: 
http://svn.gna.org/viewcvs/mysqlpp/trunk/lib/query.h?rev=2775&r1=2774&r2=2775&view=diff
==============================================================================
--- trunk/lib/query.h   (original)
+++ trunk/lib/query.h   Thu Mar 19 01:40:32 2015
@@ -123,11 +123,11 @@
                public OptionalExceptions
 {
 public:
-#if !defined(DOXYGEN_IGNORE)
        // Bring in InsertPolicy template as part of this class's interface,
        // separate only in the sense that it's a self-contained concept.
+       #define MYSQLPP_DEFINE_INSERT_POLICY_TEMPLATES
        #include "insertpolicy.h"
-#endif
+       #undef MYSQLPP_DEFINE_INSERT_POLICY_TEMPLATES
 
        /// \brief Create a new query object attached to a connection.
        ///


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

Reply via email to