-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement a
PayloadRegister
as a factory to register and create `Pa…
…yload`s (#68) This PR implements a `PayloadRegistry` factory as a template specialization of `plugin::registry::PluginRegistry<T>` (see #63). This registry can instantiate `PayloadInfo` items which, in turn, are responsible of instantiate concrete `Payload` implementations (same schema as `TargetSystem`). It also turns the `ZipPayload` into a pluggable `Payload` for this new registry. --------- Co-authored-by: Marius Hillenbrand <[email protected]>
- Loading branch information
1 parent
cfb8f45
commit cb29d2e
Showing
15 changed files
with
568 additions
and
268 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
//===- PayloadRegistry.h - Payload Registry ---------------------*- C++ -*-===// | ||
// | ||
// (C) Copyright IBM 2023. | ||
// | ||
// This code is part of Qiskit. | ||
// | ||
// This code is licensed under the Apache License, Version 2.0 with LLVM | ||
// Exceptions. You may obtain a copy of this license in the LICENSE.txt | ||
// file in the root directory of this source tree. | ||
// | ||
// Any modifications or derivative works of this code must retain this | ||
// copyright notice, and modified files need to carry a notice indicating | ||
// that they have been altered from the originals. | ||
// | ||
//===----------------------------------------------------------------------===// | ||
// | ||
// Declaration of the QSSC payload registry system. | ||
// | ||
//===----------------------------------------------------------------------===// | ||
#ifndef PAYLOADREGISTRY_H | ||
#define PAYLOADREGISTRY_H | ||
|
||
#include "Payload.h" | ||
|
||
#include "Plugin/PluginInfo.h" | ||
#include "Plugin/PluginRegistry.h" | ||
|
||
namespace qssc::payload::registry { | ||
|
||
using PayloadInfo = plugin::registry::PluginInfo<Payload>; | ||
using PayloadRegistry = plugin::registry::PluginRegistry<PayloadInfo>; | ||
|
||
} // namespace qssc::payload::registry | ||
|
||
#endif |
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.