@@ -0,0 +1,68 @@
Loading
1 +
/*
2 +
* Copyright (C) 2007-2021 German Aerospace Center (DLR/SC)
3 +
*
4 +
* Created: 2021-02-05 Jan Kleinert <Jan.Kleinert@dlr.de>
5 +
*
6 +
* Licensed under the Apache License, Version 2.0 (the "License");
7 +
* you may not use this file except in compliance with the License.
8 +
* You may obtain a copy of the License at
9 +
*
10 +
*     http://www.apache.org/licenses/LICENSE-2.0
11 +
*
12 +
* Unless required by applicable law or agreed to in writing, software
13 +
* distributed under the License is distributed on an "AS IS" BASIS,
14 +
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 +
* See the License for the specific language governing permissions and
16 +
* limitations under the License.
17 +
*/
18 +
/**
19 +
* @file
20 +
* @brief  Implementation of CPACS trailing edge devices
21 +
*/
22 +
23 +
#include "CTiglError.h"
24 +
#include "CCPACSTrailingEdgeDevice.h"
25 +
#include "CCPACSTrailingEdgeDevices.h"
26 +
27 +
namespace tigl {
28 +
29 +
CCPACSTrailingEdgeDevices::CCPACSTrailingEdgeDevices(CCPACSControlSurfaces* parent, CTiglUIDManager* uidMgr)
30 +
    : generated::CPACSTrailingEdgeDevices(parent, uidMgr) {}
31 +
32 +
// Returns the total count of trailing edge devices in a configuration
33 +
int CCPACSTrailingEdgeDevices::GetTrailingEdgeDeviceCount() const
34 +
{
35 +
    return static_cast<int>(m_trailingEdgeDevices.size());
36 +
}
37 +
38 +
// Returns the trailing edge device for a given index.
39 +
CCPACSTrailingEdgeDevice& CCPACSTrailingEdgeDevices::GetTrailingEdgeDevice(int index) const
40 +
{
41 +
    index --;
42 +
    if (index < 0 || index >= GetTrailingEdgeDeviceCount()) {
43 +
        throw CTiglError("Invalid index in CCPACSTrailingEdgeDevices::GetTrailingEdgeDevice", TIGL_INDEX_ERROR);
44 +
    }
45 +
    return *m_trailingEdgeDevices[index];
46 +
}
47 +
48 +
// Returns the trailing edge device for a given UID.
49 +
CCPACSTrailingEdgeDevice& CCPACSTrailingEdgeDevices::GetTrailingEdgeDevice(const std::string& UID) const
50 +
{
51 +
    return *m_trailingEdgeDevices[GetTrailingEdgeDeviceIndex(UID)-1];
52 +
}
53 +
54 +
// Returns the trailing edge device index for a given UID.
55 +
int CCPACSTrailingEdgeDevices::GetTrailingEdgeDeviceIndex(const std::string& UID) const
56 +
{
57 +
    for (int i=0; i < GetTrailingEdgeDeviceCount(); i++) {
58 +
        const std::string tmpUID(m_trailingEdgeDevices[i]->GetUID());
59 +
        if (tmpUID == UID) {
60 +
            return i+1;
61 +
        }
62 +
    }
63 +
64 +
    // UID not there
65 +
    throw CTiglError("Invalid UID in CCPACSTrailingEdgeDevices::GetTrailingEdgeDeviceIndex", TIGL_UID_ERROR);
66 +
}
67 +
68 +
} // namespace tigl

@@ -0,0 +1,50 @@
Loading
1 +
/*
2 +
* Copyright (C) 2007-2021 German Aerospace Center (DLR/SC)
3 +
*
4 +
* Created: 2021-02-05 Jan Kleinert <Jan.Kleinert@dlr.de>
5 +
*
6 +
* Licensed under the Apache License, Version 2.0 (the "License");
7 +
* you may not use this file except in compliance with the License.
8 +
* You may obtain a copy of the License at
9 +
*
10 +
*     http://www.apache.org/licenses/LICENSE-2.0
11 +
*
12 +
* Unless required by applicable law or agreed to in writing, software
13 +
* distributed under the License is distributed on an "AS IS" BASIS,
14 +
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 +
* See the License for the specific language governing permissions and
16 +
* limitations under the License.
17 +
*/
18 +
/**
19 +
* @file
20 +
* @brief  Implementation of CPACS trailing edge devices
21 +
*/
22 +
23 +
#ifndef CCPACSTRAILINGEDGEDEVICES_H
24 +
#define CCPACSTRAILINGEDGEDEVICES_H
25 +
26 +
#include "generated/CPACSTrailingEdgeDevices.h"
27 +
28 +
namespace tigl {
29 +
30 +
class CCPACSTrailingEdgeDevices : public generated::CPACSTrailingEdgeDevices
31 +
{
32 +
public:
33 +
    TIGL_EXPORT CCPACSTrailingEdgeDevices(CCPACSControlSurfaces* parent, CTiglUIDManager* uidMgr);
34 +
35 +
    // Returns the total count of trailing edge devices in a configuration
36 +
    TIGL_EXPORT int GetTrailingEdgeDeviceCount() const;
37 +
38 +
    // Returns the trailing edge device for a given index.
39 +
    TIGL_EXPORT CCPACSTrailingEdgeDevice& GetTrailingEdgeDevice(int index) const;
40 +
41 +
    // Returns the trailing edge device for a given UID.
42 +
    TIGL_EXPORT CCPACSTrailingEdgeDevice& GetTrailingEdgeDevice(const std::string& UID) const;
43 +
44 +
    // Returns the trailing edge device index for a given UID.
45 +
    TIGL_EXPORT int GetTrailingEdgeDeviceIndex(const std::string& UID) const;
46 +
};
47 +
48 +
} // namespace tigl
49 +
50 +
#endif
Files Coverage
src 69.70%
Project Totals (428 files) 69.70%
1
codecov:
2
  require_ci_to_pass: yes
3

4
coverage:
5
  precision: 2
6
  round: down
7
  range: "25...100"
8

9
parsers:
10
  gcov:
11
    branch_detection:
12
      conditional: yes
13
      loop: yes
14
      method: no
15
      macro: no
16

17
comment:
18
  layout: "reach,diff,flags,tree"
19
  behavior: default
20
  require_changes: no
Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading