Skip to content

Commit

Permalink
remove header guards, only use pragma once
Browse files Browse the repository at this point in the history
Signed-off-by: Martijn Govers <[email protected]>
  • Loading branch information
mgovers committed Feb 26, 2024
1 parent 7474166 commit f6eff94
Show file tree
Hide file tree
Showing 77 changed files with 0 additions and 296 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@

// clang-format off
#pragma once
#ifndef POWER_GRID_MODEL_AUXILIARY_{{ include_guard }}_HPP
#define POWER_GRID_MODEL_AUXILIARY_{{ include_guard }}_HPP

#include "meta_data.hpp"

Expand Down Expand Up @@ -41,5 +39,4 @@ using Asym{{ attribute_class.name }} = {{ attribute_class.name }}<false>;

} // namespace power_grid_model

#endif
// clang-format on
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@

// clang-format off
#pragma once
#ifndef POWER_GRID_MODEL_AUXILIARY_META_GEN_{{ include_guard }}_HPP
#define POWER_GRID_MODEL_AUXILIARY_META_GEN_{{ include_guard }}_HPP

#include "gen_getters.hpp" // NOLINT

Expand Down Expand Up @@ -67,5 +65,4 @@ struct get_component_nan<{{ attribute_class.name }}> {

} // namespace power_grid_model::meta_data

#endif
// clang-format on
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@

// clang-format off
#pragma once
#ifndef POWER_GRID_MODEL_AUXILIARY_STATIC_ASSERTS_{{ include_guard }}_HPP
#define POWER_GRID_MODEL_AUXILIARY_STATIC_ASSERTS_{{ include_guard }}_HPP

#include "../{{ name }}.hpp" // NOLINT

Expand Down Expand Up @@ -35,5 +33,4 @@ static_assert(offsetof({{ specification }}, {{ attribute.names }}) == offsetof({

} // namespace power_grid_model::test

#endif
// clang-format on
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
// SPDX-License-Identifier: MPL-2.0

#pragma once
#ifndef POWER_GRID_MODEL_ALL_COMPONENTS_HPP
#define POWER_GRID_MODEL_ALL_COMPONENTS_HPP

// define all components
#include "common/common.hpp"
Expand All @@ -31,5 +29,3 @@ using AllComponents =
SymLoad, AsymLoad, SymPowerSensor, AsymPowerSensor, SymVoltageSensor, AsymVoltageSensor, Fault>;

} // namespace power_grid_model

#endif // POWER_GRID_MODEL_ALL_COMPONENTS_HPP
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
// SPDX-License-Identifier: MPL-2.0

#pragma once
#ifndef POWER_GRID_MODEL_AUXILIARY_DATASET_HPP
#define POWER_GRID_MODEL_AUXILIARY_DATASET_HPP

// define dataset classes with void pointers

Expand Down Expand Up @@ -107,5 +105,3 @@ using Dataset = std::map<std::string, MutableDataPointer>;
using ConstDataset = std::map<std::string, ConstDataPointer>;

} // namespace power_grid_model

#endif
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
// SPDX-License-Identifier: MPL-2.0

#pragma once
#ifndef POWER_GRID_MODEL_AUXILIARY_DATASET_HANDLER_HPP
#define POWER_GRID_MODEL_AUXILIARY_DATASET_HANDLER_HPP

// handle dataset and buffer related stuff

Expand Down Expand Up @@ -202,5 +200,3 @@ using MutableDatasetHandler = DatasetHandler<true, false>;
using WritableDatasetHandler = DatasetHandler<true, true>;

} // namespace power_grid_model::meta_data

#endif
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@

// clang-format off
#pragma once
#ifndef POWER_GRID_MODEL_AUXILIARY_INPUT_HPP
#define POWER_GRID_MODEL_AUXILIARY_INPUT_HPP

#include "meta_data.hpp"

Expand Down Expand Up @@ -392,5 +390,4 @@ struct FaultInput {

} // namespace power_grid_model

#endif
// clang-format on
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
// SPDX-License-Identifier: MPL-2.0

#pragma once
#ifndef POWER_GRID_MODEL_META_DATA_HPP
#define POWER_GRID_MODEL_META_DATA_HPP

#include "../common/common.hpp"
#include "../common/enum.hpp"
Expand Down Expand Up @@ -191,5 +189,3 @@ struct MetaData {
constexpr bool is_little_endian() { return std::endian::native == std::endian::little; }

} // namespace power_grid_model::meta_data

