Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions cpp/test/generated/binary/protocols.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3802,6 +3802,18 @@ void DynamicNDArraysWriter::WriteRecordWithDynamicNDArraysImpl(test_model::Recor
test_model::binary::WriteRecordWithDynamicNDArrays(stream_, value);
}

void DynamicNDArraysWriter::WriteRecWithFixedVectorsArrayImpl(yardl::DynamicNDArray<test_model::RecordWithFixedVectors> const& value) {
yardl::binary::WriteDynamicNDArray<test_model::RecordWithFixedVectors, test_model::binary::WriteRecordWithFixedVectors>(stream_, value);
}

void DynamicNDArraysWriter::WriteRecWithOptionalFieldsArrayImpl(yardl::DynamicNDArray<test_model::RecordWithOptionalFields> const& value) {
yardl::binary::WriteDynamicNDArray<test_model::RecordWithOptionalFields, test_model::binary::WriteRecordWithOptionalFields>(stream_, value);
}

void DynamicNDArraysWriter::WriteRecWithStringsArrayImpl(yardl::DynamicNDArray<test_model::RecordWithStrings> const& value) {
yardl::binary::WriteDynamicNDArray<test_model::RecordWithStrings, test_model::binary::WriteRecordWithStrings>(stream_, value);
}

void DynamicNDArraysWriter::Flush() {
stream_.Flush();
}
Expand All @@ -3826,6 +3838,18 @@ void DynamicNDArraysReader::ReadRecordWithDynamicNDArraysImpl(test_model::Record
test_model::binary::ReadRecordWithDynamicNDArrays(stream_, value);
}

void DynamicNDArraysReader::ReadRecWithFixedVectorsArrayImpl(yardl::DynamicNDArray<test_model::RecordWithFixedVectors>& value) {
yardl::binary::ReadDynamicNDArray<test_model::RecordWithFixedVectors, test_model::binary::ReadRecordWithFixedVectors>(stream_, value);
}

void DynamicNDArraysReader::ReadRecWithOptionalFieldsArrayImpl(yardl::DynamicNDArray<test_model::RecordWithOptionalFields>& value) {
yardl::binary::ReadDynamicNDArray<test_model::RecordWithOptionalFields, test_model::binary::ReadRecordWithOptionalFields>(stream_, value);
}

void DynamicNDArraysReader::ReadRecWithStringsArrayImpl(yardl::DynamicNDArray<test_model::RecordWithStrings>& value) {
yardl::binary::ReadDynamicNDArray<test_model::RecordWithStrings, test_model::binary::ReadRecordWithStrings>(stream_, value);
}

