Last active
December 11, 2015 06:27
-
-
Save ChunChunMorning/6e5c5b8fe7ea05cca0a9 to your computer and use it in GitHub Desktop.
Siv3Dの機能をフル活用してセーブデータを実装する No1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
std::unordered_map<String, String> m_data; | |
template<typename Type> void add(const String& key, const Type& value) | |
{ | |
m_data[key] = Format(value); | |
} | |
template<typename Type> Optional<Type> getOpt(String key) const | |
{ | |
if (hasKey(key)) | |
{ | |
return ParseOpt<Type>(m_data.at(key)); | |
} | |
return none; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment