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

#include "AllianceRegistry.h"

Inheritance diagram for AllianceRegistry:
Collaboration diagram for AllianceRegistry:

Public Member Functions

 AllianceRegistry (PyServiceMgr *mgr)
 
 ~AllianceRegistry ()
 
- 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 (GetAlliance)
 
 PyCallable_DECL_CALL (GetRankedAlliances)
 
 PyCallable_DECL_CALL (GetEmploymentRecord)
 
 PyCallable_DECL_CALL (GetAllianceMembers)
 
virtual PyBoundObjectCreateBoundObject (Client *pClient, const PyRep *bind_args)
 
- 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
 

Private Attributes

AllianceDB m_db
 

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 33 of file AllianceRegistry.h.

Constructor & Destructor Documentation

AllianceRegistry::AllianceRegistry ( PyServiceMgr mgr)
AllianceRegistry::~AllianceRegistry ( )

Definition at line 58 of file AllianceRegistry.cpp.

References m_dispatch.

59 {
60  delete m_dispatch;
61 }
Dispatcher *const m_dispatch

Member Function Documentation

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

Reimplemented from PyService.

Definition at line 63 of file AllianceRegistry.cpp.

References PyRep::AsTuple(), PyTuple::GetItem(), Client::GetName(), PyRep::IntegerValue(), PyRep::IsTuple(), m_db, PyService::m_manager, Client::SendErrorMsg(), sLog, and PyRep::TypeString().

64 {
65  if (!bind_args->IsTuple()){
66  sLog.Error( "AllianceRegistry::CreateBoundObject", "%s: bind_args is not tuple: '%s'. ", pClient->GetName(), bind_args->TypeString() );
67  pClient->SendErrorMsg("Could not bind object for Ally Registry. Ref: ServerError 02808.");
68  return nullptr;
69  }
70 
71  return new AllianceBound(m_manager, m_db, PyRep::IntegerValue(bind_args->AsTuple()->GetItem(0)));
72 }
PyTuple * AsTuple()
Definition: PyRep.h:138
void SendErrorMsg(const char *fmt,...)
Definition: Client.cpp:2719
PyRep * GetItem(size_t index) const
Returns Python object.
Definition: PyRep.h:602
bool IsTuple() const
Definition: PyRep.h:108
#define sLog
Evaluates to a NewLog instance.
Definition: LogNew.h:250
PyServiceMgr *const m_manager
Definition: PyService.h:91
const char * GetName() const
Definition: Client.h:94
static int64 IntegerValue(PyRep *pRep)
Definition: PyRep.cpp:118
const char * TypeString() const
Definition: PyRep.cpp:76

Here is the call graph for this function:

AllianceRegistry::PyCallable_DECL_CALL ( GetAlliance  )
protected
AllianceRegistry::PyCallable_DECL_CALL ( GetRankedAlliances  )
protected
AllianceRegistry::PyCallable_DECL_CALL ( GetEmploymentRecord  )
protected
AllianceRegistry::PyCallable_DECL_CALL ( GetAllianceMembers  )
protected

Member Data Documentation

AllianceDB AllianceRegistry::m_db
private

Definition at line 53 of file AllianceRegistry.h.

Referenced by CreateBoundObject().

Dispatcher* const AllianceRegistry::m_dispatch
protected

Definition at line 41 of file AllianceRegistry.h.

Referenced by ~AllianceRegistry().


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