1 /**
2  * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3  * SPDX-License-Identifier: Apache-2.0.
4  */
5 
6 #pragma once
7 
8 #include <aws/core/utils/memory/stl/AWSMap.h>
9 #include <aws/core/utils/memory/stl/AWSString.h>
10 #include <aws/core/Core_EXPORTS.h>
11 #include <aws/core/utils/threading/ReaderWriterLock.h>
12 
13 namespace Aws
14 {
15     namespace Utils
16     {
17         /**
18          * This container is for storing unknown enum values that are encountered during parsing.
19          * This is to work around the round-tripping enums problem. It's really just a simple thread-safe
20          * hashmap.
21          */
22         class AWS_CORE_API EnumParseOverflowContainer
23         {
24         public:
25             const Aws::String& RetrieveOverflow(int hashCode) const;
26             void StoreOverflow(int hashCode, const Aws::String& value);
27 
28         private:
29             mutable Aws::Utils::Threading::ReaderWriterLock m_overflowLock;
30             Aws::Map<int, Aws::String> m_overflowMap;
31             Aws::String m_emptyString;
32         };
33     }
34 }
35 
36 
37