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

Function apply_visitor

src/ifcparse/IfcEntityInstanceData.h:344–389  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

342
343 template<typename Visitor>
344 auto apply_visitor(Visitor&& visitor) const {
345 switch (type()) {
346 case IfcUtil::Argument_DERIVED:
347 return visitor(Derived{});
348 case IfcUtil::Argument_INT:
349 return visitor((int)*this);
350 case IfcUtil::Argument_BOOL:
351 return visitor((bool)*this);
352 case IfcUtil::Argument_LOGICAL: {
353 boost::logic::tribool tb = *this;
354 return visitor(tb);
355 }
356 case IfcUtil::Argument_DOUBLE:
357 return visitor((double)*this);
358 case IfcUtil::Argument_STRING:
359 return visitor((std::string)*this);
360 case IfcUtil::Argument_BINARY:
361 return visitor((boost::dynamic_bitset<>)*this);
362 case IfcUtil::Argument_ENUMERATION:
363 return visitor((EnumerationReference)*this);
364 case IfcUtil::Argument_ENTITY_INSTANCE:
365 return visitor((IfcUtil::IfcBaseClass*)*this);
366 case IfcUtil::Argument_AGGREGATE_OF_INT:
367 return visitor((std::vector<int>)*this);
368 case IfcUtil::Argument_AGGREGATE_OF_DOUBLE:
369 return visitor((std::vector<double>)*this);
370 case IfcUtil::Argument_AGGREGATE_OF_STRING:
371 return visitor((std::vector<std::string>)*this);
372 case IfcUtil::Argument_AGGREGATE_OF_BINARY:
373 return visitor((std::vector<boost::dynamic_bitset<>>)*this);
374 case IfcUtil::Argument_AGGREGATE_OF_ENTITY_INSTANCE:
375 return visitor((boost::shared_ptr<aggregate_of_instance>)*this);
376 case IfcUtil::Argument_AGGREGATE_OF_AGGREGATE_OF_INT:
377 return visitor((std::vector<std::vector<int>>)*this);
378 case IfcUtil::Argument_AGGREGATE_OF_AGGREGATE_OF_DOUBLE:
379 return visitor((std::vector<std::vector<double>>)*this);
380 case IfcUtil::Argument_AGGREGATE_OF_AGGREGATE_OF_ENTITY_INSTANCE:
381 return visitor((boost::shared_ptr<aggregate_of_aggregate_of_instance>)*this);
382 case IfcUtil::Argument_EMPTY_AGGREGATE:
383 return visitor(empty_aggregate_t{});
384 case IfcUtil::Argument_AGGREGATE_OF_EMPTY_AGGREGATE:
385 return visitor(empty_aggregate_of_aggregate_t{});
386 default:
387 return visitor(Blank{});
388 }
389 }
390};
391
392

Callers 4

buildMethod · 0.85
tree_edgeMethod · 0.85
operator()Method · 0.85
toStringMethod · 0.85

Calls 3

AttributeValueFunction · 0.85
apply_visitorMethod · 0.80
typeFunction · 0.70

Tested by

no test coverage detected