MCPcopy Create free account
hub / github.com/IfcOpenShell/IfcOpenShell / apply_visitor

Method apply_visitor

src/ifcparse/variantarray.h:241–248  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

239
240 template<typename Visitor>
241 auto apply_visitor(Visitor&& visitor, std::size_t index) const {
242 if (index >= size()) {
243 throw IfcParse::IfcException(
244 "Index " + std::to_string(index) + " is out of range for variant of size " + std::to_string(size())
245 );
246 }
247 return apply_visitor_impl(std::forward<Visitor>(visitor), index, std::integral_constant<std::size_t, sizeof...(Types)>{});
248 }
249
250 size_t size() const {
251 return size_and_indices_ ? size_and_indices_[0] : 0;

Callers 6

write_streaming_Method · 0.80
format_entity_instanceFunction · 0.80
finalizeFunction · 0.80
addEntityMethod · 0.80
apply_visitorFunction · 0.80
sizeMethod · 0.80

Calls 2

to_stringFunction · 0.85
sizeFunction · 0.70

Tested by

no test coverage detected