some words about mixins in helpers

This commit is contained in:
Craig Dowell
2010-01-27 18:41:38 -08:00
parent d0fe9ee251
commit d9a4bf75f6
5 changed files with 50 additions and 0 deletions

View File

@@ -37,6 +37,16 @@ class Packet;
/**
* \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
{

View File

@@ -37,6 +37,16 @@ class Packet;
/**
* \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
{

View File

@@ -46,6 +46,16 @@ class Ipv6RoutingHelper;
* 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
{

View File

@@ -38,6 +38,16 @@ class Node;
/**
* \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
{

View File

@@ -135,6 +135,16 @@ private:
*
* 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
{