//////////////////////////////////////////////////////////////////////////////////////////// Lexically casts an argument to an int64 if it is defined. Returns true if not null.
| 1084 | ///////////////////////////////////////////////////////////////////////////////////////////////// |
| 1085 | /// Lexically casts an argument to an int64 if it is defined. Returns true if not null. |
| 1086 | bool arg_as_ConvModeID( |
| 1087 | library::ConvModeID &conv_mode, |
| 1088 | KernelArgument::Value const *value_ptr) { |
| 1089 | |
| 1090 | if (value_ptr->not_null) { |
| 1091 | if (value_ptr->argument->description->type == ArgumentTypeID::kEnumerated) { |
| 1092 | |
| 1093 | conv_mode = library::from_string<library::ConvModeID>( |
| 1094 | static_cast<EnumeratedTypeArgument::EnumeratedTypeValue const *>(value_ptr)->element); |
| 1095 | |
| 1096 | if (conv_mode == library::ConvModeID::kInvalid) { |
| 1097 | throw std::runtime_error( |
| 1098 | "arg_as_ConvModeID() - illegal cast."); |
| 1099 | } |
| 1100 | } |
| 1101 | else { |
| 1102 | |
| 1103 | throw std::runtime_error( |
| 1104 | "arg_as_ConvModeID() - illegal cast."); |
| 1105 | } |
| 1106 | return true; |
| 1107 | } |
| 1108 | return false; |
| 1109 | } |
| 1110 | |
| 1111 | /// Lexically casts an argument to an int64 if it is defined. Returns true if not null. |
| 1112 | bool arg_as_ConvModeID( |
nothing calls this directly
no test coverage detected