From 250e30d73f09e9da2b5a81d0fbae63744ae12a73 Mon Sep 17 00:00:00 2001 From: chai Date: Tue, 2 Apr 2019 08:47:15 +0800 Subject: *misc --- source/libs/asura-lib-utils/stringmap.hpp | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 source/libs/asura-lib-utils/stringmap.hpp (limited to 'source/libs/asura-lib-utils/stringmap.hpp') diff --git a/source/libs/asura-lib-utils/stringmap.hpp b/source/libs/asura-lib-utils/stringmap.hpp new file mode 100644 index 0000000..ddba128 --- /dev/null +++ b/source/libs/asura-lib-utils/stringmap.hpp @@ -0,0 +1,29 @@ +#ifndef __ASURA_ENGINE_STRINGMAP_H__ +#define __ASURA_ENGINE_STRINGMAP_H__ + +#include + +namespace AsuraEngine +{ + + /// + /// 一个双向一一对应的映射,用来储存shader uniforms、statemathine state parameter的ID。 + /// + template + class StringMap + { + public: + + bool ContainsKey(const key_type& key); + + bool ContainsString(const String& str); + + std::string GetStringByKey(const key_type& key); + + key_type GetKeyByString(const String& str); + + }; + +} + +#endif \ No newline at end of file -- cgit v1.1-26-g67d0