Chromium Code Reviews| Index: mojo/public/cpp/bindings/lib/map_serialization_forward.h |
| diff --git a/mojo/public/cpp/bindings/lib/map_serialization_forward.h b/mojo/public/cpp/bindings/lib/map_serialization_forward.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..3c1f379870008d97594272708efd5ea1c3794610 |
| --- /dev/null |
| +++ b/mojo/public/cpp/bindings/lib/map_serialization_forward.h |
| @@ -0,0 +1,45 @@ |
| +// Copyright 2015 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef MOJO_PUBLIC_CPP_BINDINGS_LIB_MAP_SERIALIZATION_FORWARD_H_ |
| +#define MOJO_PUBLIC_CPP_BINDINGS_LIB_MAP_SERIALIZATION_FORWARD_H_ |
| + |
| +// Headers such as array_serialization.h can include this file to avoid circular |
|
viettrungluu
2015/09/23 23:20:24
Nit: I'd move this above the include guard (#ifnde
vardhan
2015/09/25 19:33:05
Done.
|
| +// dependencies on map_serialization.h. |
| + |
| +namespace mojo { |
| +namespace internal { |
| + |
| +class ArrayValidateParams; |
| +class Buffer; |
| + |
| +template <typename Key, typename Value> |
| +class Map_Data; |
| + |
| +} // namespace internal |
| + |
| +template <typename Key, typename Value> |
| +class Map; |
| + |
| +template <typename MapKey, |
| + typename MapValue, |
| + typename DataKey, |
| + typename DataValue> |
| +void SerializeMap_(Map<MapKey, MapValue>* input, |
| + internal::Buffer* buf, |
| + internal::Map_Data<DataKey, DataValue>** output, |
| + const internal::ArrayValidateParams* value_validate_params); |
| +template <typename MapKey, typename MapValue> |
| +size_t GetSerializedSize_(const Map<MapKey, MapValue>& input); |
| + |
| +template <typename MapKey, |
| + typename MapValue, |
| + typename DataKey, |
| + typename DataValue> |
| +void Deserialize_(internal::Map_Data<DataKey, DataValue>* input, |
| + Map<MapKey, MapValue>* output); |
| + |
| +} // namespace mojo |
| + |
| +#endif // MOJO_PUBLIC_CPP_BINDINGS_LIB_MAP_SERIALIZATION_FORWARD_H_ |