void DynamicNDArraysReader::CloseImpl() {
if (!skip_completed_check_) {
stream_.VerifyFinished();
Expand Down Expand Up @@ -4139,6 +4163,10 @@ void EnumsWriter::WriteRecImpl(test_model::RecordWithEnums const& value) {
test_model::binary::WriteRecordWithEnums(stream_, value);
}

void EnumsWriter::WriteRecArrayImpl(yardl::DynamicNDArray<test_model::RecordWithEnums> const& value) {
yardl::binary::WriteDynamicNDArray<test_model::RecordWithEnums, test_model::binary::WriteRecordWithEnums>(stream_, value);
}

void EnumsWriter::Flush() {
stream_.Flush();
}
Expand All @@ -4163,6 +4191,10 @@ void EnumsReader::ReadRecImpl(test_model::RecordWithEnums& value) {
test_model::binary::ReadRecordWithEnums(stream_, value);
}

void EnumsReader::ReadRecArrayImpl(yardl::DynamicNDArray<test_model::RecordWithEnums>& value) {
yardl::binary::ReadDynamicNDArray<test_model::RecordWithEnums, test_model::binary::ReadRecordWithEnums>(stream_, value);
}

void EnumsReader::CloseImpl() {
if (!skip_completed_check_) {
stream_.VerifyFinished();
Expand Down
8 changes: 8 additions & 0 deletions cpp/test/generated/binary/protocols.h
Original file line number Diff line number Diff line change
Expand Up @@ -831,6 +831,9 @@ class DynamicNDArraysWriter : public test_model::DynamicNDArraysWriterBase, yard
void WriteSimpleRecordArrayImpl(yardl::DynamicNDArray<test_model::SimpleRecord> const& value) override;
void WriteRecordWithVlensArrayImpl(yardl::DynamicNDArray<test_model::RecordWithVlens> const& value) override;
void WriteRecordWithDynamicNDArraysImpl(test_model::RecordWithDynamicNDArrays const& value) override;
void WriteRecWithFixedVectorsArrayImpl(yardl::DynamicNDArray<test_model::RecordWithFixedVectors> const& value) override;
void WriteRecWithOptionalFieldsArrayImpl(yardl::DynamicNDArray<test_model::RecordWithOptionalFields> const& value) override;
void WriteRecWithStringsArrayImpl(yardl::DynamicNDArray<test_model::RecordWithStrings> const& value) override;
void CloseImpl() override;

Version version_;
Expand All @@ -852,6 +855,9 @@ class DynamicNDArraysReader : public test_model::DynamicNDArraysReaderBase, yard
void ReadSimpleRecordArrayImpl(yardl::DynamicNDArray<test_model::SimpleRecord>& value) override;
void ReadRecordWithVlensArrayImpl(yardl::DynamicNDArray<test_model::RecordWithVlens>& value) override;
void ReadRecordWithDynamicNDArraysImpl(test_model::RecordWithDynamicNDArrays& value) override;
void ReadRecWithFixedVectorsArrayImpl(yardl::DynamicNDArray<test_model::RecordWithFixedVectors>& value) override;
void ReadRecWithOptionalFieldsArrayImpl(yardl::DynamicNDArray<test_model::RecordWithOptionalFields>& value) override;
void ReadRecWithStringsArrayImpl(yardl::DynamicNDArray<test_model::RecordWithStrings>& value) override;
void CloseImpl() override;

Version version_;
Expand Down Expand Up @@ -1098,6 +1104,7 @@ class EnumsWriter : public test_model::EnumsWriterBase, yardl::binary::BinaryWri
void WriteVecImpl(std::vector<test_model::Fruits> const& value) override;
void WriteSizeImpl(test_model::SizeBasedEnum const& value) override;
void WriteRecImpl(test_model::RecordWithEnums const& value) override;
void WriteRecArrayImpl(yardl::DynamicNDArray<test_model::RecordWithEnums> const& value) override;
void CloseImpl() override;

Version version_;
Expand All @@ -1119,6 +1126,7 @@ class EnumsReader : public test_model::EnumsReaderBase, yardl::binary::BinaryRea
void ReadVecImpl(std::vector<test_model::Fruits>& value) override;
void ReadSizeImpl(test_model::SizeBasedEnum& value) override;
void ReadRecImpl(test_model::RecordWithEnums& value) override;
void ReadRecArrayImpl(yardl::DynamicNDArray<test_model::RecordWithEnums>& value) override;
void CloseImpl() override;

Version version_;
Expand Down
32 changes: 32 additions & 0 deletions cpp/test/generated/hdf5/protocols.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2828,6 +2828,18 @@ void DynamicNDArraysWriter::WriteRecordWithDynamicNDArraysImpl(test_model::Recor
yardl::hdf5::WriteScalarDataset<test_model::hdf5::_Inner_RecordWithDynamicNDArrays, test_model::RecordWithDynamicNDArrays>(group_, "recordWithDynamicNDArrays", test_model::hdf5::GetRecordWithDynamicNDArraysHdf5Ddl(), value);
}

void DynamicNDArraysWriter::WriteRecWithFixedVectorsArrayImpl(yardl::DynamicNDArray<test_model::RecordWithFixedVectors> const& value) {
yardl::hdf5::WriteScalarDataset<yardl::hdf5::InnerDynamicNdArray<test_model::hdf5::_Inner_RecordWithFixedVectors, test_model::RecordWithFixedVectors>, yardl::DynamicNDArray<test_model::RecordWithFixedVectors>>(group_, "recWithFixedVectorsArray", yardl::hdf5::DynamicNDArrayDdl<test_model::hdf5::_Inner_RecordWithFixedVectors, test_model::RecordWithFixedVectors>(test_model::hdf5::GetRecordWithFixedVectorsHdf5Ddl()), value);
}

void DynamicNDArraysWriter::WriteRecWithOptionalFieldsArrayImpl(yardl::DynamicNDArray<test_model::RecordWithOptionalFields> const& value) {
yardl::hdf5::WriteScalarDataset<yardl::hdf5::InnerDynamicNdArray<test_model::hdf5::_Inner_RecordWithOptionalFields, test_model::RecordWithOptionalFields>, yardl::DynamicNDArray<test_model::RecordWithOptionalFields>>(group_, "recWithOptionalFieldsArray", yardl::hdf5::DynamicNDArrayDdl<test_model::hdf5::_Inner_RecordWithOptionalFields, test_model::RecordWithOptionalFields>(test_model::hdf5::GetRecordWithOptionalFieldsHdf5Ddl()), value);
}

void DynamicNDArraysWriter::WriteRecWithStringsArrayImpl(yardl::DynamicNDArray<test_model::RecordWithStrings> const& value) {
yardl::hdf5::WriteScalarDataset<yardl::hdf5::InnerDynamicNdArray<test_model::hdf5::_Inner_RecordWithStrings, test_model::RecordWithStrings>, yardl::DynamicNDArray<test_model::RecordWithStrings>>(group_, "recWithStringsArray", yardl::hdf5::DynamicNDArrayDdl<test_model::hdf5::_Inner_RecordWithStrings, test_model::RecordWithStrings>(test_model::hdf5::GetRecordWithStringsHdf5Ddl()), value);
}

DynamicNDArraysReader::DynamicNDArraysReader(std::string path, bool skip_completed_check)
: test_model::DynamicNDArraysReaderBase(skip_completed_check), yardl::hdf5::Hdf5Reader::Hdf5Reader(path, "DynamicNDArrays", schema_) {
}
Expand All @@ -2848,6 +2860,18 @@ void DynamicNDArraysReader::ReadRecordWithDynamicNDArraysImpl(test_model::Record
yardl::hdf5::ReadScalarDataset<test_model::hdf5::_Inner_RecordWithDynamicNDArrays, test_model::RecordWithDynamicNDArrays>(group_, "recordWithDynamicNDArrays", test_model::hdf5::GetRecordWithDynamicNDArraysHdf5Ddl(), value);
}

void DynamicNDArraysReader::ReadRecWithFixedVectorsArrayImpl(yardl::DynamicNDArray<test_model::RecordWithFixedVectors>& value) {
yardl::hdf5::ReadScalarDataset<yardl::hdf5::InnerDynamicNdArray<test_model::hdf5::_Inner_RecordWithFixedVectors, test_model::RecordWithFixedVectors>, yardl::DynamicNDArray<test_model::RecordWithFixedVectors>>(group_, "recWithFixedVectorsArray", yardl::hdf5::DynamicNDArrayDdl<test_model::hdf5::_Inner_RecordWithFixedVectors, test_model::RecordWithFixedVectors>(test_model::hdf5::GetRecordWithFixedVectorsHdf5Ddl()), value);
}

void DynamicNDArraysReader::ReadRecWithOptionalFieldsArrayImpl(yardl::DynamicNDArray<test_model::RecordWithOptionalFields>& value) {
yardl::hdf5::ReadScalarDataset<yardl::hdf5::InnerDynamicNdArray<test_model::hdf5::_Inner_RecordWithOptionalFields, test_model::RecordWithOptionalFields>, yardl::DynamicNDArray<test_model::RecordWithOptionalFields>>(group_, "recWithOptionalFieldsArray", yardl::hdf5::DynamicNDArrayDdl<test_model::hdf5::_Inner_RecordWithOptionalFields, test_model::RecordWithOptionalFields>(test_model::hdf5::GetRecordWithOptionalFieldsHdf5Ddl()), value);
}

void DynamicNDArraysReader::ReadRecWithStringsArrayImpl(yardl::DynamicNDArray<test_model::RecordWithStrings>& value) {
yardl::hdf5::ReadScalarDataset<yardl::hdf5::InnerDynamicNdArray<test_model::hdf5::_Inner_RecordWithStrings, test_model::RecordWithStrings>, yardl::DynamicNDArray<test_model::RecordWithStrings>>(group_, "recWithStringsArray", yardl::hdf5::DynamicNDArrayDdl<test_model::hdf5::_Inner_RecordWithStrings, test_model::RecordWithStrings>(test_model::hdf5::GetRecordWithStringsHdf5Ddl()), value);
}

MultiDArraysWriter::MultiDArraysWriter(std::string path)
: yardl::hdf5::Hdf5Writer::Hdf5Writer(path, "MultiDArrays", schema_) {
}
Expand Down Expand Up @@ -3304,6 +3328,10 @@ void EnumsWriter::WriteRecImpl(test_model::RecordWithEnums const& value) {
yardl::hdf5::WriteScalarDataset<test_model::RecordWithEnums, test_model::RecordWithEnums>(group_, "rec", test_model::hdf5::GetRecordWithEnumsHdf5Ddl(), value);
}

void EnumsWriter::WriteRecArrayImpl(yardl::DynamicNDArray<test_model::RecordWithEnums> const& value) {
yardl::hdf5::WriteScalarDataset<yardl::hdf5::InnerDynamicNdArray<test_model::RecordWithEnums, test_model::RecordWithEnums>, yardl::DynamicNDArray<test_model::RecordWithEnums>>(group_, "recArray", yardl::hdf5::DynamicNDArrayDdl<test_model::RecordWithEnums, test_model::RecordWithEnums>(test_model::hdf5::GetRecordWithEnumsHdf5Ddl()), value);
}

EnumsReader::EnumsReader(std::string path, bool skip_completed_check)
: test_model::EnumsReaderBase(skip_completed_check), yardl::hdf5::Hdf5Reader::Hdf5Reader(path, "Enums", schema_) {
}
Expand All @@ -3324,6 +3352,10 @@ void EnumsReader::ReadRecImpl(test_model::RecordWithEnums& value) {
yardl::hdf5::ReadScalarDataset<test_model::RecordWithEnums, test_model::RecordWithEnums>(group_, "rec", test_model::hdf5::GetRecordWithEnumsHdf5Ddl(), value);
}

void EnumsReader::ReadRecArrayImpl(yardl::DynamicNDArray<test_model::RecordWithEnums>& value) {
yardl::hdf5::ReadScalarDataset<yardl::hdf5::InnerDynamicNdArray<test_model::RecordWithEnums, test_model::RecordWithEnums>, yardl::DynamicNDArray<test_model::RecordWithEnums>>(group_, "recArray", yardl::hdf5::DynamicNDArrayDdl<test_model::RecordWithEnums, test_model::RecordWithEnums>(test_model::hdf5::GetRecordWithEnumsHdf5Ddl()), value);
}

FlagsWriter::FlagsWriter(std::string path)
: yardl::hdf5::Hdf5Writer::Hdf5Writer(path, "Flags", schema_) {
}
Expand Down
16 changes: 16 additions & 0 deletions cpp/test/generated/hdf5/protocols.h
Original file line number Diff line number Diff line change
Expand Up @@ -639,6 +639,12 @@ class DynamicNDArraysWriter : public test_model::DynamicNDArraysWriterBase, publ

void WriteRecordWithDynamicNDArraysImpl(test_model::RecordWithDynamicNDArrays const& value) override;

void WriteRecWithFixedVectorsArrayImpl(yardl::DynamicNDArray<test_model::RecordWithFixedVectors> const& value) override;

void WriteRecWithOptionalFieldsArrayImpl(yardl::DynamicNDArray<test_model::RecordWithOptionalFields> const& value) override;

void WriteRecWithStringsArrayImpl(yardl::DynamicNDArray<test_model::RecordWithStrings> const& value) override;

private:
};

Expand All @@ -655,6 +661,12 @@ class DynamicNDArraysReader : public test_model::DynamicNDArraysReaderBase, publ

void ReadRecordWithDynamicNDArraysImpl(test_model::RecordWithDynamicNDArrays& value) override;

void ReadRecWithFixedVectorsArrayImpl(yardl::DynamicNDArray<test_model::RecordWithFixedVectors>& value) override;

void ReadRecWithOptionalFieldsArrayImpl(yardl::DynamicNDArray<test_model::RecordWithOptionalFields>& value) override;

void ReadRecWithStringsArrayImpl(yardl::DynamicNDArray<test_model::RecordWithStrings>& value) override;

private:
};

Expand Down Expand Up @@ -856,6 +868,8 @@ class EnumsWriter : public test_model::EnumsWriterBase, public yardl::hdf5::Hdf5

void WriteRecImpl(test_model::RecordWithEnums const& value) override;

void WriteRecArrayImpl(yardl::DynamicNDArray<test_model::RecordWithEnums> const& value) override;

private:
};

Expand All @@ -872,6 +886,8 @@ class EnumsReader : public test_model::EnumsReaderBase, public yardl::hdf5::Hdf5

void ReadRecImpl(test_model::RecordWithEnums& value) override;

void ReadRecArrayImpl(yardl::DynamicNDArray<test_model::RecordWithEnums>& value) override;

private:
};

