summaryrefslogtreecommitdiff
path: root/number.h
diff options
context:
space:
mode:
authorOlivier Gayot <og@satcom1.com>2017-11-18 13:42:45 +0100
committerOlivier Gayot <og@satcom1.com>2017-11-19 14:01:08 +0100
commitacab244a6342be7597d0f2d22dc90a43f425fbb8 (patch)
treefc9288bbea13abb702820a524cbc4ce6fb247ce5 /number.h
parent589f8e2558d008c63892f2345b233e28d889620b (diff)
Added functions to print a number as hex or dec string
Signed-off-by: Olivier Gayot <og@satcom1.com>
Diffstat (limited to 'number.h')
-rw-r--r--number.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/number.h b/number.h
index ca5075e..e7eebb5 100644
--- a/number.h
+++ b/number.h
@@ -9,6 +9,16 @@ public:
number() = default;
/**
+ * \brief Return a hexadecimal string representation of this number.
+ */
+ std::string to_hex_string() const;
+
+ /**
+ * \brief Return a decimal string representation of this number.
+ */
+ std::string to_dec_string() const;
+
+ /**
* \brief Return the result of the addition of a number and this number.
*
* \param n The number to add to this number.