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

#include "CorpRegistryService.h"

Inheritance diagram for CorpRegistryService:
Collaboration diagram for CorpRegistryService:

Public Member Functions

 CorpRegistryService (PyServiceMgr *mgr)
 
virtual ~CorpRegistryService ()
 
- 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 (CreateAlliance)
 
 PyCallable_DECL_CALL (GetRecentKillsAndLosses)
 
 PyCallable_DECL_CALL (GetCorporateContacts)
 
 PyCallable_DECL_CALL (AddCorporateContact)
 
 PyCallable_DECL_CALL (EditCorporateContact)
 
 PyCallable_DECL_CALL (RemoveCorporateContacts)
 
 PyCallable_DECL_CALL (EditContactsRelationshipID)
 
 PyCallable_DECL_CALL (GetLabels)
 
 PyCallable_DECL_CALL (CreateLabel)
 
 PyCallable_DECL_CALL (DeleteLabel)
 
 PyCallable_DECL_CALL (EditLabel)
 
 PyCallable_DECL_CALL (AssignLabels)
 
 PyCallable_DECL_CALL (RemoveLabels)
 
 PyCallable_DECL_CALL (ResignFromCEO)
 
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
 
CorporationDB m_db
 
- Protected Attributes inherited from PyService
PyServiceMgr *const m_manager
 

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 34 of file CorpRegistryService.h.

Constructor & Destructor Documentation

CorpRegistryService::CorpRegistryService ( PyServiceMgr mgr)
CorpRegistryService::~CorpRegistryService ( )
virtual

Definition at line 76 of file CorpRegistryService.cpp.

References m_dispatch.

76  {
77  delete m_dispatch;
78 }
Dispatcher *const m_dispatch

Member Function Documentation

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

Reimplemented from PyService.

Definition at line 80 of file CorpRegistryService.cpp.

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

81 {
82  if (!bind_args->IsTuple()){
83  sLog.Error( "CorpRegistryService::CreateBoundObject", "%s: bind_args is not tuple: '%s'. ", pClient->GetName(), bind_args->TypeString() );
84  pClient->SendErrorMsg("Could not bind object for Corp Registry. Ref: ServerError 02808.");
85  return nullptr;
86  }
87 
88  return new CorpRegistryBound(m_manager, m_db, PyRep::IntegerValue(bind_args->AsTuple()->GetItem(0)));
89 }
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:

CorpRegistryService::PyCallable_DECL_CALL ( CreateAlliance  )
protected
Note
: none of these fully work, and most are skeleton code only
CorpRegistryService::PyCallable_DECL_CALL ( GetRecentKillsAndLosses  )
protected
CorpRegistryService::PyCallable_DECL_CALL ( GetCorporateContacts  )
protected
CorpRegistryService::PyCallable_DECL_CALL ( AddCorporateContact  )
protected
CorpRegistryService::PyCallable_DECL_CALL ( EditCorporateContact  )
protected
CorpRegistryService::PyCallable_DECL_CALL ( RemoveCorporateContacts  )
protected
CorpRegistryService::PyCallable_DECL_CALL ( EditContactsRelationshipID  )
protected
CorpRegistryService::PyCallable_DECL_CALL ( GetLabels  )
protected
CorpRegistryService::PyCallable_DECL_CALL ( CreateLabel  )
protected
CorpRegistryService::PyCallable_DECL_CALL ( DeleteLabel  )
protected
CorpRegistryService::PyCallable_DECL_CALL ( EditLabel  )
protected
CorpRegistryService::PyCallable_DECL_CALL ( AssignLabels  )
protected
CorpRegistryService::PyCallable_DECL_CALL ( RemoveLabels  )
protected
CorpRegistryService::PyCallable_DECL_CALL ( ResignFromCEO  )
protected

Member Data Documentation

CorporationDB CorpRegistryService::m_db
protected

Definition at line 45 of file CorpRegistryService.h.

Referenced by CreateBoundObject().

Dispatcher* const CorpRegistryService::m_dispatch
protected

Definition at line 42 of file CorpRegistryService.h.

Referenced by ~CorpRegistryService().


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