#endif
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
// SPDX-License-Identifier: MPL-2.0

#pragma once
#ifndef POWER_GRID_MODEL_META_DATA_GEN_HPP
#define POWER_GRID_MODEL_META_DATA_GEN_HPP

#include "input.hpp"
#include "meta_data.hpp"
Expand Down Expand Up @@ -58,5 +56,3 @@ constexpr MetaData meta_data = get_meta_data<AllComponents, // all components li
constexpr MetaData meta_data = meta_data_gen::meta_data;

} // namespace power_grid_model::meta_data

#endif
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
// SPDX-License-Identifier: MPL-2.0

#pragma once
#ifndef POWER_GRID_MODEL_AUXILIARY_META_GEN_GEN_GETTERS_HPP
#define POWER_GRID_MODEL_AUXILIARY_META_GEN_GEN_GETTERS_HPP

#include "../../common/component_list.hpp"
#include "../../common/counting_iterator.hpp"
Expand Down Expand Up @@ -98,5 +96,3 @@ struct get_meta_data<comp_list, dataset_mark<dataset_name_getter, struct_getter>
};

} // namespace power_grid_model::meta_data::meta_data_gen

#endif
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@

// clang-format off
#pragma once
#ifndef POWER_GRID_MODEL_AUXILIARY_META_GEN_INPUT_HPP
#define POWER_GRID_MODEL_AUXILIARY_META_GEN_INPUT_HPP

#include "gen_getters.hpp" // NOLINT

Expand Down Expand Up @@ -713,5 +711,4 @@ struct get_component_nan<FaultInput> {

} // namespace power_grid_model::meta_data

#endif
// clang-format on
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@

// clang-format off
#pragma once
#ifndef POWER_GRID_MODEL_AUXILIARY_META_GEN_OUTPUT_HPP
#define POWER_GRID_MODEL_AUXILIARY_META_GEN_OUTPUT_HPP

#include "gen_getters.hpp" // NOLINT

Expand Down Expand Up @@ -445,5 +443,4 @@ struct get_component_nan<SensorShortCircuitOutput> {

} // namespace power_grid_model::meta_data

#endif
// clang-format on
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@

// clang-format off
#pragma once
#ifndef POWER_GRID_MODEL_AUXILIARY_META_GEN_UPDATE_HPP
#define POWER_GRID_MODEL_AUXILIARY_META_GEN_UPDATE_HPP

#include "gen_getters.hpp" // NOLINT

Expand Down Expand Up @@ -347,5 +345,4 @@ struct get_component_nan<FaultUpdate> {

} // namespace power_grid_model::meta_data

#endif
// clang-format on
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@

// clang-format off
#pragma once
#ifndef POWER_GRID_MODEL_AUXILIARY_OUTPUT_HPP
#define POWER_GRID_MODEL_AUXILIARY_OUTPUT_HPP

#include "meta_data.hpp"

Expand Down Expand Up @@ -220,5 +218,4 @@ struct SensorShortCircuitOutput {

} // namespace power_grid_model

#endif
// clang-format on
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
// SPDX-License-Identifier: MPL-2.0

#pragma once
#ifndef POWER_GRID_MODEL_AUXILIARY_SERIALIZTION_DESERIALIZER_HPP
#define POWER_GRID_MODEL_AUXILIARY_SERIALIZTION_DESERIALIZER_HPP

#include "../../common/common.hpp"
#include "../../common/exception.hpp"
Expand Down Expand Up @@ -844,5 +842,3 @@ class Deserializer {
};

} // namespace power_grid_model::meta_data

#endif
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
// SPDX-License-Identifier: MPL-2.0

#pragma once
#ifndef POWER_GRID_MODEL_AUXILIARY_SERIALIZTION_SERIALIZER_HPP
#define POWER_GRID_MODEL_AUXILIARY_SERIALIZTION_SERIALIZER_HPP

#include "../../common/common.hpp"
#include "../../common/exception.hpp"
Expand Down Expand Up @@ -510,5 +508,3 @@ class Serializer {
};

} // namespace power_grid_model::meta_data

#endif
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@

// clang-format off
#pragma once
#ifndef POWER_GRID_MODEL_AUXILIARY_STATIC_ASSERTS_INPUT_HPP
#define POWER_GRID_MODEL_AUXILIARY_STATIC_ASSERTS_INPUT_HPP

