-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: Changes in worker and task handler (#368)
- Loading branch information
Showing
18 changed files
with
218 additions
and
244 deletions.
There are no files selected for viewing
1 change: 0 additions & 1 deletion
1
packages/cpp/ArmoniK.Api.Client/header/serializer/ArgsSerializer.h
This file was deleted.
Oops, something went wrong.
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
4 changes: 2 additions & 2 deletions
4
packages/cpp/ArmoniK.Api.Common/header/options/ControlPlane.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
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
39 changes: 16 additions & 23 deletions
39
packages/cpp/ArmoniK.Api.Common/header/utils/JsonConfiguration.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 |
---|---|---|
@@ -1,28 +1,21 @@ | ||
#pragma once | ||
/** | ||
* @file JsonConfiguration.h | ||
* @brief Definition of a JSON configuration class that inherits from IConfiguration. | ||
* @brief Definition of a JSON configuration class that inherits from Configuration. | ||
*/ | ||
#include "utils/IConfiguration.h" | ||
#include "utils/Configuration.h" | ||
|
||
namespace API_COMMON_NAMESPACE::utils { | ||
/** | ||
* @class JsonConfiguration | ||
* @brief JSON configuration class that inherits from IConfiguration. | ||
*/ | ||
class JsonConfiguration : public IConfiguration { | ||
private: | ||
JsonConfiguration() = default; | ||
|
||
public: | ||
/** | ||
* @brief Constructor that takes a JSON file path. | ||
* @param filepath JSON file path to be used for configuration. | ||
*/ | ||
explicit JsonConfiguration(const std::string &filepath); | ||
|
||
static void fromPath(IConfiguration &config, std::string_view filepath); | ||
static JsonConfiguration fromString(const std::string &json_string); | ||
static void fromString(IConfiguration &config, const std::string &json_string); | ||
}; | ||
} // namespace API_COMMON_NAMESPACE::utils | ||
namespace API_COMMON_NAMESPACE::utils::JsonConfiguration { | ||
void fromPath(Configuration &config, std::string_view filepath); | ||
void fromString(Configuration &config, std::string_view json_string); | ||
inline Configuration fromPath(std::string_view filepath) { | ||
Configuration config; | ||
fromPath(config, filepath); | ||
return config; | ||
} | ||
inline Configuration fromString(std::string_view json_string) { | ||
Configuration config; | ||
fromString(config, json_string); | ||
return config; | ||
} | ||
} // namespace API_COMMON_NAMESPACE::utils::JsonConfiguration |
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
Oops, something went wrong.