Skip to content

Commit 31634a6

Browse files
Update auto-gen cxxbridge files for version 1.0.155
1 parent 9332213 commit 31634a6

10 files changed

Lines changed: 1015 additions & 983 deletions

File tree

lib/cppbind/mmcore/include/mmcore/_cxx.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,9 @@ class Slice final
176176
Slice() noexcept;
177177
Slice(T *, std::size_t count) noexcept;
178178

179+
template <typename C>
180+
explicit Slice(C& c) : Slice(c.data(), c.size()) {}
181+
179182
Slice &operator=(const Slice<T> &) &noexcept = default;
180183
Slice &operator=(Slice<T> &&) &noexcept = default;
181184

@@ -659,7 +662,8 @@ typename Slice<T>::iterator::difference_type
659662
Slice<T>::iterator::operator-(const iterator &other) const noexcept {
660663
auto diff = std::distance(static_cast<char *>(other.pos),
661664
static_cast<char *>(this->pos));
662-
return diff / this->stride;
665+
return diff / static_cast<typename Slice<T>::iterator::difference_type>(
666+
this->stride);
663667
}
664668

665669
template <typename T>

lib/cppbind/mmimage/include/mmimage/_cxx.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,9 @@ class Slice final
176176
Slice() noexcept;
177177
Slice(T *, std::size_t count) noexcept;
178178

179+
template <typename C>
180+
explicit Slice(C& c) : Slice(c.data(), c.size()) {}
181+
179182
Slice &operator=(const Slice<T> &) &noexcept = default;
180183
Slice &operator=(Slice<T> &&) &noexcept = default;
181184

@@ -659,7 +662,8 @@ typename Slice<T>::iterator::difference_type
659662
Slice<T>::iterator::operator-(const iterator &other) const noexcept {
660663
auto diff = std::distance(static_cast<char *>(other.pos),
661664
static_cast<char *>(this->pos));
662-
return diff / this->stride;
665+
return diff / static_cast<typename Slice<T>::iterator::difference_type>(
666+
this->stride);
663667
}
664668

665669
template <typename T>

lib/cppbind/mmimage/include/mmimage/_cxxbridge.h

Lines changed: 62 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,9 @@ class Slice final
174174
Slice() noexcept;
175175
Slice(T *, std::size_t count) noexcept;
176176

177+
template <typename C>
178+
explicit Slice(C& c) : Slice(c.data(), c.size()) {}
179+
177180
Slice &operator=(const Slice<T> &) &noexcept = default;
178181
Slice &operator=(Slice<T> &&) &noexcept = default;
179182

@@ -386,7 +389,8 @@ typename Slice<T>::iterator::difference_type
386389
Slice<T>::iterator::operator-(const iterator &other) const noexcept {
387390
auto diff = std::distance(static_cast<char *>(other.pos),
388391
static_cast<char *>(this->pos));
389-
return diff / this->stride;
392+
return diff / static_cast<typename Slice<T>::iterator::difference_type>(
393+
this->stride);
390394
}
391395

