GCC Code Coverage Report


Directory: libimgdoc2/
File: libimgdoc2/inc/IDocWrite2d.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 "TileBaseInfo.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 2D-document.
15 class IDocWrite2d : public imgdoc2::IDatabaseTransaction
16 {
17 public:
18 /// Adds a tile to the document, and if successful, return its primary key.
19 /// \param coord The coordinate.
20 /// \param info The logical position information.
21 /// \param tileInfo Information describing the tile.
22 /// \param datatype 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 AddTile(
27 const imgdoc2::ITileCoordinate* coord,
28 const imgdoc2::LogicalPositionInfo* info,
29 const imgdoc2::TileBaseInfo* tileInfo,
30 imgdoc2::DataTypes datatype,
31 imgdoc2::TileDataStorageType storage_type,
32 const imgdoc2::IDataObjBase* data) = 0;
33
34 136 ~IDocWrite2d() 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 68 IDocWrite2d() = default;
38 IDocWrite2d(const IDocWrite2d&) = delete; // copy constructor
39 IDocWrite2d& operator=(const IDocWrite2d&) = delete; // copy assignment
40 IDocWrite2d(IDocWrite2d&&) = delete; // move constructor
41 IDocWrite2d& operator=(IDocWrite2d&&) = delete; // move assignment
42 };
43 }
44