some words about mixins in helpers
authorCraig Dowell <craigdo@ee.washington.edu>
Wed, 27 Jan 2010 18:41:38 -0800
changeset 6026 38a97b815052
parent 6025 97abaecc0e96
child 6027 8ed838dd0be5
some words about mixins in helpers
src/helper/csma-helper.h
src/helper/emu-helper.h
src/helper/internet-stack-helper.h
src/helper/point-to-point-helper.h
src/helper/yans-wifi-helper.h
--- a/src/helper/csma-helper.h	Wed Jan 27 17:21:36 2010 -0800
+++ b/src/helper/csma-helper.h	Wed Jan 27 18:41:38 2010 -0800
@@ -37,6 +37,16 @@
 
 /**
  * \brief build a set of CsmaNetDevice objects
+ *
+ * Normally we eschew multiple inheritance, however, the classes 
+ * PcapUserHelperForDevice and AsciiTraceUserHelperForDevice are
+ * treated as "mixins".  A mixin is a self-contained class that
+ * encapsulates a general attribute or a set of functionality that
+ * may be of interest to many other classes.
+ * 
+ * Since the mixins below are self-contained and are explicitly 
+ * designed to avoid naming conflicts through explicit resolution,
+ * multiple inheritance problems are avoided.
  */
 class CsmaHelper : public PcapUserHelperForDevice, public AsciiTraceUserHelperForDevice
 {
--- a/src/helper/emu-helper.h	Wed Jan 27 17:21:36 2010 -0800
+++ b/src/helper/emu-helper.h	Wed Jan 27 18:41:38 2010 -0800
@@ -37,6 +37,16 @@
 
 /**
  * \brief build a set of EmuNetDevice objects
+ *
+ * Normally we eschew multiple inheritance, however, the classes 
+ * PcapUserHelperForDevice and AsciiTraceUserHelperForDevice are
+ * treated as "mixins".  A mixin is a self-contained class that
+ * encapsulates a general attribute or a set of functionality that
+ * may be of interest to many other classes.
+ * 
+ * Since the mixins below are self-contained and are explicitly 
+ * designed to avoid naming conflicts through explicit resolution,
+ * multiple inheritance problems are avoided.
  */
 class EmuHelper : public PcapUserHelperForDevice, public AsciiTraceUserHelperForDevice
 {
--- a/src/helper/internet-stack-helper.h	Wed Jan 27 17:21:36 2010 -0800
+++ b/src/helper/internet-stack-helper.h	Wed Jan 27 18:41:38 2010 -0800
@@ -46,6 +46,16 @@
  * there is no device.  This means that the creation of output file names will
  * change, and also the user-visible methods will not reference devices and
  * therefore the number of trace enable methods is reduced.
+ *
+ * Normally we eschew multiple inheritance, however, the classes 
+ * PcapUserHelperForIpv4 and AsciiTraceUserHelperForIpv4 are
+ * treated as "mixins".  A mixin is a self-contained class that
+ * encapsulates a general attribute or a set of functionality that
+ * may be of interest to many other classes.
+ * 
+ * Since the mixins below are self-contained and are explicitly 
+ * designed to avoid naming conflicts through explicit resolution,
+ * multiple inheritance problems are avoided.
  */
 class InternetStackHelper : public PcapUserHelperForIpv4, public AsciiTraceUserHelperForIpv4
 {
--- a/src/helper/point-to-point-helper.h	Wed Jan 27 17:21:36 2010 -0800
+++ b/src/helper/point-to-point-helper.h	Wed Jan 27 18:41:38 2010 -0800
@@ -38,6 +38,16 @@
 
 /**
  * \brief Build a set of PointToPointNetDevice objects
+ *
+ * Normally we eschew multiple inheritance, however, the classes 
+ * PcapUserHelperForDevice and AsciiTraceUserHelperForDevice are
+ * treated as "mixins".  A mixin is a self-contained class that
+ * encapsulates a general attribute or a set of functionality that
+ * may be of interest to many other classes.
+ * 
+ * Since the mixins below are self-contained and are explicitly 
+ * designed to avoid naming conflicts through explicit resolution,
+ * multiple inheritance problems are avoided.
  */
 class PointToPointHelper : public PcapUserHelperForDevice, public AsciiTraceUserHelperForDevice
 {
--- a/src/helper/yans-wifi-helper.h	Wed Jan 27 17:21:36 2010 -0800
+++ b/src/helper/yans-wifi-helper.h	Wed Jan 27 18:41:38 2010 -0800
@@ -135,6 +135,16 @@
  *
  * The Pcap and ascii traces generated by the EnableAscii and EnablePcap methods defined
  * in this class correspond to PHY-level traces. 
+ *
+ * Normally we eschew multiple inheritance, however, the classes 
+ * PcapUserHelperForDevice and AsciiTraceUserHelperForDevice are
+ * treated as "mixins".  A mixin is a self-contained class that
+ * encapsulates a general attribute or a set of functionality that
+ * may be of interest to many other classes.
+ * 
+ * Since the mixins below are self-contained and are explicitly 
+ * designed to avoid naming conflicts through explicit resolution,
+ * multiple inheritance problems are avoided.
  */
 class YansWifiPhyHelper : public WifiPhyHelper, public PcapUserHelperForDevice, public AsciiTraceUserHelperForDevice
 {