38 : _lowlevelSystem(system)
40 if (system ==
nullptr)
58 std::vector<uint32_t>
GetIdcodes(
int chainIndex)
override
60 std::vector<uint32_t> idcodes;
64 idcodes = _lowlevelSystem->
GetIdcodes(chainIndex);
91 static std::unique_ptr<DeviceNetworkHighLevel>
_instance;
112 _instance = std::make_unique<DeviceNetworkHighLevel>(lowlevelSystem);
static IDeviceNetworkLowLevel * _lowlevelSystem
Declaration of the IDeviceNetworkLowLevel interface representing the complicated sub-system used in t...
Implementation of the argumentnull_error exception.
Exception for arguments that are null.
Declaration of the IDeviceNetworkHighLevel interface representing the high-level system used in the F...
The namespace containing all Design Pattern Examples implemented in C++.
IDeviceNetworkHighLevel * CreateHighLevelInstance()
Class factory for a singleton instance of the IDeviceNetworkHighLevel interface. Part of the Facade P...
IDeviceNetworkLowLevel * CreateLowLevelInstance()
Class factory for a singleton instance of the sub-system class. Part of the Facade Pattern example.
static std::unique_ptr< Facade_ComplicatedSubSystem > _instance
A singleton instance of the sub-system. Part of the Facade Pattern example.
None _instance
A singleton instance of the sub-system.
Represents a high level view of a complex network of device chains. A device chain can be thought of ...
virtual void EnableDevicesInDeviceChain(int chainIndex, uint32_t selectMask)=0
Make visible certain devices in the given device chain. The selectMask value has a bit set for each T...
virtual void DisableDevicesInDeviceChain(int chainIndex)=0
Resets the given device chain so that all devices except the TAP controller is no longer visible.
virtual std::vector< uint32_t > GetIdcodes(int chainIndex)=0
Returns a list of all idcodes from all selected devices in the given device chain.
virtual int NumChains()=0
The number of device chains available from the sub-system.
Represents a network of device chains and the low level access to that network. In general,...
virtual bool LockDeviceChain(int chainIndex)=0
Lock the specified device chain for exclusive access.
virtual void ResetDeviceChain(int chainIndex)=0
Reset the visibility of all devices on the specified device chain.
virtual std::vector< uint32_t > GetIdcodes(int chainIndex)=0
Retrieve a list of idcodes of all visible devices in the given device chain.
virtual void EnableDevicesInDeviceChain(int chainIndex, uint32_t devicesSelectMask)=0
Make visible the specified devices on the specified device chain.
virtual int GetNumChains()=0
Retrieve the number of device chains available in the network.
virtual bool UnlockDeviceChain(int chainIndex)=0
Unlock the specified device chain to release exclusive access.