Expand Down
96 changes: 96 additions & 0 deletions cpp/test/generated/mocks.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2248,6 +2248,54 @@ class MockDynamicNDArraysWriter : public DynamicNDArraysWriterBase {
WriteRecordWithDynamicNDArraysImpl_expected_values_.push(value);
}

void WriteRecWithFixedVectorsArrayImpl (yardl::DynamicNDArray<test_model::RecordWithFixedVectors> const& value) override {
if (WriteRecWithFixedVectorsArrayImpl_expected_values_.empty()) {
throw std::runtime_error("Unexpected call to WriteRecWithFixedVectorsArrayImpl");
}
if (WriteRecWithFixedVectorsArrayImpl_expected_values_.front() != value) {
throw std::runtime_error("Unexpected argument value for call to WriteRecWithFixedVectorsArrayImpl");
}
WriteRecWithFixedVectorsArrayImpl_expected_values_.pop();
}

std::queue<yardl::DynamicNDArray<test_model::RecordWithFixedVectors>> WriteRecWithFixedVectorsArrayImpl_expected_values_;

void ExpectWriteRecWithFixedVectorsArrayImpl (yardl::DynamicNDArray<test_model::RecordWithFixedVectors> const& value) {
WriteRecWithFixedVectorsArrayImpl_expected_values_.push(value);
}

