Skip to content

Commit 6d89aeb

Browse files
author
Stuart Cording
committed
Addition of size() function to Intel HEX class.
1 parent ba5ebe5 commit 6d89aeb

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

intelhex_class/intelhexclass.h

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -593,6 +593,27 @@ class intelhex {
593593
}
594594
}
595595

596+
/**********************************************************************/
597+
/*! \brief Checks if we have reached end of available data
598+
*
599+
* The internal pointer is checked to see if we have reached the end of
600+
* the data held in memory
601+
*
602+
* \sa operator++(), operator++(int), operator--(), operator--(int),
603+
* empty()
604+
*
605+
* \retval true - reached the end of the Intel HEX data in memory or no
606+
* data in memory yet.
607+
* \retval false - end of Intel HEX data in memory not yet reached.
608+
*
609+
* \note This function has no effect if no file has been as yet decoded
610+
* and no data has been inserted into memory.
611+
***********************************************************************/
612+
unsigned long size()
613+
{
614+
return static_cast<unsigned long>(ihContent.size());
615+
}
616+
596617
/**********************************************************************/
597618
/*! \brief Checks if we have reached end of available data
598619
*

0 commit comments

Comments
 (0)