Пример #1
0
        //--------------------------------------------------------------
        //--------------------------------------------------------------
		bool AppDataStore::TryGetValue(const std::string& in_key, u64& out_value) const
        {
            std::unique_lock<std::mutex> lock(m_mutex);
            
			std::string strTempValue;
			bool bSuccess = m_dictionary.TryGetValue(in_key, strTempValue);
			if(bSuccess)
            {
				out_value = static_cast<u64>(ParseU64(strTempValue));
			}
			return bSuccess;			
		}
Пример #2
0
 //--------------------------------------------------
 //--------------------------------------------------
 template <> u64 GetAttributeValue<u64>(const XML::Node* in_node, const std::string& in_attributeName, const u64& in_defaultValue)
 {
     for(rapidxml::xml_attribute<>* attribute = in_node->first_attribute(); attribute != nullptr; attribute = attribute->next_attribute())
     {
         if (GetName(attribute) == in_attributeName)
         {
             return ParseU64(GetValue(attribute));
         }
     }
     
     return in_defaultValue;
 }
 //------------------------------------------------------------------------------
 //------------------------------------------------------------------------------
 template <> u64 ParseValue(const std::string& in_value)
 {
     return ParseU64(in_value);
 }