MCPcopy Create free account
hub / github.com/assimp/assimp / IsEntityDef

Function IsEntityDef

code/AssetLib/STEPParser/STEPFileReader.cpp:144–159  ·  view source on GitHub ↗

------------------------------------------------------------------------------------------------ check whether the given line contains an entity definition (i.e. starts with "# =")

Source from the content-addressed store, hash-verified

142// ------------------------------------------------------------------------------------------------
143// check whether the given line contains an entity definition (i.e. starts with "#<number>=")
144bool IsEntityDef(const std::string& snext)
145{
146 if (snext[0] == '#') {
147 // it is only a new entity if it has a '=' after the
148 // entity ID.
149 for(std::string::const_iterator it = snext.begin()+1; it != snext.end(); ++it) {
150 if (*it == '=') {
151 return true;
152 }
153 if ((*it < '0' || *it > '9') && *it != ' ') {
154 break;
155 }
156 }
157 }
158 return false;
159}
160
161}
162

Callers 1

ReadFileMethod · 0.85

Calls 2

beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected