Lexically casts an argument to an int64 if it is defined. Returns true if not null.
| 1123 | |
| 1124 | /// Lexically casts an argument to an int64 if it is defined. Returns true if not null. |
| 1125 | bool arg_as_ProviderID( |
| 1126 | library::Provider &provider, |
| 1127 | KernelArgument::Value const *value_ptr) { |
| 1128 | |
| 1129 | if (value_ptr->not_null) { |
| 1130 | if (value_ptr->argument->description->type == ArgumentTypeID::kEnumerated) { |
| 1131 | |
| 1132 | provider = library::from_string<library::Provider>( |
| 1133 | static_cast<EnumeratedTypeArgument::EnumeratedTypeValue const *>(value_ptr)->element); |
| 1134 | |
| 1135 | if (provider == library::Provider::kInvalid) { |
| 1136 | throw std::runtime_error( |
| 1137 | "arg_as_ProviderID() - illegal cast."); |
| 1138 | } |
| 1139 | } |
| 1140 | else { |
| 1141 | |
| 1142 | throw std::runtime_error( |
| 1143 | "arg_as_ProviderID() - illegal cast."); |
| 1144 | } |
| 1145 | return true; |
| 1146 | } |
| 1147 | return false; |
| 1148 | } |
| 1149 | |
| 1150 | /// Lexically casts an argument to an int64 if it is defined. Returns true if not null. |
| 1151 | bool arg_as_ProviderID( |
nothing calls this directly
no test coverage detected