1/* 2 * Copyright 2015, Rene Gollent, rene@gollent.com. 3 * Copyright 2009, Ingo Weinhold, ingo_weinhold@gmx.de. 4 * Distributed under the terms of the MIT License. 5 */ 6#ifndef VALUE_LOADER_H 7#define VALUE_LOADER_H 8 9 10#include <String.h> 11 12#include <Variant.h> 13 14 15class Architecture; 16class CpuState; 17class TeamMemory; 18class ValueLocation; 19 20 21class ValueLoader { 22public: 23 ValueLoader(Architecture* architecture, 24 TeamMemory* teamMemory, 25 CpuState* cpuState); 26 // cpuState can be NULL 27 ~ValueLoader(); 28 29 Architecture* GetArchitecture() const 30 { return fArchitecture; } 31 32 status_t LoadValue(ValueLocation* location, 33 type_code valueType, bool shortValueIsFine, 34 BVariant& _value); 35 36 status_t LoadRawValue(BVariant& location, 37 size_t maxSize, void* _value); 38 39 status_t LoadStringValue(BVariant& location, 40 size_t maxSize, BString& _value); 41 42private: 43 Architecture* fArchitecture; 44 TeamMemory* fTeamMemory; 45 CpuState* fCpuState; 46}; 47 48 49#endif // VALUE_LOADER_H 50