392396
template <typename T>
@@ -989,12 +993,12 @@ struct ExrPixelLayout final {
989993
::std::size_t tile_size_x;
990994
::std::size_t tile_size_y;
991995

992-
bool operator==(const ExrPixelLayout &) const noexcept;
993-
bool operator!=(const ExrPixelLayout &) const noexcept;
994-
bool operator<(const ExrPixelLayout &) const noexcept;
995-
bool operator<=(const ExrPixelLayout &) const noexcept;
996-
bool operator>(const ExrPixelLayout &) const noexcept;
997-
bool operator>=(const ExrPixelLayout &) const noexcept;
996+
bool operator==(ExrPixelLayout const &) const noexcept;
997+
bool operator!=(ExrPixelLayout const &) const noexcept;
998+
bool operator<(ExrPixelLayout const &) const noexcept;
999+
bool operator<=(ExrPixelLayout const &) const noexcept;
1000+
bool operator>(ExrPixelLayout const &) const noexcept;
1001+
bool operator>=(ExrPixelLayout const &) const noexcept;
9981002
using IsRelocatable = ::std::true_type;
9991003
};
10001004
#endif // CXXBRIDGE1_STRUCT_mmimage$ExrPixelLayout
@@ -1016,12 +1020,12 @@ struct ImageExrEncoder final {
10161020
::mmimage::ExrPixelLayout pixel_layout;
10171021
::mmimage::ExrLineOrder line_order;
10181022

1019-
bool operator==(const ImageExrEncoder &) const noexcept;
1020-
bool operator!=(const ImageExrEncoder &) const noexcept;
1021-
bool operator<(const ImageExrEncoder &) const noexcept;
1022-
bool operator<=(const ImageExrEncoder &) const noexcept;
1023-
bool operator>(const ImageExrEncoder &) const noexcept;
1024-
bool operator>=(const ImageExrEncoder &) const noexcept;
1023+
bool operator==(ImageExrEncoder const &) const noexcept;
1024+
bool operator!=(ImageExrEncoder const &) const noexcept;
1025+
bool operator<(ImageExrEncoder const &) const noexcept;
1026+
bool operator<=(ImageExrEncoder const &) const noexcept;
1027+
bool operator>(ImageExrEncoder const &) const noexcept;
1028+
bool operator>=(ImageExrEncoder const &) const noexcept;
10251029
using IsRelocatable = ::std::true_type;
10261030
};
10271031
#endif // CXXBRIDGE1_STRUCT_mmimage$ImageExrEncoder
@@ -1032,12 +1036,12 @@ struct OptionF32 final {
10321036
bool exists;
10331037
float value;
10341038

1035-
bool operator==(const OptionF32 &) const noexcept;
1036-
bool operator!=(const OptionF32 &) const noexcept;
1037-
bool operator<(const OptionF32 &) const noexcept;
1038-
bool operator<=(const OptionF32 &) const noexcept;
1039-
bool operator>(const OptionF32 &) const noexcept;
1040-
bool operator>=(const OptionF32 &) const noexcept;
1039+
bool operator==(OptionF32 const &) const noexcept;
1040+
bool operator!=(OptionF32 const &) const noexcept;
1041+
bool operator<(OptionF32 const &) const noexcept;
1042+
bool operator<=(OptionF32 const &) const noexcept;
1043+
bool operator>(OptionF32 const &) const noexcept;
1044+
bool operator>=(OptionF32 const &) const noexcept;
10411045
using IsRelocatable = ::std::true_type;
10421046
};
10431047
#endif // CXXBRIDGE1_STRUCT_mmimage$OptionF32
@@ -1048,12 +1052,12 @@ struct Vec2F32 final {
10481052
float x;
10491053
float y;
10501054

1051-
bool operator==(const Vec2F32 &) const noexcept;
1052-
bool operator!=(const Vec2F32 &) const noexcept;
1053-
bool operator<(const Vec2F32 &) const noexcept;
1054-
bool operator<=(const Vec2F32 &) const noexcept;
1055-
bool operator>(const Vec2F32 &) const noexcept;
1056-
bool operator>=(const Vec2F32 &) const noexcept;
1055+
bool operator==(Vec2F32 const &) const noexcept;
1056+
bool operator!=(Vec2F32 const &) const noexcept;
1057+
bool operator<(Vec2F32 const &) const noexcept;
1058+
bool operator<=(Vec2F32 const &) const noexcept;
1059+
bool operator>(Vec2F32 const &) const noexcept;
1060+
bool operator>=(Vec2F32 const &) const noexcept;
10571061
using IsRelocatable = ::std::true_type;
10581062
};
10591063
#endif // CXXBRIDGE1_STRUCT_mmimage$Vec2F32
@@ -1064,12 +1068,12 @@ struct Vec2I32 final {
10641068
::std::int32_t x;
10651069
::std::int32_t y;
10661070

1067-
bool operator==(const Vec2I32 &) const noexcept;
1068-
bool operator!=(const Vec2I32 &) const noexcept;
1069-
bool operator<(const Vec2I32 &) const noexcept;
1070-
bool operator<=(const Vec2I32 &) const noexcept;
1071-
bool operator>(const Vec2I32 &) const noexcept;
1072-
bool operator>=(const Vec2I32 &) const noexcept;
1071+
bool operator==(Vec2I32 const &) const noexcept;
1072+
bool operator!=(Vec2I32 const &) const noexcept;
1073+
bool operator<(Vec2I32 const &) const noexcept;
1074+
bool operator<=(Vec2I32 const &) const noexcept;
1075+
bool operator>(Vec2I32 const &) const noexcept;
1076+
bool operator>=(Vec2I32 const &) const noexcept;
10731077
using IsRelocatable = ::std::true_type;
10741078
};
10751079
#endif // CXXBRIDGE1_STRUCT_mmimage$Vec2I32
@@ -1082,12 +1086,12 @@ struct Box2F32 final {
10821086
float max_x;
10831087
float max_y;
10841088

1085-
bool operator==(const Box2F32 &) const noexcept;
1086-
bool operator!=(const Box2F32 &) const noexcept;
1087-
bool operator<(const Box2F32 &) const noexcept;
1088-
bool operator<=(const Box2F32 &) const noexcept;
1089-
bool operator>(const Box2F32 &) const noexcept;
1090-
bool operator>=(const Box2F32 &) const noexcept;
1089+
bool operator==(Box2F32 const &) const noexcept;
1090+
bool operator!=(Box2F32 const &) const noexcept;
1091+
bool operator<(Box2F32 const &) const noexcept;
1092+
bool operator<=(Box2F32 const &) const noexcept;
1093+
bool operator>(Box2F32 const &) const noexcept;
1094+
bool operator>=(Box2F32 const &) const noexcept;
10911095
using IsRelocatable = ::std::true_type;
10921096
};
10931097
#endif // CXXBRIDGE1_STRUCT_mmimage$Box2F32
@@ -1100,12 +1104,12 @@ struct ImageRegionRectangle final {
11001104
::std::size_t size_x;
11011105
::std::size_t size_y;
11021106

1103-
bool operator==(const ImageRegionRectangle &) const noexcept;
1104-
bool operator!=(const ImageRegionRectangle &) const noexcept;
1105-
bool operator<(const ImageRegionRectangle &) const noexcept;
1106-
bool operator<=(const ImageRegionRectangle &) const noexcept;
1107-
bool operator>(const ImageRegionRectangle &) const noexcept;
1108-
bool operator>=(const ImageRegionRectangle &) const noexcept;
1107+
bool operator==(ImageRegionRectangle const &) const noexcept;
1108+
bool operator!=(ImageRegionRectangle const &) const noexcept;
1109+
bool operator<(ImageRegionRectangle const &) const noexcept;
1110+
bool operator<=(ImageRegionRectangle const &) const noexcept;
1111+
bool operator>(ImageRegionRectangle const &) const noexcept;
1112+
bool operator>=(ImageRegionRectangle const &) const noexcept;
11091113
using IsRelocatable = ::std::true_type;
11101114
};
11111115
#endif // CXXBRIDGE1_STRUCT_mmimage$ImageRegionRectangle
@@ -1118,12 +1122,12 @@ struct PixelF32x4 final {
11181122
float b;
11191123
float a;
11201124

1121-
bool operator==(const PixelF32x4 &) const noexcept;
1122-
bool operator!=(const PixelF32x4 &) const noexcept;
1123-
bool operator<(const PixelF32x4 &) const noexcept;
1124-
bool operator<=(const PixelF32x4 &) const noexcept;
1125-
bool operator>(const PixelF32x4 &) const noexcept;
1126-
bool operator>=(const PixelF32x4 &) const noexcept;
1125+
bool operator==(PixelF32x4 const &) const noexcept;
1126+
bool operator!=(PixelF32x4 const &) const noexcept;
1127+
bool operator<(PixelF32x4 const &) const noexcept;
1128+
bool operator<=(PixelF32x4 const &) const noexcept;
1129+
bool operator>(PixelF32x4 const &) const noexcept;
1130+
bool operator>=(PixelF32x4 const &) const noexcept;
11271131
using IsRelocatable = ::std::true_type;
11281132
};
11291133
#endif // CXXBRIDGE1_STRUCT_mmimage$PixelF32x4
@@ -1134,12 +1138,12 @@ struct PixelF64x2 final {
11341138
double x;
11351139
double y;
11361140

1137-
bool operator==(const PixelF64x2 &) const noexcept;
1138-
bool operator!=(const PixelF64x2 &) const noexcept;
1139-
bool operator<(const PixelF64x2 &) const noexcept;
1140-
bool operator<=(const PixelF64x2 &) const noexcept;
1141-
bool operator>(const PixelF64x2 &) const noexcept;
1142-
bool operator>=(const PixelF64x2 &) const noexcept;
1141+
bool operator==(PixelF64x2 const &) const noexcept;
1142+
bool operator!=(PixelF64x2 const &) const noexcept;
1143+
bool operator<(PixelF64x2 const &) const noexcept;
1144+
bool operator<=(PixelF64x2 const &) const noexcept;
1145+
bool operator>(PixelF64x2 const &) const noexcept;
1146+
bool operator>=(PixelF64x2 const &) const noexcept;
11431147
using IsRelocatable = ::std::true_type;
11441148
};
11451149
#endif // CXXBRIDGE1_STRUCT_mmimage$PixelF64x2
@@ -1163,8 +1167,8 @@ struct ShimImagePixelBuffer final : public ::rust::Opaque {
11631167
MMIMAGE_API_EXPORT ::std::size_t num_channels() const noexcept;
11641168
MMIMAGE_API_EXPORT ::std::size_t pixel_count() const noexcept;
11651169
MMIMAGE_API_EXPORT ::std::size_t element_count() const noexcept;
1166-
MMIMAGE_API_EXPORT ::rust::Slice<const ::mmimage::PixelF32x4> as_slice_f32x4() const noexcept;
1167-
MMIMAGE_API_EXPORT ::rust::Slice<::mmimage::PixelF32x4> as_slice_f32x4_mut() noexcept;
1170+
MMIMAGE_API_EXPORT ::rust::Slice<::mmimage::PixelF32x4 const> as_slice_f32x4() const noexcept;
1171+
MMIMAGE_API_EXPORT ::rust::Slice<::mmimage::PixelF32x4 > as_slice_f32x4_mut() noexcept;
11681172
MMIMAGE_API_EXPORT void resize(::mmimage::BufferDataType data_type, ::std::size_t image_width, ::std::size_t image_height, ::std::size_t num_channels) noexcept;
11691173
~ShimImagePixelBuffer() = delete;
11701174

@@ -1235,5 +1239,5 @@ MMIMAGE_API_EXPORT bool shim_image_read_pixels_exr_f32x4(::rust::Str file_path,
12351239

12361240
MMIMAGE_API_EXPORT bool shim_image_read_metadata_exr(::rust::Str file_path, ::rust::Box<::mmimage::ShimImageMetaData> &out_meta_data) noexcept;
12371241

1238-
MMIMAGE_API_EXPORT bool shim_image_write_pixels_exr_f32x4(::rust::Str file_path, ::mmimage::ImageExrEncoder exr_encoder, const ::rust::Box<::mmimage::ShimImageMetaData> &in_meta_data, const ::rust::Box<::mmimage::ShimImagePixelBuffer> &in_pixel_buffer) noexcept;
1242+
MMIMAGE_API_EXPORT bool shim_image_write_pixels_exr_f32x4(::rust::Str file_path, ::mmimage::ImageExrEncoder exr_encoder, ::rust::Box<::mmimage::ShimImageMetaData> const &in_meta_data, ::rust::Box<::mmimage::ShimImagePixelBuffer> const &in_pixel_buffer) noexcept;
12391243
} // namespace mmimage

0 commit comments

Comments
 (0)