Definition at line 232 of file StdMeshMaterial.cpp.
◆ StdMeshMaterialSubLoader()
StdMeshMaterialSubLoader::StdMeshMaterialSubLoader |
( |
| ) |
|
|
default |
◆ Load()
Definition at line 521 of file StdMeshMaterial.cpp.
523 std::vector<unsigned int> indices;
530 indices.push_back(CurIndex);
531 assert(CurIndex <= vec.size());
532 if(CurIndex == vec.size())
534 vec.push_back(SubT());
535 vec.back().Name.Format(
"%u", CurIndex);
542 unsigned int size_before = indices.size();
543 for(
unsigned int i = 0; i < vec.size(); ++i)
545 indices.push_back(i);
548 if(indices.size() == size_before)
550 if(std::strchr(token_name.
getData(),
'*') ==
nullptr && std::strchr(token_name.
getData(),
'?') ==
nullptr)
552 indices.push_back(vec.size());
553 vec.push_back(SubT());
554 vec.back().Name = token_name;
571 for(
unsigned int i = 0; i < indices.size()-1; ++i)
573 unsigned int old_line = ctx.
Line;
574 const char* old_pos = ctx.
Script;
575 vec[indices[i]].Load(ctx);
580 vec[indices.back()].Load(ctx);
bool SWildcardMatchEx(const char *szString, const char *szWildcard)
Token AdvanceRequired(StdStrBuf &name, Token expect)
const char * getData() const
References StdMeshMaterialParserCtx::AdvanceRequired(), StdStrBuf::getData(), StdMeshMaterialParserCtx::Line, StdMeshMaterialParserCtx::Script, SWildcardMatchEx(), TOKEN_BRACE_OPEN, and TOKEN_IDTF.
Referenced by StdMeshMaterialPass::Load(), StdMeshMaterialTechnique::Load(), and StdMeshMaterial::Load().
The documentation for this class was generated from the following file: