result.args.push_back(parse_bool());
break;
case SymbolType::signature:
- result.args.push_back(Symbol(parse_enum()));
+ result.args.push_back(parse_symbol());
break;
}
}
return get_item(strings, -len);
}
-string BinaryParser::parse_enum()
+Symbol BinaryParser::parse_symbol()
{
return get_item(strings, parse_int());
}
#include <map>
#include "binarydict.h"
#include "parsermode.h"
+#include "type.h"
namespace Msp {
namespace DataFile {
float parse_float();
std::string parse_string();
bool parse_bool();
- std::string parse_enum();
+ Symbol parse_symbol();
};
} // namespace DataFile
case StringType::signature: write_string(j->get<StringType::Store>()); break;
case BoolType::signature: write_int (j->get<BoolType::Store>()); break;
case FloatType::signature: write_float (j->get<FloatType::Store>()); break;
- case SymbolType::signature: write_enum (j->get<SymbolType::Store>()); break;
+ case SymbolType::signature: write_symbol(j->get<SymbolType::Store>()); break;
}
write_int(st.sub.size());
#endif
}
-void BinaryWriter::write_enum(const string &e)
+void BinaryWriter::write_symbol(const Symbol &s)
{
- write_int(get_item(strings, e));
+ write_int(get_item(strings, s.name));
}
} // namespace DataFile
#include <map>
#include "binarydict.h"
+#include "type.h"
#include "writermode.h"
namespace Msp {
void write_int(long long n);
void write_string(const std::string &s);
void write_float(float f);
- void write_enum(const std::string &e);
+ void write_symbol(const Symbol &s);
};
} // namespace DataFile