EvEmu  0.8.4
11 September 2021
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
EntityService Class Reference

#include "EntityService.h"

Inheritance diagram for EntityService:
Collaboration diagram for EntityService:

Public Member Functions

 EntityService (PyServiceMgr *mgr)
 
- Public Member Functions inherited from PyService
 PyService (PyServiceMgr *mgr, const char *serviceName)
 
virtual ~PyService ()
 
virtual PyResult Call (const std::string &method, PyCallArgs &args)
 
const char * GetName () const
 
- Public Member Functions inherited from PyCallable
 PyCallable ()
 
virtual ~PyCallable ()
 

Protected Attributes

Dispatcher *const m_dispatch
 
- Protected Attributes inherited from PyService
PyServiceMgr *const m_manager
 

EntityService.cpp

Drone Control class : Allan

Date
: 06 November 2016
virtual ~EntityService ()
 
virtual PyBoundObjectCreateBoundObject (Client *pClient, const PyRep *bind_args)
 

Additional Inherited Members

- Protected Types inherited from PyService
enum  CacheCheckTime {
  check_Always = 0, check_Never, check_in_year, check_in_6_months,
  check_in_3_months, check_in_1_month, check_in_1_week, check_in_1_day,
  check_in_12_hours, check_in_6_hours, check_in_3_hours, check_in_2_hours,
  check_in_1_hour, check_in_30_minutes, check_in_15_minutes, check_in_5_minutes,
  check_in_1_minute, check_in_30_seconds, check_in_15_seconds, check_in_5_seconds,
  check_in_1_second, _checkCount
}
 
- Protected Member Functions inherited from PyService
PyObject_BuildCachedReturn (PySubStream **result, const char *sessionInfo, CacheCheckTime check)
 
virtual PyResult Handle_MachoResolveObject (PyCallArgs &call)
 
virtual PyResult Handle_MachoBindObject (PyCallArgs &call)
 
- Protected Member Functions inherited from PyCallable
void _SetCallDispatcher (CallDispatcher *d)
 
- Static Protected Attributes inherited from PyService
static const char *const s_checkTimeStrings [_checkCount]
 

Detailed Description

Definition at line 19 of file EntityService.h.

Constructor & Destructor Documentation

EntityService::EntityService ( PyServiceMgr mgr)
EntityService::~EntityService ( )
virtual

Definition at line 30 of file EntityService.cpp.

References m_dispatch.

30  {
31  delete m_dispatch;
32 }
Dispatcher *const m_dispatch
Definition: EntityService.h:27

Member Function Documentation

PyBoundObject * EntityService::CreateBoundObject ( Client pClient,
const PyRep bind_args 
)
protectedvirtual
Todo:
will need to make sure this object is deleted when changing systems

Reimplemented from PyService.

Definition at line 71 of file EntityService.cpp.

References _log, PyRep::AsInt(), codelog, PyRep::Dump(), Client::GetName(), PyRep::IsInt(), PyService::m_manager, sDataMgr, Client::SystemMgr(), PyRep::TypeString(), and PyInt::value().

71  {
72  _log(DRONE__DUMP, "EntityService bind request");
73  bind_args->Dump(DRONE__DUMP, " ");
74  if (!bind_args->IsInt()) {
75  codelog(SERVICE__ERROR, "%s: Non-integer bind argument '%s'", pClient->GetName(), bind_args->TypeString());
76  return nullptr;
77  }
78 
79  uint32 systemID = bind_args->AsInt()->value();
80  if (!sDataMgr.IsSolarSystem(systemID)) {
81  codelog(SERVICE__ERROR, "%s: Expected systemID, but got %u.", pClient->GetName(), systemID);
82  return nullptr;
83  }
84 
85  return new EntityBound(m_manager, pClient->SystemMgr(), systemID);
86 }
#define _log(type, fmt,...)
Definition: logsys.h:124
int32 value() const
Definition: PyRep.h:247
void Dump(FILE *into, const char *pfx) const
Dumps object to file.
Definition: PyRep.cpp:84
#define codelog(type, fmt,...)
Definition: logsys.h:128
SystemManager * SystemMgr() const
Definition: Client.h:92
PyServiceMgr *const m_manager
Definition: PyService.h:91
const char * GetName() const
Definition: Client.h:94
unsigned __int32 uint32
Definition: eve-compat.h:50
bool IsInt() const
Definition: PyRep.h:100
PyInt * AsInt()
Definition: PyRep.h:122
const char * TypeString() const
Definition: PyRep.cpp:76
#define sDataMgr

Here is the call graph for this function:

Member Data Documentation

Dispatcher* const EntityService::m_dispatch
protected

Definition at line 27 of file EntityService.h.

Referenced by ~EntityService().


The documentation for this class was generated from the following files: