Design Pattern Examples
Overview of object-oriented design patterns
DeviceNode Struct Reference

Represents a single device. Part of the Facade Pattern example. More...

Collaboration diagram for DeviceNode:
Collaboration graph

Public Member Functions

 DeviceNode (std::string name, uint32_t idcode, DeviceTypes tapType, bool initiallyVisible)
 Constructor.
 

Public Attributes

bool Visible
 Whether the device is visible in the device chain.
 
std::string Name
 Name of this device.
 
uint32_t Idcode
 The idcode for this device.
 
DeviceTypes DeviceType
 A value from the DeviceTypes enumeration identifying the type of the device.
 

Detailed Description

Represents a single device. Part of the Facade Pattern example.

Definition at line 21 of file Facade_ComplicatedSubSystem.cpp.

Constructor & Destructor Documentation

◆ DeviceNode()

DeviceNode ( std::string  name,
uint32_t  idcode,
DeviceTypes  tapType,
bool  initiallyVisible 
)
inline

Constructor.

Parameters
nameName to use.
idcodeidcode for the device.
tapTypeValue from the DeviceTypes enumeration.
initiallyVisibletrue if initially visible; otherwise false.

Definition at line 51 of file Facade_ComplicatedSubSystem.cpp.

Member Data Documentation

◆ DeviceType

DeviceTypes DeviceType

A value from the DeviceTypes enumeration identifying the type of the device.

Definition at line 42 of file Facade_ComplicatedSubSystem.cpp.

Referenced by DeviceChain::AddNode().

◆ Idcode

uint32_t Idcode

The idcode for this device.

Definition at line 36 of file Facade_ComplicatedSubSystem.cpp.

◆ Name

std::string Name

Name of this device.

Definition at line 31 of file Facade_ComplicatedSubSystem.cpp.

Referenced by Visitor_Shop::PickupOrder(), Visitor_Shop::PlaceOrder(), and EntryInformation::ToString().

◆ Visible

bool Visible

Whether the device is visible in the device chain.

Definition at line 26 of file Facade_ComplicatedSubSystem.cpp.


The documentation for this struct was generated from the following file: