+ template< typename OCREP >
+ RCSByteString insertOcBinary(Detail::Int2Type< 0 >, const OCREP& ocBinary)
+ {
+ return RCSByteString(ocBinary);
+ }
+
+ template< int DEPTH, typename OCREPS,
+ typename ATTRS = typename Detail::SeqType< DEPTH, RCSByteString >::type >
+ ATTRS insertOcBinary(Detail::Int2Type< DEPTH >, const OCREPS& ocBinaryVec)
+ {
+ ATTRS result;
+
+ for (const auto& nested : ocBinaryVec)
+ {
+ result.push_back(insertOcBinary(Detail::Int2Type< DEPTH - 1 >{ }, nested));
+ }
+
+ return result;
+ }
+
+ template< OC::AttributeType BASE_TYPE, int DEPTH >
+ void insertOcBinary(Detail::Int2Type< DEPTH >,
+ const OC::OCRepresentation::AttributeItem& item)
+ {
+ typedef typename Detail::OCItemType< DEPTH, BASE_TYPE >::type ItemType;
+
+ putValue(item.attrname(),
+ insertOcBinary(Detail::Int2Type< DEPTH >{ },
+ item.getValue< ItemType >()));
+ }
+