31 #ifndef __CACHEDOBJECTMGR_H_INCL__
32 #define __CACHEDOBJECTMGR_H_INCL__
65 bool HaveCached(
const std::string &objectID)
const;
96 bool SaveCachedToFile(
const std::string &cacheDir,
const std::string &objectID)
const;
131 void Dump(FILE *into,
const char *pfx,
bool contents_too =
false);
157 void Dump(FILE *into,
const char *pfx,
bool contents_too =
false);
182 void Dump(FILE *into,
const char *pfx,
bool contents_too =
false);
213 if( !result.empty() )
216 std::stringstream ss;
229 if( !result.empty() )
bool IsCacheUpToDate(const PyRep *objectID, uint32 version, int64 timestamp)
CachedObjMap::const_iterator CachedObjMapConstItr
PyCachedCall * LoadCachedCall(const char *filename, const char *oname)
std::map< std::string, CacheRecord * > CachedObjMap
void GetCacheFileName(PyRep *key, std::string &into)
bool VisitObjectEx(const PyObjectEx *rep)
bool HaveCached(const std::string &objectID) const
bool VisitWString(const PyWString *rep)
PyCachedObject * Clone() const
PyObject * MakeCacheHint(const PyRep *objectID)
Python floating point number.
bool VisitBoolean(const PyBool *rep)
bool VisitObject(const PyObject *rep)
Object type visitor.
void UpdateCache(const std::string &objectID, PyRep **in_cached_data)
bool VisitReal(const PyFloat *rep)
PyCachedCall * Clone() const
bool VisitToken(const PyToken *rep)
bool VisitSubStream(const PySubStream *rep)
bool VisitSubStruct(const PySubStruct *rep)
wrapper types Visitor
PySubStream * LoadCachedFile(const char *obj_name)
void Dump(FILE *into, const char *pfx, bool contents_too=false)
bool SaveCachedToFile(const std::string &cacheDir, const std::string &objectID) const
void UpdateCacheFromSS(const std::string &objectID, PySubStream **in_cached_data)
CachedObjMap m_cachedObjects
CachedObjMap::iterator CachedObjMapItr
void InvalidateCache(const PyRep *objectID)
bool VisitNone(const PyNone *rep)
void Dump(FILE *into, const char *pfx, bool contents_too=false)
bool VisitString(const PyString *rep)
bool VisitDict(const PyDict *rep)
Python token (eg. class name).
static std::string OIDToString(const PyRep *objectID)
bool VisitLong(const PyLong *rep)
void _UpdateCache(const PyRep *objectID, PyBuffer **buffer)
bool VisitBuffer(const PyBuffer *rep)
PyObject * EncodeHint() const
bool VisitPackedRow(const PyPackedRow *rep)
PackedRow type visitor.
const std::string & content() const
Get the PyString content.
void Dump(FILE *into, const char *pfx, bool contents_too=false)
bool Decode(PySubStream **ss)
PyObject * GetCachedObject(const PyRep *objectID)
PyCachedObjectDecoder * LoadCachedObject(const char *filename, const char *oname)
bool VisitInteger(const PyInt *rep)
primitive data visitors
typeID Spawn an NPC with the specified type text Search for items matching the specified query() type() key(value)-Send an OnRemoteMessage" ) COMMAND( setbpattr
const uint32 CacheFileMagic
bool LoadCachedFromFile(const std::string &cacheDir, const std::string &objectID)
bool VisitChecksumedStream(const PyChecksumedStream *rep)
bool Decode(PySubStream **ss)