EvEmu  0.8.4
11 September 2021
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
PyBoundObject.cpp
Go to the documentation of this file.
1 /*
2  ------------------------------------------------------------------------------------
3  LICENSE:
4  ------------------------------------------------------------------------------------
5  This file is part of EVEmu: EVE Online Server Emulator
6  Copyright 2006 - 2021 The EVEmu Team
7  For the latest information visit https://evemu.dev
8  ------------------------------------------------------------------------------------
9  This program is free software; you can redistribute it and/or modify it under
10  the terms of the GNU Lesser General Public License as published by the Free Software
11  Foundation; either version 2 of the License, or (at your option) any later
12  version.
13 
14  This program is distributed in the hope that it will be useful, but WITHOUT
15  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
16  FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
17 
18  You should have received a copy of the GNU Lesser General Public License along with
19  this program; if not, write to the Free Software Foundation, Inc., 59 Temple
20  Place - Suite 330, Boston, MA 02111-1307, USA, or go to
21  http://www.gnu.org/copyleft/lesser.txt.
22  ------------------------------------------------------------------------------------
23  Author: Zhur
24 */
25 
26 #include "eve-server.h"
27 
28 #include "PyBoundObject.h"
29 
31 : m_manager(mgr),
32  m_nodeID(0),
33  m_bindID(0)
34 {
35  m_strBoundObjectName = "PyBoundObject";
36 }
37 
39 {
40 }
41 
42 PyResult PyBoundObject::Call(const std::string &method, PyCallArgs &args) {
43  _log(SERVICE__CALLS_BOUND, "%s::%s()", GetName(), method.c_str());
44  args.Dump(SERVICE__CALL_TRACE);
45 
46  return PyCallable::Call(method, args);
47 }
48 
49 std::string PyBoundObject::GetBindStr() const {
50  //generate a nice bind string:
51  char bind_str[128];
52  snprintf(bind_str, sizeof(bind_str), "N=%u:%u", nodeID(), bindID());
53 
54  return(std::string(bind_str));
55 }
#define _log(type, fmt,...)
Definition: logsys.h:124
virtual PyResult Call(const std::string &method, PyCallArgs &args)
std::string m_strBoundObjectName
Definition: PyBoundObject.h:54
* args
#define snprintf
Definition: eve-compat.h:184
std::string GetBindStr() const
PyBoundObject(PyServiceMgr *mgr)
uint32 nodeID() const
Definition: PyBoundObject.h:39
void Dump(LogType type) const
Definition: PyCallable.cpp:81
virtual PyResult Call(const std::string &method, PyCallArgs &args)
Definition: PyCallable.cpp:39
uint32 bindID() const
Definition: PyBoundObject.h:40
const char * GetName() const
Definition: PyBoundObject.h:44
virtual ~PyBoundObject()