#pragma once #include #include #include "ROMDBEntry.h" #include "Database.h" #include "ROMDBEntry.h" using namespace Windows::Foundation; using namespace Windows::Foundation::Collections; using namespace Platform; using namespace Platform::Collections; using namespace Concurrency; namespace VBA10 { namespace WFC = Windows::Foundation::Collections; namespace PC = Platform::Collections; ref class ROMDatabase sealed { public: ROMDatabase(); internal: task Initialize(void); task AddAsync(ROMDBEntry^ entry); task^> RetrieveQuerry(); task UpdateAsync(ROMDBEntry^ entry); ROMDBEntry^ GetEntryFromName(Platform::String^ name); task RemoveAsync(ROMDBEntry^ entry); property PC::Vector^ AllROMDBEntries { PC::Vector^ get() { return _allROMDBEntries; } } private: //static ROMDatabase^ singleton; SQLiteWinRT::Database^ db; SQLiteWinRT::Statement^ statement; //temporary pointer to store statement PC::Vector^ _allROMDBEntries; task LoadSnapshotImage(); Platform::String^ ReplaceSingleQuote(Platform::String^ pstr); bool initialized; }; }