Jeff Thompson | fa30664 | 2013-06-17 15:06:57 -0700 | [diff] [blame] | 1 | /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */ |
| 2 | /* |
| 3 | * Copyright (c) 2013, Regents of the University of California |
| 4 | * Alexander Afanasyev |
| 5 | * |
| 6 | * BSD license, See the LICENSE file for more information |
| 7 | * |
| 8 | * Author: Alexander Afanasyev <alexander.afanasyev@ucla.edu> |
| 9 | */ |
| 10 | |
| 11 | #ifndef NDN_TRIE_PAYLOAD_TRAITS_PTR_H |
| 12 | #define NDN_TRIE_PAYLOAD_TRAITS_PTR_H |
| 13 | |
| 14 | namespace ndn { |
| 15 | namespace trie { |
| 16 | |
| 17 | template<typename Payload, typename BasePayload = Payload> |
| 18 | struct ptr_payload_traits |
| 19 | { |
| 20 | typedef Payload payload_type; |
| 21 | typedef Ptr<Payload> storage_type; |
| 22 | typedef Ptr<Payload> insert_type; |
| 23 | |
| 24 | typedef Ptr<Payload> return_type; |
| 25 | typedef Ptr<const Payload> const_return_type; |
| 26 | |
| 27 | typedef Ptr<BasePayload> base_type; |
| 28 | typedef Ptr<const BasePayload> const_base_type; |
| 29 | |
| 30 | static Ptr<Payload> empty_payload; |
| 31 | }; |
| 32 | |
| 33 | template<typename Payload, typename BasePayload> |
| 34 | Ptr<Payload> |
| 35 | ptr_payload_traits<Payload, BasePayload>::empty_payload; // = Ptr<Payload> (); |
| 36 | |
| 37 | } // trie |
| 38 | } // ndn |
| 39 | |
| 40 | #endif // NDN_TRIE_PAYLOAD_TRAITS_PTR_H |