std::string Base::Name(Stage stage) const { INFO0; switch (stage) { case Stage::trainer : return TrainerName(); case Stage::reader : return ReaderName(); DEFAULT(boca::Name(stage), ""); } }
std::string Base::BackgroundFileName(Stage stage) const { INFO0; // auto name = BackgroundName(); auto name = Name(); switch (stage) { case Stage::trainer : name = TrainerName(name); break; case Stage::reader : name = ReaderName(name); break; } return PathName(BackgroundName(name)); }
std::string Base::SignalFileName(Stage stage) const { INFO0; // auto name = SignalName(); auto name = Name(); switch (stage) { case Stage::trainer : name = TrainerName(name); break; case Stage::reader : name = ReaderName(name); break; DEFAULT(boca::Name(stage), ""); } return PathName(SignalName(name)); }
void ReflectiveReader::Read(ContentReader*) { printf("\n"); printf("This C++ XNB loader implementation does not support ReflectiveReader.\n"); printf("(think about it: it's not really possible to implement this without .NET style reflection)\n"); printf("\n"); printf("To load this file, you must manually implement a TypeReader subclass, fill in its Read method\n"); printf("to load the contents of your custom object, and call TypeReaderManager::RegisterTypeReader\n"); printf("to register this new custom loader.\n"); printf("\n"); printf("Your custom TypeReader should specify:\n"); printf(" TargetType = '%S'\n", TargetType().c_str()); printf(" ReaderName = '%S'\n", ReaderName().c_str()); printf("\n"); throw exception("Cannot parse XNB files that use automatic serialization."); }
std::string Base::ReaderName() const { INFO0; return ReaderName(Name()); }