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

Function type

pdal/DimUtil.hpp:145–170  ·  view source on GitHub ↗

Get the type corresponding to a type name. \param s Name of type. \return Corresponding type enumeration value.

Source from the content-addressed store, hash-verified

143/// \param s Name of type.
144/// \return Corresponding type enumeration value.
145inline Type type(std::string s)
146{
147 s = Utils::tolower(s);
148
149 if (s == "int8_t" || s == "int8" || s == "char")
150 return Type::Signed8;
151 if (s == "int16_t" || s == "int16" || s == "short")
152 return Type::Signed16;
153 if (s == "int32_t" || s == "int32" || s == "int")
154 return Type::Signed32;
155 if (s == "int64_t" || s == "int64" || s == "long")
156 return Type::Signed64;
157 if (s == "uint8_t" || s == "uint8" || s == "uchar")
158 return Type::Unsigned8;
159 if (s == "uint16_t" || s == "uint16" || s == "ushort")
160 return Type::Unsigned16;
161 if (s == "uint32_t" || s == "uint32" || s == "uint")
162 return Type::Unsigned32;
163 if (s == "uint64_t" || s == "uint64" || s == "ulong")
164 return Type::Unsigned64;
165 if (s == "float" || s == "float32")
166 return Type::Float;
167 if (s == "double" || s == "float64")
168 return Type::Double;
169 return Type::None;
170}
171
172inline Type type(const std::string& baseType, size_t size)
173{

Callers 15

DimUtil.hppFile · 0.70
loadMethod · 0.70
preparedMethod · 0.50
parseFunction · 0.50
initializeMethod · 0.50
loadAddonMethod · 0.50
printMethod · 0.50
evalMethod · 0.50
toStringMethod · 0.50
toStringMethod · 0.50
toStringMethod · 0.50
dumpMethod · 0.50

Calls 2

tolowerFunction · 0.85
fromNameFunction · 0.85

Tested by

no test coverage detected