Lexically casts an argument to an int64 if it is defined. Returns true if not null.
| 907 | |
| 908 | /// Lexically casts an argument to an int64 if it is defined. Returns true if not null. |
| 909 | bool arg_as_RasterOrder( |
| 910 | library::RasterOrder &raster_order, |
| 911 | KernelArgument::Value const *value_ptr) { |
| 912 | |
| 913 | if (value_ptr->not_null) { |
| 914 | if (value_ptr->argument->description->type == ArgumentTypeID::kEnumerated) { |
| 915 | |
| 916 | raster_order = library::from_string<library::RasterOrder>( |
| 917 | static_cast<EnumeratedTypeArgument::EnumeratedTypeValue const *>(value_ptr)->element); |
| 918 | |
| 919 | if (raster_order == library::RasterOrder::kInvalid) { |
| 920 | throw std::runtime_error( |
| 921 | "arg_as_RasterOrder() - illegal cast."); |
| 922 | } |
| 923 | } |
| 924 | else { |
| 925 | throw std::runtime_error( |
| 926 | "arg_as_RasterOrder() - illegal cast."); |
| 927 | } |
| 928 | return true; |
| 929 | } |
| 930 | return false; |
| 931 | } |
| 932 | |
| 933 | /// Lexically casts an argument to an int64 if it is defined. Returns true if not null. |
| 934 | bool arg_as_RasterOrder( |
nothing calls this directly
no test coverage detected