]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Documented some of the Packable API problems.
authorAlex Rousskov <rousskov@measurement-factory.com>
Fri, 11 Mar 2016 17:53:26 +0000 (10:53 -0700)
committerAlex Rousskov <rousskov@measurement-factory.com>
Fri, 11 Mar 2016 17:53:26 +0000 (10:53 -0700)
src/base/Packable.h

index 2619157a340866e33ddc32c9cdd27e6392102d23..6acff1546a55e6d7469708f4c6def693546a77e0 100644 (file)
@@ -45,6 +45,9 @@
  * Thus, one can write just one function that will take a Packable object
  * and either "pack" things for Comm::Write or "append" things to Store,
  * depending on actual Packable object supplied.
+ *
+ * XXX: Misnamed. This is a Packer or Packager API (i.e., "something that packs
+ * or packages others"); this is not a "something that can be packed" API.
  */
 class Packable
 {
@@ -67,6 +70,12 @@ public:
      *
      * \note arguments may be evaluated more than once, be careful
      *       of side-effects
+     *
+     * XXX: This method either should not exist or should not be virtual.
+     * Kids should not be forced to re-implement vappendf() logic.
+     * That logic should be implemented once, using other [Packable] APIs.
+     * Packable is not about providing a printf(3) service. Packable
+     * is about writing opaque data to various custom destinations.
      */
     virtual void vappendf(const char *fmt, va_list ap) = 0;