1
0
mirror of https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git synced 2025-07-21 12:49:10 +00:00

Python file names and SynchedObj SDL state names => plString

This commit is contained in:
2014-01-11 11:33:45 -08:00
parent f370c65ad3
commit a783642515
25 changed files with 97 additions and 111 deletions

View File

@ -89,17 +89,18 @@ public:
struct StateDefn
{
plKey fObjKey;
plKey fObjKey;
uint32_t fSendFlags;
std::string fSDLName;
plString fSDLName;
plSynchedObject* GetObject() const { return plSynchedObject::ConvertNoRef(fObjKey->ObjectIsLoaded()); }
StateDefn() : fObjKey(nil),fSendFlags(0) {}
StateDefn(plKey k, uint32_t f, const char* sdlName) : fObjKey(k),fSendFlags(f) { fSDLName=sdlName; }
StateDefn(plKey k, uint32_t f, const plString& sdlName)
: fObjKey(k), fSendFlags(f), fSDLName(sdlName) { }
};
private:
typedef std::vector<std::string> SDLStateList;
typedef std::vector<plString> SDLStateList;
SDLStateList fSDLExcludeList;
SDLStateList fSDLVolatileList;
uint32_t fSynchFlags;
@ -110,12 +111,12 @@ private:
static plSynchedObject* fStaticSynchedObj; // static which temporarily holds address of each object's synchMgr
static std::vector<StateDefn> fDirtyStates;
static void IRemoveDirtyState(plKey o, const char* sdlName);
static void IAddDirtyState(plKey o, const char* sdlName, uint32_t sendFlags);
bool IOKToDirty(const char* SDLStateName) const;
SDLStateList::const_iterator IFindInSDLStateList(const SDLStateList& list, const char* sdlName) const;
static void IRemoveDirtyState(plKey o, const plString& sdlName);
static void IAddDirtyState(plKey o, const plString& sdlName, uint32_t sendFlags);
bool IOKToDirty(const plString& SDLStateName) const;
SDLStateList::const_iterator IFindInSDLStateList(const SDLStateList& list, const plString& sdlName) const;
protected:
bool IOKToNetwork(const char* sdlName, uint32_t* synchFlags) const;
bool IOKToNetwork(const plString& sdlName, uint32_t* synchFlags) const;
public:
plSynchedObject();
virtual ~plSynchedObject();
@ -136,8 +137,8 @@ public:
virtual void SetNetGroup(plNetGroupId netGroup) { fNetGroup = netGroup; }
plNetGroupId SelectNetGroup(plKey groupKey);
virtual bool DirtySynchState(const char* sdlName, uint32_t sendFlags);
void SendSDLStateMsg(const char* SDLStateName, uint32_t synchFlags); // don't use, only for net code
virtual bool DirtySynchState(const plString& sdlName, uint32_t sendFlags);
void SendSDLStateMsg(const plString& SDLStateName, uint32_t synchFlags); // don't use, only for net code
void ClearSynchFlagsBit(uint32_t f) { fSynchFlags &= ~f; }
@ -168,14 +169,14 @@ public:
void SetLocalOnly(bool b) { if (b) fSynchFlags |= kLocalOnly; else fSynchFlags &= ~kLocalOnly; }
// disable particular types of persistence
void AddToSDLExcludeList(const char*);
void RemoveFromSDLExcludeList(const char*);
bool IsInSDLExcludeList(const char*) const;
void AddToSDLExcludeList(const plString&);
void RemoveFromSDLExcludeList(const plString&);
bool IsInSDLExcludeList(const plString&) const;
// make volatile particular types of state
void AddToSDLVolatileList(const char*);
void RemoveFromSDLVolatileList(const char*);
bool IsInSDLVolatileList(const char*) const;
void AddToSDLVolatileList(const plString&);
void RemoveFromSDLVolatileList(const plString&);
bool IsInSDLVolatileList(const plString&) const;
//
// synched value stuff, currently unused