From f9eb7548fd267c6bf2cab8416492401e7bab1735 Mon Sep 17 00:00:00 2001 From: Myun2 Date: Mon, 20 Sep 2010 16:37:47 +0900 Subject: [PATCH] =?utf8?q?static=5Fmap.hpp:=20=E9=80=94=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- roast/include/roast/tp/static_map.hpp | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/roast/include/roast/tp/static_map.hpp b/roast/include/roast/tp/static_map.hpp index 4aa7525f..b013c403 100644 --- a/roast/include/roast/tp/static_map.hpp +++ b/roast/include/roast/tp/static_map.hpp @@ -3,18 +3,27 @@ #ifndef __SFJP_ROAST___tp__static_map_HPP__ #define __SFJP_ROAST___tp__static_map_HPP__ +//#include "roast/std/tuple.hpp" +#include +#include "roast/std/unitype_tuple.hpp" + namespace roast { // Key is int fixed. - template + template class static_map { + public: + typedef ::std::pair _KvPair; + typedef unitype_tuple<_KvPair, _Count> _Array; protected: - const static _Val; + const static _Array m_array; public: - static_map(const _Val& v) : _Val(v){} + static_map(const _Array& v) : m_array(v) {} - _Val::value_type operator [] (_Key k){ } + template + _Val get(){ return m_array. } + //_Val::value_type operator [] (_Key k){ } }; } -- 2.11.0