-
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.
fold genFlag into component_creation_parameters_struct
- Loading branch information
1 parent
ce1cf62
commit 4031373
Showing
28 changed files
with
314 additions
and
266 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,62 @@ | ||
//---------------------------------------------------------------------------// | ||
// Copyright (c) 2022 Mikhail Komarov <[email protected]> | ||
// Copyright (c) 2022 Nikita Kaskov <[email protected]> | ||
// | ||
// MIT License | ||
// | ||
// Permission is hereby granted, free of charge, to any person obtaining a copy | ||
// of this software and associated documentation files (the "Software"), to deal | ||
// in the Software without restriction, including without limitation the rights | ||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
// copies of the Software, and to permit persons to whom the Software is | ||
// furnished to do so, subject to the following conditions: | ||
// | ||
// The above copyright notice and this permission notice shall be included in all | ||
// copies or substantial portions of the Software. | ||
// | ||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
// SOFTWARE. | ||
//---------------------------------------------------------------------------// | ||
|
||
#ifndef CRYPTO3_BLUEPRINT_COMPONENT_CREATION_PARAMETERS_HPP | ||
#define CRYPTO3_BLUEPRINT_COMPONENT_CREATION_PARAMETERS_HPP | ||
|
||
namespace nil { | ||
namespace blueprint { | ||
|
||
enum class generate_flag : uint8_t { | ||
NONE = 0, | ||
CIRCUIT = 1 << 0, | ||
ASSIGNMENTS = 1 << 1, | ||
FALSE_ASSIGNMENTS = 1 << 2 | ||
}; | ||
|
||
constexpr enum generate_flag operator |( const enum generate_flag self, const enum generate_flag val ) | ||
{ | ||
return (enum generate_flag)(uint8_t(self) | uint8_t(val)); | ||
} | ||
constexpr enum generate_flag operator &( const enum generate_flag self, const enum generate_flag val ) | ||
{ | ||
return (enum generate_flag)(uint8_t(self) & uint8_t(val)); | ||
} | ||
|
||
|
||
struct component_creation_parameters_struct { | ||
generate_flag genFlag; | ||
component_creation_parameters_struct(generate_flag input) { | ||
genFlag = input; | ||
} | ||
component_creation_parameters_struct() { | ||
genFlag = ((generate_flag)((uint8_t)generate_flag::ASSIGNMENTS | (uint8_t)generate_flag::CIRCUIT)); | ||
} | ||
}; | ||
|
||
} // namespace blueprint | ||
} // namespace nil | ||
|
||
#endif // CRYPTO3_BLUEPRINT_COMPONENT_CREATION_PARAMETERS_HPP |
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.