10SN/A/* 212361Speytoia * Copyright 2013, Rene Gollent, rene@gollent.com. 30SN/A * Distributed under the terms of the MIT License. 40SN/A */ 50SN/A 60SN/A 72362SN/A#include "SystemInfo.h" 80SN/A 92362SN/A 100SN/ASystemInfo::SystemInfo() 110SN/A : 120SN/A fTeam(-1) 130SN/A{ 140SN/A memset(&fSystemInfo, 0, sizeof(system_info)); 150SN/A memset(&fSystemName, 0, sizeof(utsname)); 160SN/A} 170SN/A 180SN/A 190SN/ASystemInfo::SystemInfo(const SystemInfo &other) 200SN/A{ 212362SN/A SetTo(other.fTeam, other.fSystemInfo, other.fSystemName); 222362SN/A} 232362SN/A 240SN/A 250SN/ASystemInfo::SystemInfo(team_id team, const system_info& info, 260SN/A const utsname& name) 270SN/A{ 2812361Speytoia SetTo(team, info, name); 2912361Speytoia} 300SN/A 310SN/A 320SN/Avoid 330SN/ASystemInfo::SetTo(team_id team, const system_info& info, const utsname& name) 340SN/A{ 350SN/A fTeam = team; 360SN/A memcpy(&fSystemInfo, &info, sizeof(system_info)); 370SN/A memcpy(&fSystemName, &name, sizeof(utsname)); 380SN/A} 390SN/A