#include "../input.hpp" // NOLINT

Expand Down Expand Up @@ -482,5 +480,4 @@ static_assert(offsetof(FaultInput, id) == offsetof(BaseInput, id));

} // namespace power_grid_model::test

#endif
// clang-format on
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@

// clang-format off
#pragma once
#ifndef POWER_GRID_MODEL_AUXILIARY_STATIC_ASSERTS_OUTPUT_HPP
#define POWER_GRID_MODEL_AUXILIARY_STATIC_ASSERTS_OUTPUT_HPP

#include "../output.hpp" // NOLINT

Expand Down Expand Up @@ -283,5 +281,4 @@ static_assert(offsetof(SensorShortCircuitOutput, energized) == offsetof(BaseOutp

} // namespace power_grid_model::test

#endif
// clang-format on
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@

// clang-format off
#pragma once
#ifndef POWER_GRID_MODEL_AUXILIARY_STATIC_ASSERTS_UPDATE_HPP
#define POWER_GRID_MODEL_AUXILIARY_STATIC_ASSERTS_UPDATE_HPP

#include "../update.hpp" // NOLINT

Expand Down Expand Up @@ -207,5 +205,4 @@ static_assert(offsetof(FaultUpdate, id) == offsetof(BaseUpdate, id));

} // namespace power_grid_model::test

#endif
// clang-format on
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@

// clang-format off
#pragma once
#ifndef POWER_GRID_MODEL_AUXILIARY_UPDATE_HPP
#define POWER_GRID_MODEL_AUXILIARY_UPDATE_HPP

#include "meta_data.hpp"

Expand Down Expand Up @@ -183,5 +181,4 @@ struct FaultUpdate {

} // namespace power_grid_model

#endif
// clang-format on
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,10 @@
// SPDX-License-Identifier: MPL-2.0

#pragma once
#ifndef POWER_GRID_MODEL_BATCH_PARAMETER_HPP
#define POWER_GRID_MODEL_BATCH_PARAMETER_HPP

namespace power_grid_model {

// batch parameter
struct BatchParameter {};

} // namespace power_grid_model

#endif
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
// SPDX-License-Identifier: MPL-2.0

#pragma once
#ifndef POWER_GRID_MODEL_CALCULATION_PARAMETERS_HPP
#define POWER_GRID_MODEL_CALCULATION_PARAMETERS_HPP

#include "common/common.hpp"
#include "common/enum.hpp"
Expand Down Expand Up @@ -367,5 +365,3 @@ struct UpdateChange {
};

} // namespace power_grid_model

#endif
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
// SPDX-License-Identifier: MPL-2.0

#pragma once
#ifndef POWER_GRID_MODEL_COMMON_CALCULATION_INFO_HPP
#define POWER_GRID_MODEL_COMMON_CALCULATION_INFO_HPP

#include <cstddef>
#include <functional>
Expand All @@ -30,5 +28,3 @@ using CalculationInfo = std::map<std::string, double, std::less<>>;
#endif

} // namespace power_grid_model

#endif
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
// SPDX-License-Identifier: MPL-2.0

#pragma once
#ifndef POWER_GRID_MODEL_COMMON_COMMON_HPP
#define POWER_GRID_MODEL_COMMON_COMMON_HPP

#include <complex>
#include <cstddef>
Expand Down Expand Up @@ -71,5 +69,3 @@ using ComplexVector = std::vector<std::complex<double>>;
using IntSVector = std::vector<IntS>;

} // namespace power_grid_model

#endif
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,10 @@
// SPDX-License-Identifier: MPL-2.0

#pragma once
#ifndef POWER_GRID_MODEL_COMMON_COMPONENT_LIST_HPP
#define POWER_GRID_MODEL_COMMON_COMPONENT_LIST_HPP

namespace power_grid_model {

// component list
template <class... T> struct ComponentList {};

} // namespace power_grid_model

#endif
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
// SPDX-License-Identifier: MPL-2.0

#pragma once
#ifndef POWER_GRID_MODEL_COMMON_COUNTING_ITERATOR_HPP
#define POWER_GRID_MODEL_COMMON_COUNTING_ITERATOR_HPP

#include "common.hpp"

Expand All @@ -16,5 +14,3 @@ namespace power_grid_model {
using IdxCount = boost::counting_iterator<Idx>;

} // namespace power_grid_model

#endif
Loading

0 comments on commit f6eff94

Please sign in to comment.