1/* 2 * Copyright 2013, Rene Gollent, rene@gollent.com. 3 * Distributed under the terms of the MIT License. 4 */ 5 6 7#include "SystemInfo.h" 8 9 10SystemInfo::SystemInfo() 11 : 12 fTeam(-1) 13{ 14 memset(&fSystemInfo, 0, sizeof(system_info)); 15 memset(&fSystemName, 0, sizeof(utsname)); 16} 17 18 19SystemInfo::SystemInfo(const SystemInfo &other) 20{ 21 SetTo(other.fTeam, other.fSystemInfo, other.fSystemName); 22} 23 24 25SystemInfo::SystemInfo(team_id team, const system_info& info, 26 const utsname& name) 27{ 28 SetTo(team, info, name); 29} 30 31 32void 33SystemInfo::SetTo(team_id team, const system_info& info, const utsname& name) 34{ 35 fTeam = team; 36 memcpy(&fSystemInfo, &info, sizeof(system_info)); 37 memcpy(&fSystemName, &name, sizeof(utsname)); 38} 39