Directory: | ./ |
---|---|
File: | pdserv/src/Variable.cpp |
Date: | 2025-08-17 04:10:43 |
Exec | Total | Coverage | |
---|---|---|---|
Lines: | 6 | 6 | 100.0% |
Branches: | 5 | 6 | 83.3% |
Line | Branch | Exec | Source |
---|---|---|---|
1 | /***************************************************************************** | ||
2 | * | ||
3 | * Copyright 2010 Richard Hacker (lerichi at gmx dot net) | ||
4 | * | ||
5 | * This file is part of the pdserv library. | ||
6 | * | ||
7 | * The pdserv library is free software: you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU Lesser General Public License as published | ||
9 | * by the Free Software Foundation, either version 3 of the License, or (at | ||
10 | * your option) any later version. | ||
11 | * | ||
12 | * The pdserv library is distributed in the hope that it will be useful, but | ||
13 | * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY | ||
14 | * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public | ||
15 | * License for more details. | ||
16 | * | ||
17 | * You should have received a copy of the GNU Lesser General Public License | ||
18 | * along with the pdserv library. If not, see <http://www.gnu.org/licenses/>. | ||
19 | * | ||
20 | ****************************************************************************/ | ||
21 | |||
22 | #include "Variable.h" | ||
23 | |||
24 | #include <stdint.h> | ||
25 | |||
26 | using namespace PdServ; | ||
27 | |||
28 | ////////////////////////////////////////////////////////////////////// | ||
29 | 3116 | Variable::Variable( | |
30 | const std::string& path, | ||
31 | const DataType& dtype, | ||
32 | size_t ndims, | ||
33 | 3116 | const size_t *dim): | |
34 | path(path), | ||
35 | dtype(dtype), | ||
36 | dim(dim ? ndims : 1, dim ? dim : &ndims), | ||
37 |
5/6✓ Branch 8 taken 2959 times.
✓ Branch 9 taken 157 times.
✓ Branch 10 taken 157 times.
✓ Branch 11 taken 2959 times.
✓ Branch 13 taken 3116 times.
✗ Branch 14 not taken.
|
3116 | memSize(this->dim.nelem * dtype.size) |
38 | { | ||
39 | 3116 | } | |
40 | |||
41 | ////////////////////////////////////////////////////////////////////// | ||
42 | 3116 | Variable::~Variable() | |
43 | { | ||
44 | 3116 | } | |
45 |