2013-01-21 20:55:42 +01:00
|
|
|
/**
|
|
|
|
|
******************************************************************************
|
|
|
|
|
* Xenia : Xbox 360 Emulator Research Project *
|
|
|
|
|
******************************************************************************
|
|
|
|
|
* Copyright 2013 Ben Vanik. All rights reserved. *
|
|
|
|
|
* Released under the BSD license - see LICENSE in the root for more details. *
|
|
|
|
|
******************************************************************************
|
|
|
|
|
*/
|
|
|
|
|
|
2013-12-07 07:57:16 +01:00
|
|
|
#ifndef ALLOY_BACKEND_BACKEND_H_
|
|
|
|
|
#define ALLOY_BACKEND_BACKEND_H_
|
2013-01-21 20:55:42 +01:00
|
|
|
|
2013-12-07 07:57:16 +01:00
|
|
|
#include <alloy/core.h>
|
2013-04-21 21:34:20 +02:00
|
|
|
|
2013-01-21 20:55:42 +01:00
|
|
|
|
2013-12-07 07:57:16 +01:00
|
|
|
namespace alloy { namespace runtime { class Runtime; } }
|
2013-01-21 20:55:42 +01:00
|
|
|
|
2013-12-07 07:57:16 +01:00
|
|
|
namespace alloy {
|
|
|
|
|
namespace backend {
|
2013-01-21 20:55:42 +01:00
|
|
|
|
2013-12-07 07:57:16 +01:00
|
|
|
class Assembler;
|
2013-05-22 00:36:58 +02:00
|
|
|
|
2013-01-21 20:55:42 +01:00
|
|
|
|
2013-04-21 21:34:20 +02:00
|
|
|
class Backend {
|
|
|
|
|
public:
|
2013-12-07 07:57:16 +01:00
|
|
|
Backend(runtime::Runtime* runtime);
|
|
|
|
|
virtual ~Backend();
|
|
|
|
|
|
|
|
|
|
virtual int Initialize();
|
|
|
|
|
|
|
|
|
|
virtual void* AllocThreadData();
|
|
|
|
|
virtual void FreeThreadData(void* thread_data);
|
2013-01-21 20:55:42 +01:00
|
|
|
|
2013-12-07 07:57:16 +01:00
|
|
|
virtual Assembler* CreateAssembler() = 0;
|
2013-01-21 20:55:42 +01:00
|
|
|
|
2013-04-21 21:34:20 +02:00
|
|
|
protected:
|
2013-12-07 07:57:16 +01:00
|
|
|
runtime::Runtime* runtime_;
|
2013-04-21 21:34:20 +02:00
|
|
|
};
|
2013-01-21 20:55:42 +01:00
|
|
|
|
|
|
|
|
|
2013-12-07 07:57:16 +01:00
|
|
|
} // namespace backend
|
|
|
|
|
} // namespace alloy
|
2013-01-21 20:55:42 +01:00
|
|
|
|
|
|
|
|
|
2013-12-07 07:57:16 +01:00
|
|
|
#endif // ALLOY_BACKEND_BACKEND_H_
|