Added config macro UAVCAN_TOSTRING

This commit is contained in:
Pavel Kirienko
2014-04-10 13:32:35 +04:00
parent 29138214dc
commit d0b541e22d
20 changed files with 62 additions and 21 deletions
+9 -2
View File
@@ -4,10 +4,9 @@
#pragma once
#include <uavcan/stdint.hpp>
#include <algorithm>
#include <limits>
#include <cstdio>
#include <uavcan/stdint.hpp>
#include <uavcan/impl_constants.hpp>
#include <uavcan/util/compile_time.hpp>
#include <uavcan/Timestamp.hpp>
@@ -83,7 +82,9 @@ public:
enum { StringBufSize = 32 };
void toString(char buf[StringBufSize]) const;
#if UAVCAN_TOSTRING
std::string toString() const;
#endif
};
@@ -164,7 +165,9 @@ public:
enum { StringBufSize = 32 };
void toString(char buf[StringBufSize]) const;
#if UAVCAN_TOSTRING
std::string toString() const;
#endif
};
/*
@@ -230,6 +233,8 @@ void TimeBase<T, D>::toString(char buf[StringBufSize]) const
}
#if UAVCAN_TOSTRING
template <typename D>
std::string DurationBase<D>::toString() const
{
@@ -246,6 +251,8 @@ std::string TimeBase<T, D>::toString() const
return std::string(buf);
}
#endif
template <typename Stream, typename D>
UAVCAN_EXPORT