Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
FlashStringIterator.hpp
00001 // ArduinoJson - arduinojson.org 00002 // Copyright Benoit Blanchon 2014-2021 00003 // MIT License 00004 00005 #pragma once 00006 00007 namespace ARDUINOJSON_NAMESPACE { 00008 00009 class FlashStringIterator { 00010 public: 00011 explicit FlashStringIterator(const __FlashStringHelper* ptr) 00012 : _ptr(reinterpret_cast<const char*>(ptr)) {} 00013 00014 explicit FlashStringIterator(const char* ptr) : _ptr(ptr) {} 00015 00016 FlashStringIterator operator+(ptrdiff_t d) const { 00017 return FlashStringIterator(_ptr + d); 00018 } 00019 00020 ptrdiff_t operator-(FlashStringIterator other) const { 00021 return _ptr - other._ptr; 00022 } 00023 00024 FlashStringIterator operator++(int) { 00025 return FlashStringIterator(_ptr++); 00026 } 00027 00028 FlashStringIterator operator++() { 00029 return FlashStringIterator(++_ptr); 00030 } 00031 00032 bool operator!=(FlashStringIterator other) const { 00033 return _ptr != other._ptr; 00034 } 00035 00036 char operator*() const { 00037 return char(pgm_read_byte(_ptr)); 00038 } 00039 00040 private: 00041 const char* _ptr; 00042 }; 00043 00044 } // namespace ARDUINOJSON_NAMESPACE
Generated on Wed Jul 13 2022 01:10:36 by
1.7.2