void WriteRecWithOptionalFieldsArrayImpl (yardl::DynamicNDArray<test_model::RecordWithOptionalFields> const& value) override {
if (WriteRecWithOptionalFieldsArrayImpl_expected_values_.empty()) {
throw std::runtime_error("Unexpected call to WriteRecWithOptionalFieldsArrayImpl");
}
if (WriteRecWithOptionalFieldsArrayImpl_expected_values_.front() != value) {
throw std::runtime_error("Unexpected argument value for call to WriteRecWithOptionalFieldsArrayImpl");
}
WriteRecWithOptionalFieldsArrayImpl_expected_values_.pop();
}

std::queue<yardl::DynamicNDArray<test_model::RecordWithOptionalFields>> WriteRecWithOptionalFieldsArrayImpl_expected_values_;

void ExpectWriteRecWithOptionalFieldsArrayImpl (yardl::DynamicNDArray<test_model::RecordWithOptionalFields> const& value) {
WriteRecWithOptionalFieldsArrayImpl_expected_values_.push(value);
}

void WriteRecWithStringsArrayImpl (yardl::DynamicNDArray<test_model::RecordWithStrings> const& value) override {
if (WriteRecWithStringsArrayImpl_expected_values_.empty()) {
throw std::runtime_error("Unexpected call to WriteRecWithStringsArrayImpl");
}
if (WriteRecWithStringsArrayImpl_expected_values_.front() != value) {
throw std::runtime_error("Unexpected argument value for call to WriteRecWithStringsArrayImpl");
}
WriteRecWithStringsArrayImpl_expected_values_.pop();
}

