GCC Code Coverage Report


Directory: libimgdoc2/
File: libimgdoc2/inc/IDocWrite3d.h
Date: 2025-02-03 12:41:04
Exec Total Coverage
Lines: 2 2 100.0%
Functions: 2 2 100.0%
Branches: 0 0 -%

Line Branch Exec Source
1 // SPDX-FileCopyrightText: 2023 Carl Zeiss Microscopy GmbH
2 //
3 // SPDX-License-Identifier: MIT
4
5 #pragma once
6
7 #include "BrickBaseInfo.h"
8 #include "DataTypes.h"
9 #include "IDataObj.h"
10 #include "IDatabaseTransaction.h"
11
12 namespace imgdoc2
13 {
14 /// This interface is providing write access to a 3D-document.
15 class IDocWrite3d : public imgdoc2::IDatabaseTransaction
16 {
17 public:
18 /// Adds a brick to the document, and if successful, return its primary key.
19 /// \param coordinate The coordinate.
20 /// \param logical_position_3d_info The logical position information.
21 /// \param brick_base_info Information describing the brick.
22 /// \param data_type The datatype.
23 /// \param storage_type Type of the storage.
24 /// \param data The data.
25 /// \returns If successful, the primary key of the newly added tile.
26 virtual imgdoc2::dbIndex AddBrick(
27 const imgdoc2::ITileCoordinate* coordinate,
28 const imgdoc2::LogicalPositionInfo3D* logical_position_3d_info,
29 const imgdoc2::BrickBaseInfo* brick_base_info,
30 imgdoc2::DataTypes data_type,
31 imgdoc2::TileDataStorageType storage_type,
32 const imgdoc2::IDataObjBase* data) = 0;
33
34 128 ~IDocWrite3d() override = default;
35 public:
36 // no copy and no move (-> https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#c21-if-you-define-or-delete-any-copy-move-or-destructor-function-define-or-delete-them-all )
37 64 IDocWrite3d() = default;
38 IDocWrite3d(const IDocWrite3d&) = delete; // copy constructor
39 IDocWrite3d& operator=(const IDocWrite3d&) = delete; // copy assignment
40 IDocWrite3d(IDocWrite3d&&) = delete; // move constructor
41 IDocWrite3d& operator=(IDocWrite3d&&) = delete; // move assignment
42 };
43 }
44