From 9e5f41ed6ebe64a789916794626485460078c420 Mon Sep 17 00:00:00 2001 From: Mauro Sardara Date: Sat, 19 Jan 2019 01:29:33 +0100 Subject: - Code style fix - Improved vpp binary api interface - Correction in object pool destructor - Fix error in Memif Connector Change-Id: Id1dd9219fc1ac0b3717ae019ebff17373bebc635 Signed-off-by: Mauro Sardara --- .../transport/core/manifest_format_json_jsoncpp.h | 54 +++++++++++----------- 1 file changed, 27 insertions(+), 27 deletions(-) mode change 100755 => 100644 libtransport/src/hicn/transport/core/manifest_format_json_jsoncpp.h (limited to 'libtransport/src/hicn/transport/core/manifest_format_json_jsoncpp.h') diff --git a/libtransport/src/hicn/transport/core/manifest_format_json_jsoncpp.h b/libtransport/src/hicn/transport/core/manifest_format_json_jsoncpp.h old mode 100755 new mode 100644 index 39f0cf351..84d2ba29a --- a/libtransport/src/hicn/transport/core/manifest_format_json_jsoncpp.h +++ b/libtransport/src/hicn/transport/core/manifest_format_json_jsoncpp.h @@ -38,7 +38,7 @@ struct JSON { using Encoder = JSONManifestEncoder; using Decoder = JSONManifestDecoder; using HashType = utils::CryptoHash; - using SuffixList = std::unordered_map; + using SuffixList = std::unordered_map; }; template @@ -46,91 +46,91 @@ struct JSONKey; template <> struct JSONKey { - static const constexpr char* key = "manifest_version"; + static const constexpr char *key = "manifest_version"; }; template <> struct JSONKey { - static const constexpr char* key = "hash_algorithm"; + static const constexpr char *key = "hash_algorithm"; }; template <> struct JSONKey { - static const constexpr char* key = "manifest_type"; + static const constexpr char *key = "manifest_type"; }; template <> struct JSONKey { - static const constexpr char* key = "next_segment_strategy"; + static const constexpr char *key = "next_segment_strategy"; }; template <> struct JSONKey { - static const constexpr char* key = "suffix_hash_list"; + static const constexpr char *key = "suffix_hash_list"; }; template <> struct JSONKey { - static const constexpr char* key = "base_name"; + static const constexpr char *key = "base_name"; }; template <> struct JSONKey { - static const constexpr char* final_manifest = "final_manifest"; + static const constexpr char *final_manifest = "final_manifest"; }; class JSONManifestEncoder : public ManifestEncoder { public: - JSONManifestEncoder(Packet& packet); + JSONManifestEncoder(Packet &packet); ~JSONManifestEncoder() override; - JSONManifestEncoder& encodeImpl(); + JSONManifestEncoder &encodeImpl(); - JSONManifestEncoder& clearImpl(); + JSONManifestEncoder &clearImpl(); - JSONManifestEncoder& setManifestTypeImpl(ManifestType manifest_type); + JSONManifestEncoder &setManifestTypeImpl(ManifestType manifest_type); - JSONManifestEncoder& setHashAlgorithmImpl(HashAlgorithm algorithm); + JSONManifestEncoder &setHashAlgorithmImpl(HashAlgorithm algorithm); - JSONManifestEncoder& setNextSegmentCalculationStrategyImpl( + JSONManifestEncoder &setNextSegmentCalculationStrategyImpl( NextSegmentCalculationStrategy strategy); - JSONManifestEncoder& setSuffixHashListImpl( - const typename JSON::SuffixList& name_hash_list); + JSONManifestEncoder &setSuffixHashListImpl( + const typename JSON::SuffixList &name_hash_list); - JSONManifestEncoder& setBaseNameImpl(const core::Name& base_name); + JSONManifestEncoder &setBaseNameImpl(const core::Name &base_name); - JSONManifestEncoder& addSuffixAndHashImpl(uint32_t suffix, - const utils::CryptoHash& hash); + JSONManifestEncoder &addSuffixAndHashImpl(uint32_t suffix, + const utils::CryptoHash &hash); - JSONManifestEncoder& setIsFinalManifestImpl(bool is_last); + JSONManifestEncoder &setIsFinalManifestImpl(bool is_last); - JSONManifestEncoder& setVersionImpl(ManifestVersion version); + JSONManifestEncoder &setVersionImpl(ManifestVersion version); std::size_t estimateSerializedLengthImpl(std::size_t number_of_entries); - JSONManifestEncoder& updateImpl(); + JSONManifestEncoder &updateImpl(); - JSONManifestEncoder& setFinalBlockNumberImpl( + JSONManifestEncoder &setFinalBlockNumberImpl( std::uint32_t final_block_number); static std::size_t getManifestHeaderSizeImpl(); private: - Packet& packet_; + Packet &packet_; Json::Value root_; }; class JSONManifestDecoder : public ManifestDecoder { public: - JSONManifestDecoder(Packet& packet); + JSONManifestDecoder(Packet &packet); ~JSONManifestDecoder() override; void decodeImpl(); - JSONManifestDecoder& clearImpl(); + JSONManifestDecoder &clearImpl(); ManifestType getManifestTypeImpl() const; @@ -153,7 +153,7 @@ class JSONManifestDecoder : public ManifestDecoder { uint32_t getFinalBlockNumberImpl() const; private: - Packet& packet_; + Packet &packet_; Json::Value root_; }; -- cgit 1.2.3-korg