projects
/
platform
/
upstream
/
iotivity.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
replace : iotivity -> iotivity-sec
[platform/upstream/iotivity.git]
/
service
/
resource-encapsulation
/
src
/
common
/
primitiveResource
/
src
/
RCSResourceAttributes.cpp
diff --git
a/service/resource-encapsulation/src/common/primitiveResource/src/RCSResourceAttributes.cpp
b/service/resource-encapsulation/src/common/primitiveResource/src/RCSResourceAttributes.cpp
index
ee66c98
..
75e9d56
100644
(file)
--- a/
service/resource-encapsulation/src/common/primitiveResource/src/RCSResourceAttributes.cpp
+++ b/
service/resource-encapsulation/src/common/primitiveResource/src/RCSResourceAttributes.cpp
@@
-30,12
+30,6
@@
#include "boost/mpl/size.hpp"
#include "boost/mpl/deref.hpp"
#include "boost/mpl/size.hpp"
#include "boost/mpl/deref.hpp"
-#ifdef __APPLE__
-#define OC_CONSTEXPR_INLINE inline
-#else
-#define OC_CONSTEXPR_INLINE constexpr inline
-#endif
-
namespace
{
namespace
{
@@
-84,6
+78,14
@@
namespace
m_stream << "\"" + value + "\"";
}
m_stream << "\"" + value + "\"";
}
+ void operator()(const RCSByteString& value)
+ {
+ for (size_t i = 0; i < value.size(); ++i)
+ {
+ m_stream << "\\x" << std::hex << (int)value[i];
+ }
+ }
+
void operator()(const RCSResourceAttributes& attrs)
{
m_stream << "{";
void operator()(const RCSResourceAttributes& attrs)
{
m_stream << "{";
@@
-161,6
+163,13
@@
namespace
};
template< >
};
template< >
+ struct TypeInfoConverter< RCSByteString >
+ {
+ static constexpr RCSResourceAttributes::TypeId typeId =
+ RCSResourceAttributes::TypeId::BYTESTRING;
+ };
+
+ template< >
struct TypeInfoConverter< RCSResourceAttributes >
{
static constexpr RCSResourceAttributes::TypeId typeId =
struct TypeInfoConverter< RCSResourceAttributes >
{
static constexpr RCSResourceAttributes::TypeId typeId =
@@
-212,7
+221,7
@@
namespace
};
template< typename VARIANT, int POS >
};
template< typename VARIANT, int POS >
-
OC_CONSTEXPR_INLINE
std::vector< TypeInfo > getTypeInfo(Int2Type< POS >) noexcept
+
inline
std::vector< TypeInfo > getTypeInfo(Int2Type< POS >) noexcept
{
auto vec = getTypeInfo< VARIANT >(Int2Type< POS - 1 >{ });
vec.push_back(TypeInfo::get< VARIANT, POS >());
{
auto vec = getTypeInfo< VARIANT >(Int2Type< POS - 1 >{ });
vec.push_back(TypeInfo::get< VARIANT, POS >());
@@
-220,7
+229,7
@@
namespace
}
template< typename VARIANT >
}
template< typename VARIANT >
-
OC_CONSTEXPR_INLINE
std::vector< TypeInfo > getTypeInfo(Int2Type< 0 >) noexcept
+
inline
std::vector< TypeInfo > getTypeInfo(Int2Type< 0 >) noexcept
{
return { TypeInfo::get< VARIANT, 0 >() };
}
{
return { TypeInfo::get< VARIANT, 0 >() };
}
@@
-237,7
+246,6
@@
namespace
return typeInfos[which];
}
return typeInfos[which];
}
-
} // unnamed namespace
} // unnamed namespace
@@
-245,7
+253,6
@@
namespace OIC
{
namespace Service
{
{
namespace Service
{
-
RCSResourceAttributes::Value::ComparisonHelper::ComparisonHelper(const Value& v) :
m_valueRef(v)
{
RCSResourceAttributes::Value::ComparisonHelper::ComparisonHelper(const Value& v) :
m_valueRef(v)
{