| 233 | template<typename U> class AllocatorType = std::allocator |
| 234 | > |
| 235 | class basic_json |
| 236 | { |
| 237 | private: |
| 238 | /// workaround type for MSVC |
| 239 | using basic_json_t = basic_json<ObjectType, ArrayType, StringType, |
| 240 | BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, |
| 241 | AllocatorType>; |
| 242 | |
| 243 | public: |
| 244 | // forward declarations |
| 245 | template<typename Base> class json_reverse_iterator; |
| 246 | class json_pointer; |
| 247 | |
| 248 | ///////////////////// |
| 249 | // container types // |
| 250 | ///////////////////// |
| 251 | |
| 252 | /// @name container types |
| 253 | /// The canonic container types to use @ref basic_json like any other STL |
| 254 | /// container. |
| 255 | /// @{ |
| 256 | |
| 257 | /// the type of elements in a basic_json container |
| 258 | using value_type = basic_json; |
| 259 | |
| 260 | /// the type of an element reference |
| 261 | using reference = value_type&; |
| 262 | /// the type of an element const reference |
| 263 | using const_reference = const value_type&; |
| 264 | |
| 265 | /// a type to represent differences between iterators |
| 266 | using difference_type = std::ptrdiff_t; |
| 267 | /// a type to represent container sizes |
| 268 | using size_type = std::size_t; |
| 269 | |
| 270 | /// the allocator type |
| 271 | using allocator_type = AllocatorType<basic_json>; |
| 272 | |
| 273 | /// the type of an element pointer |
| 274 | using pointer = typename std::allocator_traits<allocator_type>::pointer; |
| 275 | /// the type of an element const pointer |
| 276 | using const_pointer = typename std::allocator_traits<allocator_type>::const_pointer; |
| 277 | |
| 278 | /// an iterator for a basic_json container |
| 279 | class iterator; |
| 280 | /// a const iterator for a basic_json container |
| 281 | class const_iterator; |
| 282 | /// a reverse iterator for a basic_json container |
| 283 | using reverse_iterator = json_reverse_iterator<typename basic_json::iterator>; |
| 284 | /// a const reverse iterator for a basic_json container |
| 285 | using const_reverse_iterator = json_reverse_iterator<typename basic_json::const_iterator>; |
| 286 | |
| 287 | /// @} |
| 288 | |
| 289 | |
| 290 | /*! |
| 291 | @brief returns the allocator associated with the container |
| 292 | */ |
no test coverage detected