| 119 | } |
| 120 | |
| 121 | void addAddressProxyMethods(AllProxyClasses<blocksci::AnyScript, ProxyAddress> &cls) { |
| 122 | cls.base.def("with_type", [](Proxy<blocksci::AnyScript> &p , blocksci::AddressType::Enum type) { |
| 123 | static auto table = blocksci::make_dynamic_table<blocksci::AddressType, ProxyScriptWithTypeFunctor>(); |
| 124 | auto index = static_cast<size_t>(type); |
| 125 | return table.at(index)(p); |
| 126 | }, "If the address has the given type return it, otherwise return None"); |
| 127 | |
| 128 | cls.applyToAll(AddProxyMethods{}); |
| 129 | setupRangesProxy(cls); |
| 130 | addProxyOptionalMethods(cls.optional); |
| 131 | |
| 132 | addProxyEqualityMethods(cls.base); |
| 133 | addProxyComparisonMethods(cls.base); |
| 134 | } |
no test coverage detected