-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #20 from PowerGridModel/feature/homogenize
Refactor: homogenize code surrounding VNF converter
- Loading branch information
Showing
14 changed files
with
80 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
...e_c/power_grid_model_io_native_c/include/power_grid_model_io_native_c/pgm_vnf_converter.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
// SPDX-FileCopyrightText: Contributors to the Power Grid Model project <[email protected]> | ||
// | ||
// SPDX-License-Identifier: MPL-2.0 | ||
|
||
#pragma once | ||
#ifndef POWER_GRID_MODEL_IO_NATIVE_C_PGM_VNF_CONVERTER_H | ||
#define POWER_GRID_MODEL_IO_NATIVE_C_PGM_VNF_CONVERTER_H | ||
|
||
#include "basics.h" | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
/** | ||
* @brief Create the PGM_IO_PgmVnfConverter | ||
* @param handle | ||
* @param file_buffer A pointer to the null-terminated C string. | ||
* @return The pointer to a PGM_IO_PgmVnfConverter instance. The instance must be freed by | ||
* PGM_IO_destroy_vnf_converter. | ||
*/ | ||
PGM_IO_API PGM_IO_PgmVnfConverter* PGM_IO_create_pgm_vnf_converter(PGM_IO_Handle* handle, char const* file_buffer, | ||
PGM_IO_ExperimentalFeatures experimental_features); | ||
|
||
/** | ||
* @brief Retrieve the transformed input data from .vnf format to PGM format. | ||
* @param handle | ||
* @param converter_ptr A pointer to a PGM_IO_PgmVnfConverter instace. | ||
* @return The pointer to the json string instance that holds data in PGM format. | ||
*/ | ||
PGM_IO_API char const* PGM_IO_pgm_vnf_converter_get_input_data(PGM_IO_Handle* handle, | ||
PGM_IO_PgmVnfConverter* converter_ptr); | ||
|
||
/** | ||
* @brief Destroy the PGM_IO_PgmVnfConverter and free up the memory that was dedicated to it. | ||
* @param converter_ptr A pointer to a PGM_IO_PgmVnfConverter instance. | ||
*/ | ||
PGM_IO_API void PGM_IO_destroy_pgm_vnf_converter(PGM_IO_PgmVnfConverter* converter_ptr); | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif | ||
|
||
#endif // POWER_GRID_MODEL_IO_NATIVE_C_PGM_VNF_CONVERTER_H |
44 changes: 0 additions & 44 deletions
44
...e_c/power_grid_model_io_native_c/include/power_grid_model_io_native_c/vnf_pgm_converter.h
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters