1
0
mirror of https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git synced 2025-07-18 19:29:09 +00:00

Reroute plResPatcher

This commit is contained in:
2013-11-23 18:30:21 -05:00
parent 346b6f8ac8
commit 9d162a7a32
7 changed files with 120 additions and 308 deletions

View File

@ -42,31 +42,28 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#ifndef _PLMESSAGE_PLRESPATCHERMSG_H
#define _PLMESSAGE_PLRESPATCHERMSG_H
#include "HeadSpin.h"
#include "plString.h"
#include "pnMessage/plMessage.h"
// This message is sent when plResPatcher has completed its async operation
class plResPatcherMsg : public plMessage {
bool fSuccess;
char* fError;
plString fError;
public:
plResPatcherMsg() : fSuccess(true), fError(nil) { SetBCastFlag(kBCastByExactType); }
plResPatcherMsg(bool success, const char* error) : fSuccess(success)
plResPatcherMsg() : fSuccess(true) { SetBCastFlag(kBCastByExactType); }
plResPatcherMsg(bool success, const plString& error) : fSuccess(success), fError(error)
{
SetBCastFlag(kBCastByExactType);
fError = hsStrcpy(error);
}
~plResPatcherMsg() { delete[] fError; }
CLASSNAME_REGISTER(plResPatcherMsg);
GETINTERFACE_ANY(plResPatcherMsg, plMessage);
void Read (hsStream *, hsResMgr *) { FATAL("What the hell are you doing?"); }
void Write (hsStream *, hsResMgr *) { FATAL("What the hell are you doing?"); }
const char* GetError() const { return fError; }
plString GetError() const { return fError; }
bool Success() const { return fSuccess; }
};