AWS SDK for C++  0.12.9
AWS SDK for C++
AWSMap.h
Go to the documentation of this file.
1 /*
2  * Copyright 2010-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License").
5  * You may not use this file except in compliance with the License.
6  * A copy of the License is located at
7  *
8  * http://aws.amazon.com/apache2.0
9  *
10  * or in the "license" file accompanying this file. This file is distributed
11  * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12  * express or implied. See the License for the specific language governing
13  * permissions and limitations under the License.
14  */
15 
16 #pragma once
17 
18 #include <aws/core/Core_EXPORTS.h>
19 
21 
22 #include <map>
23 #include <cstring>
24 
25 namespace Aws
26 {
27 
28 template< typename K, typename V > using Map = std::map< K, V, std::less< K >, Aws::Allocator< std::pair< const K, V > > >;
29 
31 {
32  bool operator()(const char* a, const char* b) const
33  {
34  return std::strcmp(a, b) < 0;
35  }
36 };
37 
38 template<typename V> using CStringMap = std::map<const char*, V, CompareStrings, Aws::Allocator<std::pair<const char*, V> > >;
39 
40 } // namespace Aws
std::map< const char *, V, CompareStrings, Aws::Allocator< std::pair< const char *, V > > > CStringMap
Definition: AWSMap.h:38
std::map< K, V, std::less< K >, Aws::Allocator< std::pair< const K, V > > > Map
Definition: AWSMap.h:28
bool operator()(const char *a, const char *b) const
Definition: AWSMap.h:32
std::allocator< T > Allocator
Definition: AWSAllocator.h:94
JSON (JavaScript Object Notation).