std::queue<yardl::DynamicNDArray<test_model::RecordWithStrings>> WriteRecWithStringsArrayImpl_expected_values_;

void ExpectWriteRecWithStringsArrayImpl (yardl::DynamicNDArray<test_model::RecordWithStrings> const& value) {
WriteRecWithStringsArrayImpl_expected_values_.push(value);
}

void Verify() {
if (!WriteIntsImpl_expected_values_.empty()) {
throw std::runtime_error("Expected call to WriteIntsImpl was not received");
Expand All @@ -2261,6 +2309,15 @@ class MockDynamicNDArraysWriter : public DynamicNDArraysWriterBase {
if (!WriteRecordWithDynamicNDArraysImpl_expected_values_.empty()) {
throw std::runtime_error("Expected call to WriteRecordWithDynamicNDArraysImpl was not received");
}
if (!WriteRecWithFixedVectorsArrayImpl_expected_values_.empty()) {
throw std::runtime_error("Expected call to WriteRecWithFixedVectorsArrayImpl was not received");
}
if (!WriteRecWithOptionalFieldsArrayImpl_expected_values_.empty()) {
throw std::runtime_error("Expected call to WriteRecWithOptionalFieldsArrayImpl was not received");
}
if (!WriteRecWithStringsArrayImpl_expected_values_.empty()) {
throw std::runtime_error("Expected call to WriteRecWithStringsArrayImpl was not received");
}
}
};

Expand Down Expand Up @@ -2296,6 +2353,21 @@ class TestDynamicNDArraysWriterBase : public DynamicNDArraysWriterBase {
mock_writer_.ExpectWriteRecordWithDynamicNDArraysImpl(value);
}

void WriteRecWithFixedVectorsArrayImpl(yardl::DynamicNDArray<test_model::RecordWithFixedVectors> const& value) override {
writer_->WriteRecWithFixedVectorsArray(value);
mock_writer_.ExpectWriteRecWithFixedVectorsArrayImpl(value);
}

void WriteRecWithOptionalFieldsArrayImpl(yardl::DynamicNDArray<test_model::RecordWithOptionalFields> const& value) override {
writer_->WriteRecWithOptionalFieldsArray(value);
mock_writer_.ExpectWriteRecWithOptionalFieldsArrayImpl(value);
}

void WriteRecWithStringsArrayImpl(yardl::DynamicNDArray<test_model::RecordWithStrings> const& value) override {
writer_->WriteRecWithStringsArray(value);
mock_writer_.ExpectWriteRecWithStringsArrayImpl(value);
}

void CloseImpl() override {
close_called_ = true;
writer_->Close();
Expand Down Expand Up @@ -3085,6 +3157,22 @@ class MockEnumsWriter : public EnumsWriterBase {
WriteRecImpl_expected_values_.push(value);
}

void WriteRecArrayImpl (yardl::DynamicNDArray<test_model::RecordWithEnums> const& value) override {
if (WriteRecArrayImpl_expected_values_.empty()) {
throw std::runtime_error("Unexpected call to WriteRecArrayImpl");
}
if (WriteRecArrayImpl_expected_values_.front() != value) {
throw std::runtime_error("Unexpected argument value for call to WriteRecArrayImpl");
}
WriteRecArrayImpl_expected_values_.pop();
}

std::queue<yardl::DynamicNDArray<test_model::RecordWithEnums>> WriteRecArrayImpl_expected_values_;

void ExpectWriteRecArrayImpl (yardl::DynamicNDArray<test_model::RecordWithEnums> const& value) {
WriteRecArrayImpl_expected_values_.push(value);
}

void Verify() {
if (!WriteSingleImpl_expected_values_.empty()) {
throw std::runtime_error("Expected call to WriteSingleImpl was not received");
Expand All @@ -3098,6 +3186,9 @@ class MockEnumsWriter : public EnumsWriterBase {
if (!WriteRecImpl_expected_values_.empty()) {
throw std::runtime_error("Expected call to WriteRecImpl was not received");
}
if (!WriteRecArrayImpl_expected_values_.empty()) {
throw std::runtime_error("Expected call to WriteRecArrayImpl was not received");
}
}
};

Expand Down Expand Up @@ -3133,6 +3224,11 @@ class TestEnumsWriterBase : public EnumsWriterBase {
mock_writer_.ExpectWriteRecImpl(value);
}

void WriteRecArrayImpl(yardl::DynamicNDArray<test_model::RecordWithEnums> const& value) override {
writer_->WriteRecArray(value);
mock_writer_.ExpectWriteRecArrayImpl(value);
}

void CloseImpl() override {
close_called_ = true;
writer_->Close();
Expand Down
Loading