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

#include "FleetObject.h"

Inheritance diagram for FleetObject:
Collaboration diagram for FleetObject:

Public Member Functions

 FleetObject (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 Member Functions

 PyCallable_DECL_CALL (CreateFleet)
 
- 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)
 

Protected Attributes

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

FleetObject.cpp

Fleet Object code for EVEmu

: Allan

Date
: 05 August 2014 (original skeleton outline) : 21 November 2017 (begin actual implementation)
 ~FleetObject ()
 
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
}
 
- Static Protected Attributes inherited from PyService
static const char *const s_checkTimeStrings [_checkCount]
 

Detailed Description

Definition at line 19 of file FleetObject.h.

Constructor & Destructor Documentation

FleetObject::FleetObject ( PyServiceMgr mgr)
FleetObject::~FleetObject ( )

Definition at line 30 of file FleetObject.cpp.

References m_dispatch.

31 {
32  delete m_dispatch;
33 }
Dispatcher *const m_dispatch
Definition: FleetObject.h:27

Member Function Documentation

PyBoundObject * FleetObject::CreateBoundObject ( Client pClient,
const PyRep bind_args 
)
protectedvirtual

Reimplemented from PyService.

Definition at line 35 of file FleetObject.cpp.

References _log, PyRep::AsInt(), PyRep::Dump(), PyService::GetName(), is_log_enabled, PyRep::IsInt(), PyService::m_manager, PyRep::TypeString(), and PyInt::value().

36 {
37  if (is_log_enabled(FLEET__BIND_DUMP)) {
38  _log( FLEET__BIND_DUMP, "FleetObject bind request for:" );
39  bind_args->Dump( FLEET__BIND_DUMP, " " );
40  }
41 
42  if (!bind_args->IsInt()) {
43  _log(FLEET__ERROR, "%s Service: invalid bind argument type %s", GetName(), bind_args->TypeString());
44  return nullptr;
45  }
46  /* do we need to bind object like this? probably not, cause it works as-is
47  //we just bind up a new inventory object for container requested and give it back to them.
48  InventoryBound *ib = new InventoryBound(m_manager, item, flag);
49  PyRep *result = m_manager->BindObject(call.client, ib);
50  */
51  return new FleetBound( m_manager, bind_args->AsInt()->value());
52 }
#define _log(type, fmt,...)
Definition: logsys.h:124
int32 value() const
Definition: PyRep.h:247
const char * GetName() const
Definition: PyService.h:54
void Dump(FILE *into, const char *pfx) const
Dumps object to file.
Definition: PyRep.cpp:84
#define is_log_enabled(type)
Definition: logsys.h:78
PyServiceMgr *const m_manager
Definition: PyService.h:91
bool IsInt() const
Definition: PyRep.h:100
PyInt * AsInt()
Definition: PyRep.h:122
const char * TypeString() const
Definition: PyRep.cpp:76

Here is the call graph for this function:

FleetObject::PyCallable_DECL_CALL ( CreateFleet  )
protected

Member Data Documentation

Dispatcher* const FleetObject::m_dispatch
protected

Definition at line 27 of file FleetObject.h.

Referenced by ~FleetObject().


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