bool House::getAccessList(uint32_t listId, std::string& list) const { if(listId == GUEST_LIST) { guestList.getList(list); return true; } else if(listId == SUBOWNER_LIST) { subOwnerList.getList(list); return true; } else { Door* door = getDoorByNumber(listId); if(door) return door->getAccessList(list); else { #ifdef __DEBUG_HOUSES__ std::cout << "Failure: [House::getAccessList] door == NULL, listId = " << listId <<std::endl; #endif return false; } } return false; }
bool House::getAccessList(uint32_t listId, std::string& list) const { if (listId == GUEST_LIST) { guestList.getList(list); return true; } else if (listId == SUBOWNER_LIST) { subOwnerList.getList(list); return true; } Door* door = getDoorByNumber(listId); if (!door) { return false; } return door->getAccessList(list); }