Skip to content

Commit a941aee

Browse files
author
nitrocaster
committed
Rename CScriptBinderObject->ScriptObjectBinder, CScriptBinderObjectWrapper->ScriptObjectBinderWrapper.
1 parent f134dc9 commit a941aee

10 files changed

+93
-92
lines changed

src/xrGame/script_binder.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ void CScriptBinder::net_Destroy ()
160160
xr_delete (m_object);
161161
}
162162

163-
void CScriptBinder::set_object (CScriptBinderObject *object)
163+
void CScriptBinder::set_object (ScriptObjectBinder *object)
164164
{
165165
if (IsGameTypeSingle()) {
166166
VERIFY2 (!m_object,"Cannot bind to the object twice!");

src/xrGame/script_binder.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@
99
#pragma once
1010

1111
class CSE_Abstract;
12-
class CScriptBinderObject;
12+
class ScriptObjectBinder;
1313
class NET_Packet;
1414
// XXX: Merge into CGameObject
1515
class CScriptBinder {
1616
protected:
17-
CScriptBinderObject *m_object;
17+
ScriptObjectBinder *m_object;
1818

1919
public:
2020
CScriptBinder ();
@@ -30,8 +30,8 @@ class CScriptBinder {
3030
virtual void load (IReader &input_packet);
3131
virtual BOOL net_SaveRelevant();
3232
virtual void net_Relcase (CObject *object);
33-
void set_object (CScriptBinderObject *object);
34-
IC CScriptBinderObject *object ();
33+
void set_object (ScriptObjectBinder *object);
34+
IC ScriptObjectBinder *object ();
3535
};
3636

3737
#include "script_binder_inline.h"

src/xrGame/script_binder_inline.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
#pragma once
1010

11-
IC CScriptBinderObject *CScriptBinder::object ()
11+
IC ScriptObjectBinder *CScriptBinder::object ()
1212
{
1313
return (m_object);
1414
}

src/xrGame/script_binder_object.cpp

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,61 +10,61 @@
1010
#include "script_binder_object.h"
1111
#include "script_game_object.h"
1212

13-
CScriptBinderObject::CScriptBinderObject (CScriptGameObject *object)
13+
ScriptObjectBinder::ScriptObjectBinder(CScriptGameObject *object)
1414
{
1515
m_object = object;
1616
}
1717

18-
CScriptBinderObject::~CScriptBinderObject ()
18+
ScriptObjectBinder::~ScriptObjectBinder()
1919
{
2020
#ifdef DEBUG
2121
if (m_object)
2222
Msg ("Destroying binded object %s",m_object->Name());
2323
#endif
2424
}
2525

26-
void CScriptBinderObject::reinit ()
26+
void ScriptObjectBinder::reinit ()
2727
{
2828
}
2929

30-
void CScriptBinderObject::reload (LPCSTR section)
30+
void ScriptObjectBinder::reload (LPCSTR section)
3131
{
3232
}
3333

34-
bool CScriptBinderObject::net_Spawn (SpawnType DC)
34+
bool ScriptObjectBinder::net_Spawn (SpawnType DC)
3535
{
3636
return (true);
3737
}
3838

39-
void CScriptBinderObject::net_Destroy ()
39+
void ScriptObjectBinder::net_Destroy ()
4040
{
4141
}
4242

43-
void CScriptBinderObject::net_Import (NET_Packet *net_packet)
43+
void ScriptObjectBinder::net_Import (NET_Packet *net_packet)
4444
{
4545
}
4646

47-
void CScriptBinderObject::net_Export (NET_Packet *net_packet)
47+
void ScriptObjectBinder::net_Export (NET_Packet *net_packet)
4848
{
4949
}
5050

51-
void CScriptBinderObject::shedule_Update (u32 time_delta)
51+
void ScriptObjectBinder::shedule_Update (u32 time_delta)
5252
{
5353
}
5454

55-
void CScriptBinderObject::save (NET_Packet *output_packet)
55+
void ScriptObjectBinder::save (NET_Packet *output_packet)
5656
{
5757
}
5858

59-
void CScriptBinderObject::load (IReader *input_packet)
59+
void ScriptObjectBinder::load (IReader *input_packet)
6060
{
6161
}
6262

63-
bool CScriptBinderObject::net_SaveRelevant ()
63+
bool ScriptObjectBinder::net_SaveRelevant ()
6464
{
6565
return (false);
6666
}
6767

68-
void CScriptBinderObject::net_Relcase (CScriptGameObject *object)
68+
void ScriptObjectBinder::net_Relcase (CScriptGameObject *object)
6969
{
7070
}

src/xrGame/script_binder_object.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,15 @@ class CSE_ALifeObject;
1212
class CScriptGameObject;
1313
class NET_Packet;
1414

15-
class CScriptBinderObject {
15+
class ScriptObjectBinder
16+
{
1617
public:
1718
typedef CSE_ALifeObject* SpawnType;
1819
CScriptGameObject *m_object;
1920

2021
public:
21-
CScriptBinderObject (CScriptGameObject *object);
22-
virtual ~CScriptBinderObject();
22+
ScriptObjectBinder(CScriptGameObject *object);
23+
virtual ~ScriptObjectBinder();
2324
virtual void reinit ();
2425
virtual void reload (LPCSTR section);
2526
virtual bool net_Spawn (SpawnType DC);

src/xrGame/script_binder_object_script.cpp

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -14,23 +14,23 @@
1414

1515
using namespace luabind;
1616

17-
SCRIPT_EXPORT(CScriptBinderObject, (),
17+
SCRIPT_EXPORT(ScriptObjectBinder, (),
1818
{
1919
module(luaState)
2020
[
21-
class_<CScriptBinderObject,CScriptBinderObjectWrapper>("object_binder")
22-
.def_readonly("object", &CScriptBinderObject::m_object)
21+
class_<ScriptObjectBinder,ScriptObjectBinderWrapper>("object_binder")
22+
.def_readonly("object", &ScriptObjectBinder::m_object)
2323
.def( constructor<CScriptGameObject*>())
24-
.def("reinit", &CScriptBinderObject::reinit, &CScriptBinderObjectWrapper::reinit_static)
25-
.def("reload", &CScriptBinderObject::reload, &CScriptBinderObjectWrapper::reload_static)
26-
.def("net_spawn", &CScriptBinderObject::net_Spawn, &CScriptBinderObjectWrapper::net_Spawn_static)
27-
.def("net_destroy", &CScriptBinderObject::net_Destroy, &CScriptBinderObjectWrapper::net_Destroy_static)
28-
.def("net_import", &CScriptBinderObject::net_Import, &CScriptBinderObjectWrapper::net_Import_static)
29-
.def("net_export", &CScriptBinderObject::net_Export, &CScriptBinderObjectWrapper::net_Export_static)
30-
.def("update", &CScriptBinderObject::shedule_Update, &CScriptBinderObjectWrapper::shedule_Update_static)
31-
.def("save", &CScriptBinderObject::save, &CScriptBinderObjectWrapper::save_static)
32-
.def("load", &CScriptBinderObject::load, &CScriptBinderObjectWrapper::load_static)
33-
.def("net_save_relevant", &CScriptBinderObject::net_SaveRelevant, &CScriptBinderObjectWrapper::net_SaveRelevant_static)
34-
.def("net_Relcase", &CScriptBinderObject::net_Relcase, &CScriptBinderObjectWrapper::net_Relcase_static)
24+
.def("reinit", &ScriptObjectBinder::reinit, &ScriptObjectBinderWrapper::reinit_static)
25+
.def("reload", &ScriptObjectBinder::reload, &ScriptObjectBinderWrapper::reload_static)
26+
.def("net_spawn", &ScriptObjectBinder::net_Spawn, &ScriptObjectBinderWrapper::net_Spawn_static)
27+
.def("net_destroy", &ScriptObjectBinder::net_Destroy, &ScriptObjectBinderWrapper::net_Destroy_static)
28+
.def("net_import", &ScriptObjectBinder::net_Import, &ScriptObjectBinderWrapper::net_Import_static)
29+
.def("net_export", &ScriptObjectBinder::net_Export, &ScriptObjectBinderWrapper::net_Export_static)
30+
.def("update", &ScriptObjectBinder::shedule_Update, &ScriptObjectBinderWrapper::shedule_Update_static)
31+
.def("save", &ScriptObjectBinder::save, &ScriptObjectBinderWrapper::save_static)
32+
.def("load", &ScriptObjectBinder::load, &ScriptObjectBinderWrapper::load_static)
33+
.def("net_save_relevant", &ScriptObjectBinder::net_SaveRelevant, &ScriptObjectBinderWrapper::net_SaveRelevant_static)
34+
.def("net_Relcase", &ScriptObjectBinder::net_Relcase, &ScriptObjectBinderWrapper::net_Relcase_static)
3535
];
3636
});

src/xrGame/script_binder_object_wrapper.cpp

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -11,121 +11,121 @@
1111
#include "script_game_object.h"
1212
#include "xrServer_Objects_ALife.h"
1313

14-
CScriptBinderObjectWrapper::CScriptBinderObjectWrapper (CScriptGameObject *object) :
15-
CScriptBinderObject (object)
14+
ScriptObjectBinderWrapper::ScriptObjectBinderWrapper(CScriptGameObject *object) :
15+
ScriptObjectBinder(object)
1616
{
1717
}
1818

19-
CScriptBinderObjectWrapper::~CScriptBinderObjectWrapper ()
19+
ScriptObjectBinderWrapper::~ScriptObjectBinderWrapper()
2020
{
2121
}
2222

23-
void CScriptBinderObjectWrapper::reinit ()
23+
void ScriptObjectBinderWrapper::reinit ()
2424
{
2525
luabind::call_member<void> (this,"reinit");
2626
}
2727

28-
void CScriptBinderObjectWrapper::reinit_static (CScriptBinderObject *script_binder_object)
28+
void ScriptObjectBinderWrapper::reinit_static (ScriptObjectBinder *script_binder_object)
2929
{
30-
script_binder_object->CScriptBinderObject::reinit ();
30+
script_binder_object->ScriptObjectBinder::reinit ();
3131
}
3232

33-
void CScriptBinderObjectWrapper::reload (LPCSTR section)
33+
void ScriptObjectBinderWrapper::reload (LPCSTR section)
3434
{
3535
luabind::call_member<void> (this,"reload",section);
3636
}
3737

38-
void CScriptBinderObjectWrapper::reload_static (CScriptBinderObject *script_binder_object, LPCSTR section)
38+
void ScriptObjectBinderWrapper::reload_static (ScriptObjectBinder *script_binder_object, LPCSTR section)
3939
{
40-
script_binder_object->CScriptBinderObject::reload (section);
40+
script_binder_object->ScriptObjectBinder::reload (section);
4141
}
4242

43-
bool CScriptBinderObjectWrapper::net_Spawn (SpawnType DC)
43+
bool ScriptObjectBinderWrapper::net_Spawn (SpawnType DC)
4444
{
4545
return (luabind::call_member<bool>(this,"net_spawn",DC));
4646
}
4747

48-
bool CScriptBinderObjectWrapper::net_Spawn_static (CScriptBinderObject *script_binder_object, SpawnType DC)
48+
bool ScriptObjectBinderWrapper::net_Spawn_static (ScriptObjectBinder *script_binder_object, SpawnType DC)
4949
{
50-
return (script_binder_object->CScriptBinderObject::net_Spawn(DC));
50+
return (script_binder_object->ScriptObjectBinder::net_Spawn(DC));
5151
}
5252

53-
void CScriptBinderObjectWrapper::net_Destroy ()
53+
void ScriptObjectBinderWrapper::net_Destroy ()
5454
{
5555
luabind::call_member<void> (this,"net_destroy");
5656
}
5757

58-
void CScriptBinderObjectWrapper::net_Destroy_static (CScriptBinderObject *script_binder_object)
58+
void ScriptObjectBinderWrapper::net_Destroy_static (ScriptObjectBinder *script_binder_object)
5959
{
60-
script_binder_object->CScriptBinderObject::net_Destroy();
60+
script_binder_object->ScriptObjectBinder::net_Destroy();
6161
}
6262

63-
void CScriptBinderObjectWrapper::net_Import (NET_Packet *net_packet)
63+
void ScriptObjectBinderWrapper::net_Import (NET_Packet *net_packet)
6464
{
6565
luabind::call_member<void> (this,"net_import",net_packet);
6666
}
6767

68-
void CScriptBinderObjectWrapper::net_Import_static (CScriptBinderObject *script_binder_object, NET_Packet *net_packet)
68+
void ScriptObjectBinderWrapper::net_Import_static (ScriptObjectBinder *script_binder_object, NET_Packet *net_packet)
6969
{
70-
script_binder_object->CScriptBinderObject::net_Import (net_packet);
70+
script_binder_object->ScriptObjectBinder::net_Import (net_packet);
7171
}
7272

73-
void CScriptBinderObjectWrapper::net_Export (NET_Packet *net_packet)
73+
void ScriptObjectBinderWrapper::net_Export (NET_Packet *net_packet)
7474
{
7575
luabind::call_member<void> (this,"net_export",net_packet);
7676
}
7777

78-
void CScriptBinderObjectWrapper::net_Export_static (CScriptBinderObject *script_binder_object, NET_Packet *net_packet)
78+
void ScriptObjectBinderWrapper::net_Export_static (ScriptObjectBinder *script_binder_object, NET_Packet *net_packet)
7979
{
80-
script_binder_object->CScriptBinderObject::net_Export (net_packet);
80+
script_binder_object->ScriptObjectBinder::net_Export (net_packet);
8181
}
8282

83-
void CScriptBinderObjectWrapper::shedule_Update (u32 time_delta)
83+
void ScriptObjectBinderWrapper::shedule_Update (u32 time_delta)
8484
{
8585
luabind::call_member<void> (this,"update",time_delta);
8686
}
8787

88-
void CScriptBinderObjectWrapper::shedule_Update_static (CScriptBinderObject *script_binder_object, u32 time_delta)
88+
void ScriptObjectBinderWrapper::shedule_Update_static (ScriptObjectBinder *script_binder_object, u32 time_delta)
8989
{
90-
script_binder_object->CScriptBinderObject::shedule_Update (time_delta);
90+
script_binder_object->ScriptObjectBinder::shedule_Update (time_delta);
9191
}
9292

93-
void CScriptBinderObjectWrapper::save (NET_Packet *output_packet)
93+
void ScriptObjectBinderWrapper::save (NET_Packet *output_packet)
9494
{
9595
luabind::call_member<void> (this,"save",output_packet);
9696
}
9797

98-
void CScriptBinderObjectWrapper::save_static (CScriptBinderObject *script_binder_object, NET_Packet *output_packet)
98+
void ScriptObjectBinderWrapper::save_static (ScriptObjectBinder *script_binder_object, NET_Packet *output_packet)
9999
{
100-
script_binder_object->CScriptBinderObject::save (output_packet);
100+
script_binder_object->ScriptObjectBinder::save (output_packet);
101101
}
102102

103-
void CScriptBinderObjectWrapper::load (IReader *input_packet)
103+
void ScriptObjectBinderWrapper::load (IReader *input_packet)
104104
{
105105
luabind::call_member<void> (this,"load",input_packet);
106106
}
107107

108-
void CScriptBinderObjectWrapper::load_static (CScriptBinderObject *script_binder_object, IReader *input_packet)
108+
void ScriptObjectBinderWrapper::load_static (ScriptObjectBinder *script_binder_object, IReader *input_packet)
109109
{
110-
script_binder_object->CScriptBinderObject::load (input_packet);
110+
script_binder_object->ScriptObjectBinder::load (input_packet);
111111
}
112112

113-
bool CScriptBinderObjectWrapper::net_SaveRelevant ()
113+
bool ScriptObjectBinderWrapper::net_SaveRelevant ()
114114
{
115115
return (luabind::call_member<bool>(this,"net_save_relevant"));
116116
}
117117

118-
bool CScriptBinderObjectWrapper::net_SaveRelevant_static(CScriptBinderObject *script_binder_object)
118+
bool ScriptObjectBinderWrapper::net_SaveRelevant_static(ScriptObjectBinder *script_binder_object)
119119
{
120-
return (script_binder_object->CScriptBinderObject::net_SaveRelevant());
120+
return (script_binder_object->ScriptObjectBinder::net_SaveRelevant());
121121
}
122122

123-
void CScriptBinderObjectWrapper::net_Relcase (CScriptGameObject *object)
123+
void ScriptObjectBinderWrapper::net_Relcase (CScriptGameObject *object)
124124
{
125125
luabind::call_member<void> (this,"net_Relcase",object);
126126
}
127127

128-
void CScriptBinderObjectWrapper::net_Relcase_static (CScriptBinderObject *script_binder_object, CScriptGameObject *object)
128+
void ScriptObjectBinderWrapper::net_Relcase_static (ScriptObjectBinder *script_binder_object, CScriptGameObject *object)
129129
{
130-
script_binder_object->CScriptBinderObject::net_Relcase (object);
130+
script_binder_object->ScriptObjectBinder::net_Relcase (object);
131131
}

src/xrGame/script_binder_object_wrapper.h

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,30 +13,30 @@
1313

1414
class CScriptGameObject;
1515

16-
class CScriptBinderObjectWrapper : public CScriptBinderObject, public luabind::wrap_base {
16+
class ScriptObjectBinderWrapper : public ScriptObjectBinder, public luabind::wrap_base {
1717
public:
18-
CScriptBinderObjectWrapper (CScriptGameObject *object);
19-
virtual ~CScriptBinderObjectWrapper ();
18+
ScriptObjectBinderWrapper(CScriptGameObject *object);
19+
virtual ~ScriptObjectBinderWrapper();
2020
virtual void reinit ();
21-
static void reinit_static (CScriptBinderObject *script_binder_object);
21+
static void reinit_static (ScriptObjectBinder *script_binder_object);
2222
virtual void reload (LPCSTR section);
23-
static void reload_static (CScriptBinderObject *script_binder_object, LPCSTR section);
23+
static void reload_static (ScriptObjectBinder *script_binder_object, LPCSTR section);
2424
virtual bool net_Spawn (SpawnType DC);
25-
static bool net_Spawn_static (CScriptBinderObject *script_binder_object, SpawnType DC);
25+
static bool net_Spawn_static (ScriptObjectBinder *script_binder_object, SpawnType DC);
2626
virtual void net_Destroy ();
27-
static void net_Destroy_static (CScriptBinderObject *script_binder_object);
27+
static void net_Destroy_static (ScriptObjectBinder *script_binder_object);
2828
virtual void net_Import (NET_Packet *net_packet);
29-
static void net_Import_static (CScriptBinderObject *script_binder_object, NET_Packet *net_packet);
29+
static void net_Import_static (ScriptObjectBinder *script_binder_object, NET_Packet *net_packet);
3030
virtual void net_Export (NET_Packet *net_packet);
31-
static void net_Export_static (CScriptBinderObject *script_binder_object, NET_Packet *net_packet);
31+
static void net_Export_static (ScriptObjectBinder *script_binder_object, NET_Packet *net_packet);
3232
virtual void shedule_Update (u32 time_delta);
33-
static void shedule_Update_static (CScriptBinderObject *script_binder_object, u32 time_delta);
33+
static void shedule_Update_static (ScriptObjectBinder *script_binder_object, u32 time_delta);
3434
virtual void save (NET_Packet *output_packet);
35-
static void save_static (CScriptBinderObject *script_binder_object, NET_Packet *output_packet);
35+
static void save_static (ScriptObjectBinder *script_binder_object, NET_Packet *output_packet);
3636
virtual void load (IReader *input_packet);
37-
static void load_static (CScriptBinderObject *script_binder_object, IReader *input_packet);
37+
static void load_static (ScriptObjectBinder *script_binder_object, IReader *input_packet);
3838
virtual bool net_SaveRelevant ();
39-
static bool net_SaveRelevant_static (CScriptBinderObject *script_binder_object);
39+
static bool net_SaveRelevant_static (ScriptObjectBinder *script_binder_object);
4040
virtual void net_Relcase (CScriptGameObject *object);
41-
static void net_Relcase_static (CScriptBinderObject *script_binder_object, CScriptGameObject *object);
41+
static void net_Relcase_static (ScriptObjectBinder *script_binder_object, CScriptGameObject *object);
4242
};

0 commit comments

Comments
 (0)