Exemplo n.º 1
0
        //--------------------------------------------------------------
        //--------------------------------------------------------------
		bool AppDataStore::TryGetValue(const std::string& in_key, s64& 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<s64>(ParseS64(strTempValue));
			}
			return bSuccess;			
		}
Exemplo n.º 2
0
 //--------------------------------------------------
 //--------------------------------------------------
 template <> s64 GetAttributeValue<s64>(const XML::Node* in_node, const std::string& in_attributeName, const s64& in_defaultValue)
 {
     for(rapidxml::xml_attribute<>* attribute = in_node->first_attribute(); attribute != nullptr; attribute = attribute->next_attribute())
     {
         if (GetName(attribute) == in_attributeName)
         {
             return ParseS64(GetValue(attribute));
         }
     }
     
     return in_defaultValue;
 }
 //------------------------------------------------------------------------------
 //------------------------------------------------------------------------------
 template <> s64 ParseValue(const std::string& in_value)
 {
     return ParseS64(in_value);
 }