-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathExportableToLua.cpp
More file actions
42 lines (36 loc) · 847 Bytes
/
ExportableToLua.cpp
File metadata and controls
42 lines (36 loc) · 847 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/** @file ExportableToLua.cpp */
#include "ExportableToLua.h"
ExportableToLua::ExportableToLua(): refcount(0)
{
}
ExportableToLua::~ExportableToLua()
{
//Debug::check_assertion(refcount == 0, StringConcat()
// << "This object is still used somewhere else: refcount is " << refcount);
}
/**
* @brief Returns the current refcount of this object.
*
* You must not delete this object if its refcount is not zero.
*
* @return the current refcount of this object
*/
int ExportableToLua::get_refcount() const
{
return refcount;
}
/**
* @brief Increments the refcount of this object.
*/
void ExportableToLua::increment_refcount()
{
refcount++;
}
/**
* @brief Decrements the refcount of this object.
*/
void ExportableToLua::decrement_refcount()
{
//Debug::check_assertion(refcount > 0, "The refcount is already 0");
refcount--;
}