GME  13
CoreDictionaryAttributeValue.cpp
Go to the documentation of this file.
00001 #include "StdAfx.h"
00002 
00003 #include "CoreDictionaryAttributeValue.h"
00004 
00005 STDMETHODIMP CCoreDictionaryAttributeValue::put_Value(BSTR Key, BSTR Value)
00006 {
00007 COMTRY {
00008         m_dict[CComBSTR(Key)] = CComBSTR(Value);
00009 } COMCATCH(;)
00010 }
00011 STDMETHODIMP CCoreDictionaryAttributeValue::get_Value(BSTR Key, BSTR* Value)
00012 {
00013 COMTRY {
00014         CComBSTR _key;
00015         _key.Attach(Key);
00016         auto ent = m_dict.find(_key);
00017         _key.Detach();
00018         if (ent == m_dict.end())
00019                 return E_NOTFOUND;
00020         *Value = CComBSTR(ent->second).Detach();
00021 } COMCATCH(;)
00022 }
00023 
00024 STDMETHODIMP CCoreDictionaryAttributeValue::get_Keys(VARIANT* Keys)
00025 {
00026 COMTRY {
00027         return E_NOTIMPL;
00028 } COMCATCH(;)
00029 }