Lines Matching +full:device +full:- +full:id

8  *     http://www.apache.org/licenses/LICENSE-2.0
26 class Device;
33 * This class provides a mapping from string IDs to the associated Device, Rail,
39 // Specify which compiler-generated methods we want
48 * Adds the specified device to this IDMap.
50 * Throws invalid_argument if the device's ID already exists in the map.
52 * @param device device to add
54 void addDevice(Device& device);
59 * Throws invalid_argument if the rail's ID already exists in the map.
68 * Throws invalid_argument if the rule's ID already exists in the map.
75 * Returns the device with the specified ID.
77 * Throws invalid_argument if no device is found with specified ID.
79 * @param id device ID
80 * @return device with specified ID
82 Device& getDevice(const std::string& id) const in getDevice()
84 auto it = deviceMap.find(id); in getDevice()
88 "Unable to find device with ID \"" + id + '"'}; in getDevice()
90 return *(it->second); in getDevice()
94 * Returns the rail with the specified ID.
96 * Throws invalid_argument if no rail is found with specified ID.
98 * @param id rail ID
99 * @return rail with specified ID
101 Rail& getRail(const std::string& id) const in getRail()
103 auto it = railMap.find(id); in getRail()
107 "Unable to find rail with ID \"" + id + '"'}; in getRail()
109 return *(it->second); in getRail()
113 * Returns the rule with the specified ID.
115 * Throws invalid_argument if no rule is found with specified ID.
117 * @param id rule ID
118 * @return rule with specified ID
120 Rule& getRule(const std::string& id) const in getRule()
122 auto it = ruleMap.find(id); in getRule()
126 "Unable to find rule with ID \"" + id + '"'}; in getRule()
128 return *(it->second); in getRule()
133 * Map from device IDs to Device objects. Does not own the objects.
135 std::map<std::string, Device*> deviceMap{};