mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-25 01:23:52 +00:00
taml binary parsing
added taml binary parser
This commit is contained in:
parent
55afef7b3d
commit
140e9dbfc6
3 changed files with 218 additions and 0 deletions
|
|
@ -42,6 +42,10 @@
|
|||
#include "persistence/taml/binary/tamlBinaryReader.h"
|
||||
#endif
|
||||
|
||||
#ifndef _TAML_BINARYPARSER_H_
|
||||
#include "persistence/taml/binary/tamlBinaryParser.h"
|
||||
#endif
|
||||
|
||||
#ifndef _TAML_JSONWRITER_H_
|
||||
#include "persistence/taml/json/tamlJSONWriter.h"
|
||||
#endif
|
||||
|
|
@ -455,6 +459,19 @@ bool Taml::parse(const char* pFilename, TamlVisitor& visitor)
|
|||
}
|
||||
|
||||
case BinaryFormat:
|
||||
{
|
||||
// Parse with the visitor.
|
||||
TamlBinaryParser parser;
|
||||
// Are property changes needed but not supported?
|
||||
if (visitor.wantsPropertyChanges() && !parser.canChangeProperty())
|
||||
{
|
||||
// Yes, so warn.
|
||||
Con::warnf("Taml::parse() - Cannot parse '%s' file-type for filename '%s' as a specified visitor requires property changes which are not supported by the parser.", getFormatModeDescription(formatMode), pFilename);
|
||||
return false;
|
||||
}
|
||||
|
||||
return parser.accept(pFilename, visitor);
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue