Represents a device chain, which is a collection of DeviceNode objects. Part of the Facade Pattern example. More...
Public Member Functions | |
DeviceChain (std::string name) | |
Constructor. | |
void | AddNode (DeviceNode node) |
Helper method to add a DeviceNode to the device chain. DeviceNode objects that are of DeviceTypes::DEVICECONTROLLER are always inserted as the first device in the device chain, with the assumption there is only one DEVICECONTROLLER in a given device chain (this is not actually enforced, though). | |
void | ResetVisibility () |
Resets the device chain so that all devices that are not CLdevices are no longer visible in the device chain. | |
void | SelectNodes (uint32_t nodeSelectMask) |
Make visible one or more devices in the device chain. | |
void | DeselectNodes (uint32_t nodeSelectMask) |
Make invisible one or more devices in the device chain. | |
std::vector< uint32_t > | GetIdCodesForVisibleNodes () |
Retrieve a list of idcodes for all devices that are visible in the device chain. | |
Public Attributes | |
std::string | Name |
The Name of this device chain. | |
bool | IsLocked |
Whether this device chain is locked for access. | |
Private Member Functions | |
void | _ShowHideNodes (uint32_t nodeSelectMask, bool makeVisible) |
Helper method to show or hide devices on the device chain. | |
Private Attributes | |
std::vector< DeviceNode > | _nodes |
The list of TAPNodes on this device chain. | |
Represents a device chain, which is a collection of DeviceNode objects. Part of the Facade Pattern example.
Definition at line 69 of file Facade_ComplicatedSubSystem.cpp.
|
inline |
Constructor.
name | Name of this device chain. |
Definition at line 124 of file Facade_ComplicatedSubSystem.cpp.
|
inlineprivate |
Helper method to show or hide devices on the device chain.
nodeSelectMask | A bit mask where the position of each bit corresponds to a device in the device chain, with bit 0 being the first device, bit 1 being the second device, and so on. |
makeVisible | true if the device is to be made visible on the device chain; otherwise false, the device cannot be seen on the device chain. |
Definition at line 98 of file Facade_ComplicatedSubSystem.cpp.
References DeviceChain::_nodes.
Referenced by DeviceChain::DeselectNodes(), and DeviceChain::SelectNodes().
|
inline |
Helper method to add a DeviceNode to the device chain. DeviceNode objects that are of DeviceTypes::DEVICECONTROLLER are always inserted as the first device in the device chain, with the assumption there is only one DEVICECONTROLLER in a given device chain (this is not actually enforced, though).
node | A DeviceNode object to add to the device chain. |
Definition at line 139 of file Facade_ComplicatedSubSystem.cpp.
References DeviceChain::_nodes, DesignPatternExamples_cpp::DEVICECONTROLLER, and DeviceNode::DeviceType.
|
inline |
Make invisible one or more devices in the device chain.
nodeSelectMask | a bit mask specifying which device or devices to hide, where bit 0 is the first device, bit 1 is the second, etc. Bit 0 is ignored as the first device is always visible. |
Definition at line 185 of file Facade_ComplicatedSubSystem.cpp.
References DeviceChain::_ShowHideNodes().
|
inline |
Retrieve a list of idcodes for all devices that are visible in the device chain.
Definition at line 198 of file Facade_ComplicatedSubSystem.cpp.
References DeviceChain::_nodes.
|
inline |
Resets the device chain so that all devices that are not CLdevices are no longer visible in the device chain.
Definition at line 157 of file Facade_ComplicatedSubSystem.cpp.
References DeviceChain::_nodes, and DesignPatternExamples_cpp::DEVICECONTROLLER.
|
inline |
Make visible one or more devices in the device chain.
nodeSelectMask | a bit mask specifying which device or devices to make visible, where bit 0 is the first device, bit 1 is the second, etc. Bit 0 is ignored as the first device is always visible. |
Definition at line 174 of file Facade_ComplicatedSubSystem.cpp.
References DeviceChain::_ShowHideNodes().
|
private |
The list of TAPNodes on this device chain.
Definition at line 75 of file Facade_ComplicatedSubSystem.cpp.
Referenced by DeviceChain::_ShowHideNodes(), DeviceChain::AddNode(), DeviceChain::GetIdCodesForVisibleNodes(), and DeviceChain::ResetVisibility().
bool IsLocked |
Whether this device chain is locked for access.
Definition at line 86 of file Facade_ComplicatedSubSystem.cpp.
std::string Name |
The Name of this device chain.
Definition at line 81 of file Facade_ComplicatedSubSystem.cpp.
Referenced by Visitor_Shop::PickupOrder(), Visitor_Shop::PlaceOrder(), and EntryInformation::ToString().