38 : lsc_service(nullptr),
39 cache_service(nullptr),
60 bo = cur.second.object;
62 _log(SERVICE__MESSAGE,
"Service Mgr Destructor: Deleting %s at node %u:%u", \
67 sLog.Warning(
" PyServiceMgr",
"Services Manager has been closed." );
205 std::map<std::string, PyService*>::const_iterator itr =
m_svcList.find(name);
209 _log(SERVICE__ERROR,
"PyServiceMgr::LookupService() - Service %s not found in list.", name.c_str());
214 if (pClient ==
nullptr) {
215 _log(SERVICE__ERROR,
"PyServiceMgr::BindObject() - Tried to bind a NULL client.");
219 if (pObj ==
nullptr) {
220 _log(SERVICE__ERROR,
"PyServiceMgr::BindObject() - Tried to bind a NULL object.");
235 _log(SERVICE__MESSAGE,
"Service Mgr Binding %s to node %u:%u for %s", \
241 if (dict ==
nullptr) {
244 tuple->
items[1] = time;
248 tuple->
items[1] = dict;
249 tuple->
items[2] = time;
252 if (oid !=
nullptr) {
262 std::map<uint32, BoundObj>::iterator itr =
m_boundObjects.find(bindID);
264 return itr->second.object;
270 std::map<uint32, BoundObj>::iterator itr =
m_boundObjects.find(bindID);
272 _log(SERVICE__ERROR,
"PyServiceMgr::ClearBoundObject() - Unable to find bound object %u to release.", bindID);
278 _log(SERVICE__MESSAGE,
"Service Mgr Clearing bound object %s at %s", bo->
GetName(), bo->
GetBindStr().c_str());
287 vec.push_back(cur.second);
ObjectsBoundMap m_boundObjects
#define _log(type, fmt,...)
PyBoundObject * FindBoundObject(uint32 bindID)
PyService * LookupService(const std::string &name)
void SafeDelete(T *&p)
Deletes and nullifies a pointer.
#define is_log_enabled(type)
#define sLog
Evaluates to a NewLog instance.
void BoundObjectVec(std::vector< BoundObj > &vec)
std::string GetBindStr() const
const char * GetName() const
PyServiceMgr(uint32 nodeID, EntityList &elist)
void AddBindID(uint32 bindID)
std::map< std::string, PyService * > m_svcList
void GiveCache(const PyRep *objectID, PyRep **contents)
PySubStruct * BindObject(Client *pClient, PyBoundObject *pObj, PyDict *dict=nullptr, PyDict *oid=nullptr)
void _SetNodeBindID(uint32 nodeID, uint32 bindID)
ObjCacheService * cache_service
void SetService(PyServiceMgr *svc)
void RegisterService(const std::string &name, PyService *svc)
void ClearBoundObject(uint32 bindID)
void Initalize(double startTime)
void SetItemString(const char *key, PyRep *value)
SetItemString adds or sets a database entry.
bool IsCacheLoaded(const PyRep *objectID) const
const char * GetName() const