MCPcopy Create free account
hub / github.com/PDAL/PDAL / writeTypes

Method writeTypes

dimbuilder/DimBuilder.cpp:501–524  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

499}
500
501void DimBuilder::writeTypes(std::ostream& out)
502{
503 out << "/// Get the default storage type of a predefined dimension.\n";
504 out << "/// \\param id ID of the predefined dimension.\n";
505 out << "/// \\return The dimension's default storage type. An "
506 "exception is thrown if\n";
507 out << "/// the id doesn't represent a predefined dimension.\n";
508 out << "inline Type defaultType(Id id)\n";
509 out << "{\n";
510 out << " switch (id)\n";
511 out << " {\n";
512 for (auto& d : m_dims)
513 {
514 out << " case Id::" << d.m_name << ":\n";
515 out << " return Type::" << getTypename(d.m_type) << ";\n";
516 }
517 out << " case Id::Unknown:\n";
518 out << " throw pdal_error(\"No type found for undefined "
519 "dimension.\");\n";
520 out << " }\n";
521 out << " throw pdal_error(\"No type found for undefined "
522 "dimension.\");\n";
523 out << "}\n";
524}
525
526void DimBuilder::writeIsDeprecated(std::ostream& out)
527{

Callers

nothing calls this directly

Calls 1

getTypenameFunction · 0.85

Tested by

no test coverage detected